IMFMediaEngineSrcElements::GetMedia method (mfmediaengine.h)

Gets the intended media type of an element in the list.

Syntax

HRESULT GetMedia(
  [in]  DWORD index,
  [out] BSTR  *pMedia
);

Parameters

[in] index

The zero-based index of the source element. To get the number of source elements, call IMFMediaEngineSrcElements::GetLength.

[out] pMedia

Receives a BSTR that contains a media-query string. The caller must free the BSTR by calling SysFreeString. If no media type is set, this parameter receives the value NULL.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The string returned in pMedia should be a media-query string that conforms to the W3C Media Queries specification.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header mfmediaengine.h

See also

IMFMediaEngineSrcElements