Microsoft DirectX 8.1 (C++)

IDvdGraphBuilder::GetDvdInterface

The GetDvdInterface method retrieves specific interface pointers in 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 required interface.

ppvIF

[out] Address of a pointer to the retrieved interface.

Return Values

Returns an HRESULT that depends on the implementation of the interface.

The DirectShow implementation return values include the following:

Return code Description
E_INVALIDARG The ppvIF parameter is invalid.
E_NOINTERFACE The riid parameter value is not supported.
VFW_E_DVD_GRAPHNOTREADY The graph has not been built through the IDvdGraphBuilder::RenderDvdVideoVolume method before retrieving this interface.

Remarks

Use this method to get the IDvdControl2 and IDvdInfo2 interfaces to control playback of a DVD-Video volume, and to get the IAMLine21Decoder interface to turn closed captioning on and off. You also use this method to get the IBasicVideo, IVideoWindow, and IBasicAudio interfaces. You only need a pointer to IBasicAudio if an audio renderer is used to render audio.

Remember to release the interface when you're done by using the following code:

*ppvIF->Release();

The IMixerPinConfig2 interface can be retrieved from the first input pin (primary video stream) of the Overlay Mixer filter in the DVD-Video playback graph using this interface. The IDDrawExclModeVideo interface can also be retrieved from the Overlay Mixer in the DVD-Video playback graph. This interface is required to playback video in DirectDraw exclusive mode, as some games require. Unlike other interfaces, it is not necessary to build the graph using the IDvdGraphBuilder::RenderDvdVideoVolume method before calling IDvdGraphBuilder::GetDvdInterface. This interface should be retrieved before using the IDvdGraphBuilder::RenderDvdVideoVolume method to build the graph.

See Also