IMFSourceReader::GetCurrentMediaType Method

Gets the current media type for a stream.

Syntax

public:
HRESULT GetCurrentMediaType(
         DWORD dwStreamIndex,
         IMFMediaType **ppMediaType
)  

Parameters

dwStreamIndex
Type: DWORD 

[in] The stream to query. The value can be any of the following.

ppMediaType
Type: IMFMediaType **

[out] Receives a pointer to the IMFMediaType interface. The caller must release the interface.

Return value

Type: HRESULT 

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codes
Return code Description
S_OK The method succeeded.
MF_E_INVALIDSTREAMNUMBER The dwStreamIndex parameter is invalid.

Refer to Media Foundation return codes.

Remarks

This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.

Requirements

Header: Declared in mfreadwrite.h.