Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
MFCreateAlignedMemoryBuffer function (mfapi.h)
Allocates system memory with a specified byte alignment and creates a media buffer to manage the memory.
Syntax
HRESULT MFCreateAlignedMemoryBuffer(
DWORD cbMaxLength,
DWORD cbAligment,
IMFMediaBuffer **ppBuffer
);
Parameters
cbMaxLength
Size of the buffer, in bytes.
cbAligment
Specifies the memory alignment for the buffer. Use one of the following constants.
| Value | Meaning |
|---|---|
|
Align to 1 bytes. |
|
Align to 2 bytes. |
|
Align to 4 bytes. |
|
Align to 8 bytes. |
|
Align to 16 bytes. |
|
Align to 32 bytes. |
|
Align to 64 bytes. |
|
Align to 128 bytes. |
|
Align to 256 bytes. |
|
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 code | Description |
|---|---|
|
The function succeeded. |
Remarks
When the media buffer object is destroyed, it releases the allocated memory.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps | UWP apps] |
| Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
| Target Platform | Windows |
| Header | mfapi.h |
| Library | Mfplat.lib |
| DLL | Mfplat.dll |
See also
Feedback
Was this page helpful?
