IMFSampleAllocatorControl::SetDefaultAllocator method (mfidl.h)

Sets the default sample allocator to use for the specified output stream.

Syntax

HRESULT SetDefaultAllocator(
  DWORD    dwOutputStreamID,
  IUnknown *pAllocator
);

Parameters

dwOutputStreamID

The ID of the output stream that the pAllocator parameter applies to.

pAllocator

Receives a pointer to a sample allocator to use for the specified output stream. The allocator supports one of the MF allocator interfaces, such as IMFVideoCaptureSampleAllocator or IMFVideoSampleAllocatorEx.

Return value

The method returns an HRESULT.

Remarks

The system calls this method to provide components with a sample allocator that allows the component to allocate samples using memory that is accessible from within a container.

Components that use the provided allocator should return MFSampleAllocatorUsage_UsesProvidedAllocator from calls to IMFSampleAllocatorControl::GetAllocatorUsage.

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004 (10.0; Build 19041)
Minimum supported server Windows Server, version 2004 (10.0; Build 19041)
Header mfidl.h
DLL mfuuid.dll