Freigeben über


IMediaBuffer interface (mediaobj.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IMediaBuffer interface provides methods for manipulating a data buffer. Buffers passed to the IMediaObject::ProcessInput and ProcessOutput methods must implement this interface.

Inheritance

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

Methods

The IMediaBuffer interface has these methods.

 
IMediaBuffer::GetBufferAndLength

The GetBufferAndLength method retrieves the buffer and the size of the valid data in the buffer.
IMediaBuffer::GetMaxLength

The GetMaxLength method retrieves the maximum number of bytes this buffer can hold.
IMediaBuffer::SetLength

The SetLength method specifies the length of the data currently in the buffer.

Requirements

Requirement Value
Target Platform Windows
Header mediaobj.h (include Dmo.h)

See also

Implementing IMediaBuffer