Creating a Tuner Object
From: Jim Stilwell (Jim_Stilwell_at_yahoo.com)
Date: 03/14/04
- Next message: Ron Green: "Re: IAMPushSource for Capture Filter"
- Previous message: The March Hare \(MVP\): "Re: Cannot Compile CompressView sample.."
- Next in thread: Tony: "RE: Creating a Tuner Object"
- Reply: Tony: "RE: Creating a Tuner Object"
- Messages sorted by: [ date ] [ thread ]
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?
- Next message: Ron Green: "Re: IAMPushSource for Capture Filter"
- Previous message: The March Hare \(MVP\): "Re: Cannot Compile CompressView sample.."
- Next in thread: Tony: "RE: Creating a Tuner Object"
- Reply: Tony: "RE: Creating a Tuner Object"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|