IMFSinkWriter::AddStream method (mfreadwrite.h)

Adds a stream to the sink writer.

Syntax

HRESULT AddStream(
  [in]  IMFMediaType *pTargetMediaType,
  [out] DWORD        *pdwStreamIndex
);

Parameters

[in] pTargetMediaType

A pointer to the IMFMediaType interface of a media type. This media type specifies the format of the samples that will be written to the file. It does not need to match the input format. To set the input format, call IMFSinkWriter::SetInputMediaType.

[out] pdwStreamIndex

Receives the zero-based index of the new stream.

Return value

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

Remarks

This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header mfreadwrite.h

See also

IMFSinkWriter

Sink Writer