MFCreateFMPEG4MediaSink function (mfidl.h)

Creates a media sink for authoring fragmented MP4 files.

Syntax

HRESULT MFCreateFMPEG4MediaSink(
  [in]  IMFByteStream *pIByteStream,
  [in]  IMFMediaType  *pVideoMediaType,
  [in]  IMFMediaType  *pAudioMediaType,
  [out] IMFMediaSink  **ppIMediaSink
);

Parameters

[in] pIByteStream

A pointer to the IMFByteStream interface of a byte stream. The media sink writes the MP4 file to this byte stream. The byte stream must be writable and support seeking.

[in] pVideoMediaType

A pointer to the IMFMediaType interface of a video media type. This type specifies the format of the video stream.

This parameter can be NULL, but not if pAudioMediaType is NULL.

[in] pAudioMediaType

A pointer to the IMFMediaType interface of an audio media type. This type specifies the format of the audio stream.

This parameter can be NULL, but not if pVideoMediaType is NULL.

[out] ppIMediaSink

Receives a pointer to the MP4 media sink's 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.

Requirements

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

See also

Media Foundation Functions