IMFCaptureSink2::SetOutputMediaType method (mfcaptureengine.h)
Dynamically sets the output media type of the record sink or preview sink.
Syntax
HRESULT SetOutputMediaType(
[in] DWORD dwStreamIndex,
[in] IMFMediaType *pMediaType,
[in] IMFAttributes *pEncodingAttributes
);
Parameters
[in] dwStreamIndex
The stream index to change the output media type on.
[in] pMediaType
The new output media type.
[in] pEncodingAttributes
The new encoder attributes. This can be null.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded |
|
The sink does not support the media type. |
Remarks
This is an asynchronous call. Listen to the MF_CAPTURE_ENGINE_OUTPUT_MEDIA_TYPE_SET event to be notified when the output media type has been set.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 [desktop apps only] |
Minimum supported server | Windows Server 2012 R2 [desktop apps only] |
Target Platform | Windows |
Header | mfcaptureengine.h |