Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function calls DMORegisterand then creates additional entries in the registry that allow filter enumeration routines in DirectShow to locate a DMO.
Syntax
STDAPI DMORegisterFilter( LPCWSTR szName, REFCLSID clsidDMO, REFGUID guidCategory, REFCLSID clsidAutoWrap, DWORD dwFlags, unsigned long ulInTypes, const DMO_PARTIAL_MEDIATYPE* pInTypes, unsigned long ulOutTypes, const DMO_PARTIAL_MEDIATYPE* pOutTypes ); |
Parameters
- szName
-
[in] Null-terminated string that contains a descriptive name for the DMO. Names longer than 79 characters might be truncated.
- clsidDMO
-
[in] Class identifier (CLSID) of the DMO.
- guidCategory
-
[in] One of the DMO GUIDs. It specifies the category of the DMO.
- clsidAutoWrap
-
[in] The class identifier that specifies the DirectShow filter that will contain the DMO.
- dwFlags
-
[in] Bitwise combination of zero or more flags from the DMO_REGISTER_FLAGSenumeration.
- ulInTypes
-
[in] Number of input media types to register, which can be zero.
- pInTypes
-
[in] Pointer to an array of DMO_PARTIAL_MEDIATYPEstructures that specify the input media types. The size of the array is specified in the ulInTypesparameter.
- ulOutTypes
-
[in] Number of output media types to register.
- pOutTypes
-
Pointer to an array of DMO_PARTIAL_MEDIATYPEstructures that specify the output media types. The size of the array is specified in the ulOutTypesparameter, which can be zero.
Return Value
Returns an HRESULTvalue. Possible values include the following.
Value | Description |
---|---|
S_OK |
Success |
E_FAIL |
Failure |
E_INVALIDARG |
Invalid argument |
Remarks
This function adds information about a filter DMO to the registry. Applications or Component Object Model (COM) components can use this information to locate the DMOs they need by calling the DMOEnumfunction.
For example, to encode a video stream, you would search in the DMOCATEGORY_VIDEO_ENCODER category for a DMO whose media types matched your requirements.
The media types registered by this function are only for finding the DMO. They do not necessarily match the types returned by the IMediaObject::GetInputTypeand IMediaObject::GetOutputTypemethods.
For example, a decoder might register just its main input types. After the DMO is created and its input type is set, its GetOutputTypemethod returns all of the decompressed types it can generate.
Requirements
Header | dmoreg.h |
Library | msdmo.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |