MF_SA_BUFFERS_PER_SAMPLE attribute
Specifies how many buffers the video-sample allocator creates for each video sample.
UINT32
If you use the IMFVideoSampleAllocatorEx interface to allocate video samples, you can use this attribute to create video samples that contain multiple buffers. For example, if the attribute value is 2, the allocator creates two video buffers for each video sample. Set the attribute in the pAttributes parameter of the IMFVideoSampleAllocatorEx::InitializeSampleAllocatorEx method.
The default value is 1. If the attribute is not set, the allocator creates video samples that contain a single buffer per sample.
This attribute is primarily intended for Media Foundation transforms (MFTs) that support stereo 3D output, in the following situation:
- The MFT supports Microsoft DirectX Graphics Infrastructure (DXGI).
- The MFT allocates its own output samples.
- The MFT uses the IMFVideoSampleAllocatorEx interface to allocate the output samples.
- The 3D video format uses a separate buffer for each view.
If all of these criteria are true, the MFT should set the attribute value to 2 (one buffer per view).
Requirement | Value |
---|---|
Minimum supported client |
Windows 8 [desktop apps | UWP apps] |
Minimum supported server |
Windows Server 2012 [desktop apps | UWP apps] |
Header |
|