Directly Accessing the DirectShow Processing Filters

Direct access to the underlying DirectShow audio and video processing filters can be accomplished through the IltmmObjectWrapper interface. This allows the user to programmatically manipulate the individual processors properties. Please consult the individual processing filters documentation to determine the capabilities of that filter.

For example, lets assume that you have added 2 video processors to the ltmmPlay object, and you would like to obtain the underlying DirectShow filter for the second processor.

  1. The first step would be to obtain the selected video processors collection from the ltmmPlay object using the following code:

    IltmmProcessors* pProcessors; 
    play->get_SelectedVideoProcessors(&pProcessors); // get the selected video processor collection 

  2. Next, you would get the second processor:

    IltmmProcessor* pProcessor; 
    pProcessors->Item(1, &pProcessor);   // get the second processor 
    pProcessors->Release();      // do not need the collection anymore 

  3. Now, you can obtain the IltmmObjectWrapper interface:

    IltmmObjectWrapper* pWrapper; 
    pProcessor->QueryInterface(IID_IltmmObjectWrapper, (void**) &pWrapper);   // get the wrapper interface 
    pProcessor->Release();  // do not need this anymore 

  4. And finally, you can get the underlying DirectShow filter:

    IUnknown* pObject; 
    pWrapper->GetWrappedObject(&pObject); // get the DirectShow filter 
    pWrapper->Release();  // do not need this anymore 
    pObject now contains the IUnknown interface pointer to the filter. You can access all of the interfaces that the processor implements through this interface pointer.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.