IMFCaptureSource::GetCurrentDeviceMediaType method (mfcaptureengine.h)

Gets the current media type for a capture stream.

Syntax

HRESULT GetCurrentDeviceMediaType(
  [in]  DWORD        dwSourceStreamIndex,
  [out] IMFMediaType **ppMediaType
);

Parameters

[in] dwSourceStreamIndex

Specifies which stream to query. The value can be any of the following.

Value Meaning
0–0xFFFFFFFB
The zero-based index of a stream. To get the number of streams, call IMFCaptureSource::GetDeviceStreamCount.
MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM
0xFFFFFFFB
The first image stream.
MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM
0xFFFFFFFC
The first video stream.
MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM
0xFFFFFFFD
The first audio stream.

[out] ppMediaType

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

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
MF_E_INVALIDSTREAMNUMBER
The dwSourceStreamIndex parameter is invalid.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header mfcaptureengine.h

See also

IMFCaptureSource