IMFSinkWriterEncoderConfig::SetTargetMediaType method
Dynamically changes the target media type that Sink Writer is encoding to.
Syntax
HRESULT SetTargetMediaType( [in] DWORD dwStreamIndex, [in] IMFMediaType *pTargetMediaType, [in] IMFAttributes *pEncodingParameters );
Parameters
- dwStreamIndex [in]
-
Specifies the stream index.
- pTargetMediaType [in]
-
The new media format to encode to.
- pEncodingParameters [in]
-
The new set of encoding parameters to configure the encoder with. If not specified, previously provided parameters will be used.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The new media type must be supported by the media sink being used and by the encoder MFTs installed on the system.
Requirements
|
Minimum supported client |
Windows 8.1 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 R2 [desktop apps | Windows Store apps] |
|
IDL |
|
See also