Export (0) Print
Expand All
Expand Minimize

MFCreateLegacyMediaBufferOnMFMediaBuffer function

Converts a Media Foundation media buffer into a buffer that is compatible with DirectX Media Objects (DMOs).

Syntax


HRESULT MFCreateLegacyMediaBufferOnMFMediaBuffer(
  IMFSample *pIMFSample,
  IMFMediaBuffer *pIMFMediaBuffer,
  DWORD cbOffset,
  IMediaBuffer **ppIMediaBuffer
);

Parameters

pIMFSample

Pointer to the IMFSample interface of the sample that contains the Media Foundation buffer. This parameter can be NULL.

pIMFMediaBuffer

Pointer to the IMFMediaBuffer interface of the Media Foundation buffer.

cbOffset

Offset in bytes from the start of the Media Foundation buffer. This offset defines where the DMO buffer starts. If this parameter is zero, the DMO buffer starts at the beginning of the Media Foundation buffer.

ppIMediaBuffer

Receives a pointer to the IMediaBuffer interface. This interface is documented in the DirectShow SDK documentation. The caller must release the interface.

Return value

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The function succeeded.

E_INVALIDARG

Invalid argument. The pIMFMediaBuffer parameter must not be NULL.

 

Remarks

The DMO buffer created by this function also exposes the IMFSample interface. If pIMFSample is NULL, all of the IMFSample methods return MF_E_NOT_INITIALIZED. Otherwise, they call through to the pIMFSample pointer.

If the Media Foundation buffer specified by pIMFMediaBuffer exposes the IMF2DBuffer interface, the DMO buffer also exposes IMF2DBuffer.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

IMF2DBuffer
IMFMediaBuffer
IMFSample
Media Foundation Functions
Media Buffers

 

 

Community Additions

ADD
Show:
© 2014 Microsoft