Expand Minimize

MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS attribute

Gets the characteristics of the media source from the Source Reader.

Data type

UINT32

The value is a bitwise OR of flags from the MFMEDIASOURCE_CHARACTERISTICS enumeration.

Remarks

To get this attribute, call the IMFSourceReader::GetPresentationAttribute method on the source reader. Set the dwStreamIndex parameter to MF_SOURCE_READER_MEDIASOURCE and the guidAttribute parameter to MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS.

The PROPVARIANT type for this attribute is VT_UI4.

Examples


HRESULT GetSourceFlags(IMFSourceReader *pReader, ULONG *pulFlags)
{
    ULONG flags = 0;

    PROPVARIANT var;
    PropVariantInit(&var);

    HRESULT hr = pReader->GetPresentationAttribute(
        MF_SOURCE_READER_MEDIASOURCE, 
        MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS, 
        &var);

    if (SUCCEEDED(hr))
    {
        hr = PropVariantToUInt32(var, &flags);
    }
    if (SUCCEEDED(hr))
    {
        *pulFlags = flags;
    }

    PropVariantClear(&var);
    return hr;
}


Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

Mfreadwrite.h

See also

Source Reader

 

 

Community Additions

ADD
Show:
© 2014 Microsoft