IMFSinkWriter::AddStream method

Adds a stream to the sink writer.

Syntax


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

Parameters

pTargetMediaType [in]

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.

pdwStreamIndex [out]

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

Minimum supported client

Windows 7, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

Mfreadwrite.h

See also

Sink Writer
IMFSinkWriter

 

 

Show: