Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

MFCreateAlignedMemoryBuffer function

Allocates system memory with a specified byte alignment and creates a media buffer to manage the memory.

Syntax


HRESULT MFCreateAlignedMemoryBuffer(
  DWORD cbMaxLength,
  DWORD fAlignmentFlags,
  IMFMediaBuffer **ppBuffer
);

Parameters

cbMaxLength

Size of the buffer, in bytes.

fAlignmentFlags

Specifies the memory alignment for the buffer. Use one of the following constants.

ValueMeaning
MF_1_BYTE_ALIGNMENT
0x00000000

Align to 1 bytes.

MF_2_BYTE_ALIGNMENT
0x00000001

Align to 2 bytes.

MF_4_BYTE_ALIGNMENT
0x00000003

Align to 4 bytes.

MF_8_BYTE_ALIGNMENT
0x00000007

Align to 8 bytes.

MF_16_BYTE_ALIGNMENT
0x0000000F

Align to 16 bytes.

MF_32_BYTE_ALIGNMENT
0x0000001F

Align to 32 bytes.

MF_64_BYTE_ALIGNMENT
0x0000003F

Align to 64 bytes.

MF_128_BYTE_ALIGNMENT
0x0000007F

Align to 128 bytes.

MF_256_BYTE_ALIGNMENT
0x000000FF

Align to 256 bytes.

MF_512_BYTE_ALIGNMENT
0x000001FF

Align to 512 bytes.

 

ppBuffer

Receives a pointer to the IMFMediaBuffer interface of the media buffer. 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.

 

Remarks

When the media buffer object is destroyed, it releases the allocated memory.

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
MFCreateMemoryBuffer
Media Buffers

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.