有没有人了解 VMR9SurfaceAllocationFlags
我初学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