MFCreateVideoSampleAllocatorEx 函数 (mfapi.h)

创建一个对象,该对象分配与 Microsoft DirectX 图形基础结构(DXGI)兼容的视频示例。

Syntax

HRESULT MFCreateVideoSampleAllocatorEx(
  [in]  REFIID riid,
  [out] void   **ppSampleAllocator
);

参数

[in] riid

要检索的接口的标识符。 指定以下值之一。

价值 Meaning
IID_IUnknown
检索 IUnknown 指针。
IID_IMFVideoSampleAllocator
检索 IMFVideoSampleAllocator 指针。
IID_IMFVideoSampleAllocatorEx
检索 IMFVideoSampleAllocatorEx 指针。
IID_IMFVideoSampleAllocatorCallback
检索 IMFVideoSampleAllocatorCallback 指针。

[out] ppSampleAllocator

接收指向所请求接口的指针。 调用方必须释放接口。

返回值

如果此函数成功,它将返回 S_OK。 否则,它将返回 HRESULT 错误代码。

注解

此函数为 DXGI 视频图面创建分配器。 此分配器创建的缓冲区公开 IMFDXGIBuffer 接口。 若要为 Microsoft Direct3D 9 视频图面创建分配器,请调用 MFCreateVideoSampleAllocator

要求

Requirement 价值
最低支持的客户端 Windows 8 [桌面应用 |UWP 应用]
支持的最低服务器 Windows Server 2012 [桌面应用 |UWP 应用]
目标平台 Windows操作系统
Header mfapi.h
Library Mfplat.lib
DLL Mfplat.dll

另请参阅

Media Foundation Functions