Freigeben über


IMFMediaBuffer Interface

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

Mitglieder

IMFMediaBufferSchnittstelle erbt von der IUnknown-Schnittstelle. IMFMediaBuffer umfasst auch die folgenden Typen von Mitgliedern:

  • Methoden

Methoden

IMFMediaBufferSchnittstelle umfasst die folgenden Methoden.

Methode Beschreibung
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.

 

Hinweise

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.

Function Description
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 mit Service Pack 2 (SP2) und höher.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (Oktober 2006 Updaterollup für Windows XP Media Center Edition) installed.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Mfobjects.h (include Mfidl.h)

Bibliothek

Mfuuid.lib

Siehe auch

Media Foundation Interfaces

Media Buffers