Using Media Foundation Transform Attributes

In order to use the Attributes of any Media Foundation transform, perform the following steps:

  1. Get an interface of type IMFTransform by calling QueryInterface over the LEAD Transform Object:
    IMFTransform *pTransform = NULL; 
    LEADTransform->QueryInterface(IID_IMFTransform, (void**) &pTransform); 
  2. Get the attribute store:
    IMFAttributes *pAttributes = NULL; 
    pTransform->GetAttributes(&pAttributes); 
  3. Get or set any attribute supported by the transform:

    Get a Value

    For example, get a long (UINT32) value which has a CLSID of MF_CLSID_SOMEATTRIBUTE

    long unVal;   
    pAttributes->GetUINT32(MF_CLSID_SOMEATTRIBUTE, &unVal); 

    Set a Value

    For example, set a long (UINT32) value to an attribute which has a CLSID of MF_CLSID_SOMEATTRIBUTE

    long unVal =  10;   
    pAttributes->SetUINT32(MF_CLSID_SOMEATTRIBUTE, unVal); 

  4. Release the attribute store (and all active objects) when you are finished.
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

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