Skip to content

Latest commit

 

History

History
79 lines (65 loc) · 3.68 KB

nn-mfobjects-imfsampleoutputstream.md

File metadata and controls

79 lines (65 loc) · 3.68 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NN:mfobjects.IMFSampleOutputStream
IMFSampleOutputStream (mfobjects.h)
Writes media samples to a byte stream.
IMFSampleOutputStream
IMFSampleOutputStream interface [Media Foundation]
IMFSampleOutputStream interface [Media Foundation]
described
mf.imfsampleoutputstream
mfobjects/IMFSampleOutputStream
mf\imfsampleoutputstream.htm
mf
BA293BB7-9191-4123-96DB-FF6386ABB3AE
12/05/2018
IMFSampleOutputStream, IMFSampleOutputStream interface [Media Foundation], IMFSampleOutputStream interface [Media Foundation],described, mf.imfsampleoutputstream, mfobjects/IMFSampleOutputStream
mfobjects.h
Mfidl.h
Windows
Windows 8 [desktop apps \| UWP apps]
Windows Server 2012 [desktop apps \| UWP apps]
Windows
19H1
IMFSampleOutputStream
mfobjects/IMFSampleOutputStream
c++
APIRef
kbSyntax
COM
mfobjects.h
IMFSampleOutputStream

IMFSampleOutputStream interface

-description

Writes media samples to a byte stream.

-inheritance

The IMFSampleOutputStream interface inherits from the IUnknown interface. IMFSampleOutputStream also has these types of members:

-remarks

A writable byte stream can optionally implement this interface.

This interface enables the caller to send media samples to the byte stream for writing, instead of using the IMFByteStream::BeginWrite method to write blobs of untyped data. The byte stream can use the information contained in the media sample to optimize how it writes the data. For example, a byte stream that sends media data over a network can optimize based on the time stamp.

To get a pointer to this interface, call QueryInterface on the byte stream object.

Any implementation of IMFByteStream that exposes IMFSampleOutputStream as an interface needs to honor the following requirements:

  • All writes from either interface always go to the exact same byte stream object.
  • The current position for both IMFSampleOutputStream and IMFByteStream shall always be the same. For example, writing to IMFSampleOutputStream will also update the current position of IMFByteStream.
  • Writing a sample using BeginWriteSample and EndWriteSample shall serialize the sample by writing the data from all the buffers in the sample, in the order in which the buffers are stored in the sample. (Use IMFSample::GetBufferByIndex to get the individual buffers by index value.) The total bytes copied shall be the number of bytes written from all the buffers.

-see-also

Media Foundation Interfaces