Creates the sink writer from a media sink.
HRESULT MFCreateSinkWriterFromMediaSink(
IMFMediaSink *pMediaSink,
IMFAttributes *pAttributes,
IMFSinkWriter **ppSinkWriter
)
pMediaSink
Type: IMFMediaSink *
[in] Pointer to the IMFMediaSink interface of a media sink.
pAttributes
Type: IMFAttributes *
[in, optional] Pointer to the IMFAttributes interface. You can use this parameter to configure the sink writer. For more information, see Sink Writer Attributes. This parameter can be NULL.
ppSinkWriter
Type: IMFSinkWriter **
[out] Receives a pointer to the IMFSinkWriter interface. The caller must release the interface.
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Refer to Media Foundation return codes.
Call CoInitialize(Ex) and MFStartup before calling this function.
When you are done using the media sink, call the media sink’s IMFMediaSink::Shutdown method. (The sink writer does not shut down the media sink.) Release the sink writer before calling Shutdown on the media sink.
This function is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.
Header: Declared in mfreadwrite.h.
Library: Use Mfreadwrite.lib.