Redigera

Dela via


Buffer Object

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

A buffer object is used to hold samples and deliver them between the objects of the Windows Media Format SDK and your application. When you write a file, you pass your input samples to the writer using buffer objects. When you read a file, the reader object or synchronous reader object provides samples to your application in buffer objects.

For writing samples to a file, you can create a buffer object using the IWMWriter::AllocateSample method. For reading samples, the reader object and synchronous reader object both create buffer objects internally. If you choose to, you can allocate your own buffer objects for file reading by using IWMReaderAllocatorEx::AllocateForOutputEx or IWMReaderAllocatorEx::AllocateForStreamEx.

The following interfaces are supported by every buffer object.

Interface Description
INSSBuffer Controls and provides access to the buffer.
INSSBuffer2 Not implemented.
INSSBuffer3 Supports buffer properties, which are used for data unit extensions.
INSSBuffer4 Enumerates buffer properties.

 

Objects