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. |
A version of this page is also available for
4/8/2010
To create an instance of the DMO Wrapperfilter, query the DMO Wrapper filter for the IDMOWrapperFilterinterface. Then, call the IDMOWrapperFilter::Initmethod, which takes the CLSID of the DMO and the GUID of the DMO's category.
You can use the DMOEnumfunction to enumerate DMOs registered on the user's system. DMOs are registered using a different set of category GUIDs from the ones used for DirectShow filters. For a list of DMO categories, see DMO GUIDs.
The following code example shows how to use the IDMOWrapperFilterinterface.
Copy Code | |
---|---|
// IMediaObject // Create the DMO Wrapper filter. IBaseFilter *pFilter; HRESULT hr = CoCreateInstance(CLSID_DMOWrapperFilter, NULL, CLSCTX_INPROC, IID_IBaseFilter, (void **)&pFilter); if (SUCCEEDED(hr)) { IDMOWrapperFilter *pWrap; hr = pFilter->QueryInterface(IID_IDMOWrapperFilter, (void **)&pWrap); if (SUCCEEDED(hr)) { // Initialize the filter. hr = pWrap->Init(CLSID_MyDMO, CLSID_MyDMOCategory); pWrap->Release(); } if (SUCCEEDED(hr)) { // Add the filter to the graph. hr = pGraph->AddFilter(pFilter, L"My DMO"); } pFilter->Release(); } |
For more information on the use of pGraph in the sample above, see the topic: Playing the File.