Export (0) Print
Expand All

IMFTranscodeProfile::SetAudioAttributes method

Sets audio stream configuration settings in the transcode profile.

To get a list of compatible audio media types supported by the Media Foundation transform (MFT) encoder , call MFTranscodeGetAudioOutputAvailableTypes. You can get the attributes that are set on the required media type and set them on the transcode profile. To set the audio attributes properly, create a new attribute store and copy the attribute store from the required media media type by calling IMFAttributes::CopyAllItems. This makes sure that the caller does not hold the references to the media type retrieved from the encoder. For example code, see MFCreateTranscodeProfile.


HRESULT SetAudioAttributes(
  [in]  IMFAttributes *pAttrs


pAttrs [in]

Pointer to the IMFAttributes interface of an attribute store that contains the configuration settings for the audio stream. The specified attribute values overwrite any existing values stored in the transcode profile.

The following audio attributes can be set:

To create the attribute store, call MFCreateAttributes. To set a specific attribute value in the attribute store, the caller must call the appropriate IMFAttributes methods depending on the data type of the attribute.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]



See also

Attributes in Media Foundation
Transcode API



Community Additions

© 2014 Microsoft