Microsoft DirectX 8.1 (C++) |
The Filter Graph Manager uses your filter's registry entries to configure your filter and its connections. You provide your filter's registry information in the AMOVIESETUP_MEDIATYPE, AMOVIESETUP_PIN, and AMOVIESETUP_FILTER structures. Typically, these structures are at the beginning of your filter implementation code. For more information about using these structures, see How to Register DirectShow Filters.
Perform the following steps to provide the three structures you need for filter registration:
const AMOVIESETUP_MEDIATYPE sudPinTypes =
{ &MEDIATYPE_Video // major type
, &MEDIASUBTYPE_NULL} ; // minor type
The possible major types are MEDIATYPE_Stream, MEDIATYPE_Video, and MEDIATYPE_Audio.
const AMOVIESETUP_FILTER
sudMyFilter = { &CLSID_MyFilter // clsID
, L"My Filter Description" // strName
, MERIT_UNLIKELY // dwMerit
, 2 // nPins
, sudpPins }; // lpPin