Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

Mfreadwrite.idl

See also

IMFSinkWriterEncoderConfig
IMFSinkWriter
IMFSinkWriterEx

 

 

Show:
© 2017 Microsoft