AMovieDllRegisterServer
This function registers filters.
HRESULT AMovieDllRegisterServer(void);
Parameters
None.
Return Values
Returns an HRESULT value.
Remarks
Use this function to set up your filters. The following function shows an example of how this might be done.
static const WCHAR *g_wszName = L"Sample Compressor Filter" ;
// Register Sample Compressor Filter
STDAPI
DllRegisterServer( void )
{
// register the server
HRESULT hr = AMovieDllRegisterServer( );
if( FAILED(hr) )
return hr;
IFilterMapper2 *pFm2 = 0;
hr = CoCreateInstance( CLSID_FilterMapper2
, NULL
, CLSCTX_INPROC_SERVER
, IID_IFilterMapper2
, (void **)&pFm2 );
if(FAILED(hr))
return hr;
static const AMOVIESETUP_MEDIATYPE sudAVICoTypeOut = {
&MEDIATYPE_Video,
&MEDIASUBTYPE_SampleVideoType };
static const AMOVIESETUP_MEDIATYPE sudAVICoTypeIn = {
&MEDIATYPE_Video,
&GUID_NULL };
static const AMOVIESETUP_PIN psudAICoPins[] =
{
{
L"Input" // strName
, FALSE // bRendered
, FALSE // bOutput
, FALSE // bZero
, FALSE // bMany
, &CLSID_NULL // clsConnectsToFilter
, 0 // strConnectsToPin
, 1 // nTypes
, &sudAVICoTypeIn } // lpTypes
, { L"Output" // strName
, FALSE // bRendered
, TRUE // bOutput
, FALSE // bZero
, FALSE // bMany
, &CLSID_NULL // clsConnectsToFilter
, 0 // strConnectsToPin
, 1 // nTypes
, &sudAVICoTypeOut
}
}; // lpTypes
REGFILTER2 rf2;
rf2.dwVersion = 1;
rf2.dwMerit = MERIT_DO_NOT_USE;
rf2.cPins = NUMELMS(psudAVICoPins);
rf2.rgPins = psudAVICoPins;
hr = pFm2->RegisterFilter(
CLSID_SampleCompressorFilter,
g_wszName, // name shown to the user
0, // device moniker
&CLSID_VideoCompressorCategory,
g_wszName, // unique instance name
&rf2);
pFm2->Release();
return hr;
}
Requirements
DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.
OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.