MFCreateAC3MediaSink function (mfidl.h)

Creates an instance of the AC-3 media sink.

Syntax

HRESULT MFCreateAC3MediaSink(
  [in]  IMFByteStream *pTargetByteStream,
  [in]  IMFMediaType  *pAudioMediaType,
  [out] IMFMediaSink  **ppMediaSink
);

Parameters

[in] pTargetByteStream

A pointer to the IMFByteStream interface of a byte stream. The media sink writes the AC-3 file to this byte stream. The byte stream must be writable.

[in] pAudioMediaType

A pointer to the IMFMediaType interface. This parameter specifies the media type for the AC-3 audio stream. The media type must contain the following attributes.

Attribute Value
MF_MT_MAJOR_TYPE MFMediaType_Audio
MF_MT_SUBTYPE MFAudioFormat_Dolby_AC3 or MFAudioFormat_Dolby_DDPlus

[out] ppMediaSink

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

Return value

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

Remarks

The AC-3 media sink takes compressed AC-3 audio as input and writes the audio to the byte stream without modification. The primary use for this media sink is to stream AC-3 audio over a network. The media sink does not perform AC-3 audio encoding.

Requirements

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

See also

Media Foundation Functions