Creating a Tuner Object

From: Jim Stilwell (Jim_Stilwell_at_yahoo.com)
Date: 03/14/04


Date: Sun, 14 Mar 2004 23:37:05 GMT

Just getting started with TV Tuners and Video Capture in DShow (DX9) and I
have a question about adding a TVTuner Object to the filter graph.
Background:
Before I started coding I spent some time in GraphEdit and came up with a
combination of objects and settings that behaved the way I wanted them to
everytime. (Hardware-wise I have a Happauge PVR350)

The process looks like this.

Add Hauppauge WinTV PVR PCI II TVTuner
- Adjust Tuner Channel to 3
Add Hauppauge Win PVR PCI II TV Audio
- Link Tuner Analog Audio to TV Audio In on the Audio filter
Add Hauppauge Win PVR PCI II Crossbar
- Set Video and audio sources to 'Tuner'
- Link Tuner Analog Video pin to Video Tuner in on the crossbar
- Link TV Audio Out on the Audio filter to Audio Tuner In on the crossbar
Add Hauppauge Win PVR PCI II Capture component
- Link Crossbar Video Decoder Out to Capture Analog Video In
- Link Crossbar Audio Decoder Out to Capture Analog Audio In
Add Hauppauge Win PVR PCI II Color Format Converter
- Link Capture Preview Video Pin to input pin in the Color Forma Converter
Add Default DirectSound Device
- Link Capture Preview Audio to the Audio Input pin (rendered) on the
DSound filter
Add a Video Mixing Renderer 9 filter
- Link the output pin on the color converter to the appropriate VMR input
pin

Given this fairly simple configuration I tried to recreate the process in
Direct Show. I started by creating my ICaptureGraphBuilder2 and FilterGraph
Manager Interfaces

ICaptureGraphBuilder2 *pCaptureGraph = NULL;
IGraphBuilder *pGraph = NULL;
<snip...>
hr = CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL,
CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2, (void**)&pCaptureGraph);
hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
IID_IGraphBuilder, (void **)&pGraph);

 - but found that I was at a loss when trying to add the TVTuner interface.

Here are a few of the options that I tried:

hr = CoCreateInstance(CLSID_TVTunerFilter, NULL, CLSCTX_INPROC_SERVER,
        IID_IBaseFilter, (void**)(&pF));

But this fails - even though DX 9 lists 'CLSID_TVTunerFilter' as a valid
GUID, it isn't defined in any of the header files that you might expect it
to be. (uuids.h)

So I turned to my Capture Graph Builder for a little help...
hr = pCaptureGraph->FindInterface(&LOOK_DOWNSTREAM_ONLY, 0,
pVideoInputFilter, IID_IAMTVTuner, (void**)&m_pTuner);

But that didn't help either.

If for instence you wanted to just add the TV Tuner component to a capture
graph, how would you go about it?



Relevant Pages

  • A/V sync drift in long capture
    ... I've built a DirectShow-based live capture application (based on AMCap ... video frame rate to fluctuate slightly, as long as the audio and video ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Surveillance
    ... microphone's through a minijack and you can capture from them continously ... > surveillance that will provide video and audio that will stand up in court. ... > One of my neighbors, directly across the street, is a nuisance. ...
    (Fedora)
  • [x86_64] linux 2.6.15-rc6 mplayer fails to record ALSA audio.
    ... With today's git tree I'm still experiencing the same problem that audio isn't captured with mencoder. ... Selected driver: v4l2 name: Video 4 Linux 2 input ... video capture video overlay VBI capture device tuner read/write streaming ... Opening video decoder: [raw] RAW Uncompressed Video ...
    (Linux-Kernel)
  • Re: Audio quality and WME9 series
    ... >ATI WDM Rage Theater Audio ... >ATI WDM Rage Theater Video NSP ... >when selecting the "screen capture" on the WME9 series main window, ...
    (microsoft.public.windowsmedia.encoder)
  • Re: items needed to copy analog to HD to DVD
    ... those are a capture card with a TV Tuner built in. ... > next up most come with software for dvd authoring as well as mpeg 2 video capture ...
    (microsoft.public.windowsxp.hardware)