有没有人了解 VMR9SurfaceAllocationFlags

chiwa737 2009-03-12 08:48:19
我初学directshow VMR9, 现在想调用VMR9 在renderless下调用 需要自己写 allocator presenter
其中一个函数如下

HRESULT CAllocator::InitializeDevice(
/* [in] */ DWORD_PTR dwUserID,
/* [in] */ VMR9AllocationInfo *lpAllocInfo,
/* [out][in] */ DWORD *lpNumBuffers),

函数中我需要设置lpAllocInfo->dwFlags, 但是我不太明白这些flag的根本区别。希望大家指点指点。

rendertarget 和 texturesurface的区别在那里 texturesurface也可以当rendertarget的啊
texturesurface和 offscreensurface的区别又在哪

DXVATarget好像还特殊, 如果设置好像和其他选项有冲突, 需要直接等于才不出错, 但是会单跳一个窗口 lpAllocInfo->dwFlags = VMR9AllocFlag_DXVATarget; 这个东西有什么别的特殊要求吗。

下面是msdn的文挡。

typedef enum {
VMR9AllocFlag_3DRenderTarget = 0x0001,
VMR9AllocFlag_DXVATarget = 0x0002,
VMR9AllocFlag_TextureSurface = 0x0004,
VMR9AllocFlag_OffscreenSurface = 0x0008,
VMR9AllocFlag_RGBDynamicSwitch = 0x0010,
VMR9AllocFlag_UsageReserved = 0x00E0,
VMR9AllocFlag_UsageMask = 0x00FF
} VMR9SurfaceAllocationFlags;
Constants

VMR9AllocFlag_3DRenderTarget
Indicates that the surface is a Direct3D render target.

VMR9AllocFlag_DXVATarget
Indicates that the render target supports DXVA.

VMR9AllocFlag_TextureSurface
Indicates that the target is a Direct3D texture surface.

VMR9AllocFlag_OffscreenSurface
Indicates an offscreen surface.

VMR9AllocFlag_RGBDynamicSwitch
In YUV mixing mode, indicates that the mixer can accept RGB formats in addition to the specified YUV format. The allocator-presenter can switch between the formats dynamically. This flag is only valid in YUV mixing mode.

VMR9AllocFlag_UsageReserved
Reserved for future use.

VMR9AllocFlag_UsageMask
Bitwise OR of all flags; not used by applications
...全文
65 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

19,469

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧