Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

Alphabetical List of Media Foundation Attributes
Source Reader

 

 

Show:
© 2017 Microsoft