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.

IMFMetadataProvider interface

Gets metadata from a media source or other object.

If a media source supports this interface, it must expose the interface as a service. To get a pointer to this interface from a media source, call IMFGetService::GetService. The service identifier is MF_METADATA_PROVIDER_SERVICE. Other types of object can expose this interface through QueryInterface.

Use this interface to get a pointer to the IMFMetadata interface.

Members

The IMFMetadataProvider interface inherits from the IUnknown interface. IMFMetadataProvider also has these types of members:

Methods

The IMFMetadataProvider interface has these methods.

MethodDescription
GetMFMetadata

Gets a collection of metadata, either for an entire presentation, or for one stream in the presentation.

 

Examples

The following example shows how to get an IMFMetadata pointer from a media source.


HRESULT GetMetadata(
    IMFMediaSource *pSource, IMFMetadata **ppMetadata, DWORD dwStream = 0)
{
    IMFPresentationDescriptor *pPD = NULL;
    IMFMetadataProvider *pProvider = NULL;

    HRESULT hr = pSource->CreatePresentationDescriptor(&pPD);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = MFGetService(
        pSource, MF_METADATA_PROVIDER_SERVICE, IID_PPV_ARGS(&pProvider));

    if (FAILED(hr))
    {
        goto done;
    }

    hr = pProvider->GetMFMetadata(pPD, dwStream, 0, ppMetadata);

done:
    SafeRelease(&pPD);
    SafeRelease(&pProvider);
    return hr;
}


Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfidl.h

Library

Mfuuid.lib

See also

Media Foundation Interfaces
Media Metadata
Service Interfaces
IMFMetadata

 

 

Show:
© 2016 Microsoft