IDvdGraphBuilder::GetDvdInterface
Microsoft DirectShow 9.0 |
IDvdGraphBuilder::GetDvdInterface
The GetDvdInterface method retrieves interfaces from the DVD-Video playback graph to make DVD-Video playback development easier.
Syntax
HRESULT GetDvdInterface( REFIID riid, void **ppvIF );
Parameters
riid
[in] IID of the requested interface.
ppvIF
[out] Receives a pointer to the interface. The application must release the interface.
Return Values
Returns an HRESULT value. Possible values include the following:
Return code | Description |
E_INVALIDARG | The ppvIF parameter is invalid. This parameter must not be NULL. |
E_NOINTERFACE | The requested interface could not be returned. |
VFW_E_DVD_GRAPHNOTREADY | The graph is not built yet. See Remarks. |
Remarks
You can use this method to select and configure a video renderer filter before you build the filter graph for DVD playback. The following interfaces are available:
- Overlay Mixer Filter: IDDrawExclModeVideo.
- Video Mixing Renderer 7 (VMR-7): IVMRFilterConfig, IVMRMixerBitmap, IVMRWindowlessControl, and IVMRMonitorConfig.
- Video Mixing Renderer 9 (VMR-9): IVMRFilterConfig9, IVMRMixerBitmap9, IVMRWindowlessControl9, and IVMRMonitorConfig9.
- Enhanced Video Renderer (EVR): IEVRFilterConfig and IMFVideoRenderer. Requires Windows Vista or later.
If you call GetDvdInterface to get any of these interfaces before you build the filter graph, the DVD Graph Builder creates the appropriate video renderer. It will use this renderer later when you build the graph. After the video renderer has been selected, you can no longer retrieve the interfaces for the other video renderers. (The GetDvdInterface method will return E_NOINTERFACE.)
Before the DVD playback graph is built, if you request any interfaces that are not on the previous list, the method returns VFW_E_DVD_GRAPHNOTREADY. To build the DVD graph, calling IDvdGraphBuilder::RenderDvdVideoVolume. After you build the graph, you can use GetDvdInterface to retrieve some additional interfaces:
- IDvdControl (deprecated), IDvdControl2, IDvdInfo (deprecated), and IDvdInfo2 to control DVD playback.
- IVideoWindow, IBasicVideo, and IBasicVideo2 to control the video settings, in windowed mode only.
- IBasicAudio to control the audio settings.
- IAMLine21Decoder to control closed caption display.
- IMixerPinConfig and IMixerPinConfig2 to configure the Overlay Mixer filter's first input pin, which delivers the primary video stream. (To get this interface for the other pins on the Overlay Mixer, enumerate the filter's pins and query them directly.) New applications should avoid using the Overlay Mixer filter.
To get other interfaces, call IDvdGraphBuilder::GetFiltergraph. Query the returned IGraphBuilder interface or use EnumFilters to enumerate the filters.
Requirements
Header: Declared in Strmif.h; include Dshow.h.
Library: Use Strmiids.lib.
See Also