- Dynamically using regsvr tool
- statically at run-time image creation
static const WCHAR g_wszName[] = L"Some Filter";
AMOVIESETUP_MEDIATYPE sudMediaTypes[] = { { &MEDIATYPE_Video, &MEDIASUBTYPE_RGB24 }, { &MEDIATYPE_Video, &MEDIASUBTYPE_RGB32 }, };
AMOVIESETUP_PIN sudOutputPin = { L"Output", // Pin string name. FALSE, // Is this pin rendered? TRUE, // Is it an output pin? FALSE, // Can the filter create zero instances? FALSE, // Does the filter create multiple instances? &GUID_NULL, // Connects to filter. NULL, // Connects to pin. 2, // Number of media types. sudMediaTypes // Pointer to media types. };
AMOVIESETUP_FILTER sudFilterReg = { &CLSID_SomeFilter, // Filter CLSID. g_wszName, // Filter name. MERIT_NORMAL, // Merit. 1, // Number of pin types. &sudPins // Pointer to pin information. }; |
CFactoryTemplate g_Templates[] = { { g_wszName, // Name. &CLSID_SomeFilter, // CLSID. CSomeFilter::CreateInstance, // Creation function. NULL, &sudFilterReg // Pointer to filter information. } }; int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]); |
STDAPI DllRegisterServer() { return AMovieDllRegisterServer(); } STDAPI DllUnregisterServer() { return AMovieDllUnregisterServer(); } |