public interface IMediaBuffer
The IMediaBuffer interface provides methods for manipulating a data buffer.
For more information, .
GetBufferAndLength(IntPtr ppBuffer, IntPtr validDataByteLength)
The GetBufferAndLength method retrieves the buffer and the size of the valid data in the buffer.
public abstract Int32 GetBufferAndLength(IntPtr ppBuffer, IntPtr validDataByteLength)
Parameters
ppBuffer
IntPtrAddress of a pointer that receives the buffer array. Can be Zero if validDataByteLength is not Zero.
validDataByteLength
IntPtrPointer to a variable that receives the size of the valid data, in bytes. Can be Zero if ppBuffer is not Zero.
Returns
HRESULT
GetMaxLength(Int32& length)
The GetMaxLength method retrieves the maximum number of bytes this buffer can hold.
public abstract Int32 GetMaxLength(Int32& length)
Parameters
length
Int32&A variable that receives the buffer's maximum size, in bytes.
Returns
HRESULT
SetLength(Int32 length)
The SetLength method specifies the length of the data currently in the buffer.
public abstract Int32 SetLength(Int32 length)
Parameters
length
Int32Size of the data, in bytes. The value must not exceed the buffer's maximum size. Call the GetMaxLength method to obtain the maximum size.
Returns
HRESULT