Gets the current media type for a stream.
public:
HRESULT GetCurrentMediaType(
DWORD dwStreamIndex,
IMFMediaType **ppMediaType
)
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.
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The method succeeded. |
| MF_E_INVALIDSTREAMNUMBER | The dwStreamIndex parameter is invalid. |
Refer to Media Foundation return codes.
This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.
Header: Declared in mfreadwrite.h.