IMFMediaBuffer interface

Represents a block of memory that contains media data. Use this interface to access the data in the buffer.

Members

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

Methods

The IMFMediaBuffer interface has these methods.

MethodDescription
GetCurrentLength

Retrieves the length of the valid data in the buffer.

GetMaxLength

Retrieves the allocated size of the buffer.

Lock

Gives the caller access to the memory in the buffer.

SetCurrentLength

Sets the length of the valid data in the buffer.

Unlock

Unlocks a buffer that was previously locked.

 

Remarks

If the buffer contains 2-D image data (such as an uncompressed video frame), you should query the buffer for the IMF2DBuffer interface. The methods on IMF2DBuffer are optimized for 2-D data.

To get a buffer from a media sample, call one of the following IMFSample methods:

To create a new buffer object, use one of the following functions.

FunctionDescription
MFCreateMemoryBuffer Creates a buffer and allocates system memory.
MFCreateMediaBufferWrapper Creates a media buffer that wraps an existing media buffer.
MFCreateDXSurfaceBuffer Creates a buffer that manages a DirectX surface.
MFCreateAlignedMemoryBuffer Creates a buffer and allocates system memory with a specified alignment.

 

This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:

  • Windows XP with Service Pack 2 (SP2) and later.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (October 2006 Update Rollup for Windows XP Media Center Edition) installed.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfobjects.h (include Mfidl.h)

Library

Mfuuid.lib

See also

Media Foundation Interfaces
Media Buffers

 

 

Community Additions

ADD
Show:
© 2014 Microsoft