MFCreateFMPEG4MediaSink function (mfidl.h)

Creates a media sink for authoring fragmented MP4 files.

Syntax

HRESULT MFCreateFMPEG4MediaSink(
  IMFByteStream *pIByteStream,
  IMFMediaType  *pVideoMediaType,
  IMFMediaType  *pAudioMediaType,
  IMFMediaSink  **ppIMediaSink
);

Parameters

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.

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.

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.

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

   
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