Assume you want to insert the mosaic as the first filter to the play object.
Create an instance of the ltmmPlay class. This is accomplished using the Win32 CoCreateInstance function as follows:
IltmmPlay* pPlay;
CoCreateInstance(&CLSID_ltmmPlay, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmPlay, (void**) &pPlay);
IltmmPlay* pPlay;
CoCreateInstance(CLSID_ltmmPlay, NULL, CLSCTX_INPROC_SERVER, IID_IltmmPlay, (void**) &pPlay);
Get the registered processors collection as follows:
IltmmProcessors* pProcessors;
IltmmPlay_get_VideoProcessors (pPlay, &pProcessors);
IltmmProcessors* pProcessors;
pPlay->get_VideoProcessors(&pProcessors);
Find the processor index by name as follows:
long index;
BSTR bstr;
// The string below is retrieved from the Filters List utility
bstr = SysAllocString(L"@device:sw:{E526D606-22E7-494C-B81E-AC0A94BFE603}\\{E2B7DB28-38C5-11D5-91F6-00104BDB8FF9}");
IltmmProcessors_Find (pProcessors, bstr, &index);
SysFreeString(bstr);
long index;
BSTR bstr;
// The string below is retrieved from the Filters List utility
bstr = SysAllocString(L"@device:sw:{E526D606-22E7-494C-B81E-AC0A94BFE603}\\{E2B7DB28-38C5-11D5-91F6-00104BDB8FF9}");
pProcessors->Find (bstr, &index);
SysFreeString(bstr);
Get the processor interface and the selected processors collection as follows:
IltmmProcessors* pSelProcessors;
IltmmProcessor* pProcessor;
// get the processor interface
IltmmProcessors_Item(pProcessors, index, &pProcessor);
// get the selected processors collection
IltmmPlay_get_SelectedVideoProcessors (pPlay, &pSelProcessors);
IltmmProcessors* pSelProcessors;
IltmmProcessor* pProcessor;
// get the processor interface
pProcessors->Item (index, &pProcessor);
// get the selected processors collection
pPlay->get_SelectedVideoProcessors (&pSelProcessors);
Finally, add the processor to the selected processors collection as the first filter as follows:
IltmmProcessors_Add (pSelProcessors, pProcessor, 0);
// release interfaces
IUnknown_Release(pProcessor);
IUnknown_Release(pProcessors);
IUnknown_Release(pSelProcessors);
pSelProcessors->Add (pProcessor, 0);
// release interfaces
pProcessor->Release();
pProcessors->Release();
pSelProcessors->Release();
Note: If you want to know how to use the interface of the filter, refer to Access the Interface of Filters.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.