1*c2c66affSColin Finck/* 2*c2c66affSColin Finck * Copyright 2008 Maarten Lankhorst 3*c2c66affSColin Finck * 4*c2c66affSColin Finck * This library is free software; you can redistribute it and/or 5*c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public 6*c2c66affSColin Finck * License as published by the Free Software Foundation; either 7*c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version. 8*c2c66affSColin Finck * 9*c2c66affSColin Finck * This library is distributed in the hope that it will be useful, 10*c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12*c2c66affSColin Finck * Lesser General Public License for more details. 13*c2c66affSColin Finck * 14*c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public 15*c2c66affSColin Finck * License along with this library; if not, write to the Free Software 16*c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17*c2c66affSColin Finck */ 18*c2c66affSColin Finck 19*c2c66affSColin Finckimport "unknwn.idl"; 20*c2c66affSColin Finck 21*c2c66affSColin Finckcpp_quote("#if 0") 22*c2c66affSColin Finckinterface IDirect3DSurface9; 23*c2c66affSColin Finckinterface IDirect3DDevice9; 24*c2c66affSColin Fincktypedef LONGLONG REFERENCE_TIME; 25*c2c66affSColin Fincktypedef DWORD D3DFORMAT; 26*c2c66affSColin Fincktypedef DWORD D3DPOOL; 27*c2c66affSColin Fincktypedef HANDLE HMONITOR; 28*c2c66affSColin Fincktypedef struct { char dummy; } AM_MEDIA_TYPE; 29*c2c66affSColin Fincktypedef struct { char dummy; } D3DCOLOR; 30*c2c66affSColin Finckcpp_quote("#endif") 31*c2c66affSColin Finck 32*c2c66affSColin Finckinterface IVMRSurface9; 33*c2c66affSColin Finckinterface IVMRSurfaceAllocator9; 34*c2c66affSColin Finckinterface IVMRSurfaceAllocatorEx9; 35*c2c66affSColin Finckinterface IVMRSurfaceAllocatorNotify9; 36*c2c66affSColin Finckinterface IVMRImagePresenter9; 37*c2c66affSColin Finckinterface IVMRImagePresenterConfig9; 38*c2c66affSColin Finckinterface IVMRMonitorConfig9; 39*c2c66affSColin Finckinterface IVMRWindowlessControl9; 40*c2c66affSColin Finckinterface IVMRMixerControl9; 41*c2c66affSColin Finckinterface IVMRImageCompositor9; 42*c2c66affSColin Finckinterface IVMRMixerBitmap9; 43*c2c66affSColin Finckinterface IVMRFilterConfig9; 44*c2c66affSColin Finckinterface IVMRAspectRatioControl9; 45*c2c66affSColin Finckinterface IVMRVideoStreamControl9; 46*c2c66affSColin Finck 47*c2c66affSColin Fincktypedef enum _VMR9PresentationFlags 48*c2c66affSColin Finck{ 49*c2c66affSColin Finck VMR9Sample_SyncPoint = 0x1, 50*c2c66affSColin Finck VMR9Sample_Preroll = 0x2, 51*c2c66affSColin Finck VMR9Sample_Discontinuity = 0x4, 52*c2c66affSColin Finck VMR9Sample_TimeValid = 0x8, 53*c2c66affSColin Finck VMR9Sample_SrcDstRectsValid = 0x10 54*c2c66affSColin Finck} VMR9PresentationFlags; 55*c2c66affSColin Finck 56*c2c66affSColin Fincktypedef struct _VMR9PresentationInfo 57*c2c66affSColin Finck{ 58*c2c66affSColin Finck DWORD dwFlags; /* Flags defined above */ 59*c2c66affSColin Finck IDirect3DSurface9 *lpSurf; 60*c2c66affSColin Finck REFERENCE_TIME rtStart; 61*c2c66affSColin Finck REFERENCE_TIME rtEnd; 62*c2c66affSColin Finck SIZE szAspectRatio; 63*c2c66affSColin Finck RECT rcSrc; 64*c2c66affSColin Finck RECT rcDst; 65*c2c66affSColin Finck DWORD dwReserved1; 66*c2c66affSColin Finck DWORD dwReserved2; 67*c2c66affSColin Finck} VMR9PresentationInfo; 68*c2c66affSColin Finck 69*c2c66affSColin Finck[ 70*c2c66affSColin Finck local, 71*c2c66affSColin Finck object, 72*c2c66affSColin Finck uuid(69188c61-12a3-40f0-8ffc-342e7b433fd7), 73*c2c66affSColin Finck helpstring("IVMRImagePresenter9 interface"), 74*c2c66affSColin Finck pointer_default(unique) 75*c2c66affSColin Finck] 76*c2c66affSColin Finckinterface IVMRImagePresenter9 : IUnknown 77*c2c66affSColin Finck{ 78*c2c66affSColin Finck HRESULT StartPresenting([in] DWORD_PTR id); 79*c2c66affSColin Finck HRESULT StopPresenting([in] DWORD_PTR id); 80*c2c66affSColin Finck HRESULT PresentImage([in] DWORD_PTR id, [in] VMR9PresentationInfo *info); 81*c2c66affSColin Finck}; 82*c2c66affSColin Finck 83*c2c66affSColin Fincktypedef enum _VMR9SurfaceAllocationFlags 84*c2c66affSColin Finck{ 85*c2c66affSColin Finck VMR9AllocFlag_3DRenderTarget = 0x1, 86*c2c66affSColin Finck VMR9AllocFlag_DXVATarget = 0x2, 87*c2c66affSColin Finck VMR9AllocFlag_TextureSurface = 0x4, 88*c2c66affSColin Finck VMR9AllocFlag_OffscreenSurface = 0x8, 89*c2c66affSColin Finck VMR9AllocFlag_RGBDynamicSwitch = 0x10, 90*c2c66affSColin Finck VMR9AllocFlag_UsageReserved = 0xe0, 91*c2c66affSColin Finck VMR9AllocFlag_UsageMask = 0xff, 92*c2c66affSColin Finck} VMR9SurfaceAllocationFlags; 93*c2c66affSColin Finck 94*c2c66affSColin Fincktypedef struct _VMR9AllocationInfo 95*c2c66affSColin Finck{ 96*c2c66affSColin Finck DWORD dwFlags; /* Flags defined above */ 97*c2c66affSColin Finck DWORD dwWidth; 98*c2c66affSColin Finck DWORD dwHeight; 99*c2c66affSColin Finck D3DFORMAT Format; 100*c2c66affSColin Finck D3DPOOL Pool; 101*c2c66affSColin Finck DWORD MinBuffers; 102*c2c66affSColin Finck SIZE szAspectRatio; 103*c2c66affSColin Finck SIZE szNativeSize; 104*c2c66affSColin Finck} VMR9AllocationInfo; 105*c2c66affSColin Finck 106*c2c66affSColin Finck[ 107*c2c66affSColin Finck local, 108*c2c66affSColin Finck object, 109*c2c66affSColin Finck uuid(8d5148ea-3f5d-46cf-9df1-d1b896eedb1f), 110*c2c66affSColin Finck helpstring("IVMRSurfaceAllocator9 interface"), 111*c2c66affSColin Finck pointer_default(unique) 112*c2c66affSColin Finck] 113*c2c66affSColin Finckinterface IVMRSurfaceAllocator9 : IUnknown 114*c2c66affSColin Finck{ 115*c2c66affSColin Finck HRESULT InitializeDevice([in] DWORD_PTR id, [in] VMR9AllocationInfo *allocinfo, [in, out] DWORD *numbuffers); 116*c2c66affSColin Finck HRESULT TerminateDevice([in] DWORD_PTR id); 117*c2c66affSColin Finck HRESULT GetSurface([in] DWORD_PTR id, [in] DWORD surfaceindex, [in] DWORD flags, [out] IDirect3DSurface9 **surface); 118*c2c66affSColin Finck HRESULT AdviseNotify([in] IVMRSurfaceAllocatorNotify9 *allocnotify); 119*c2c66affSColin Finck}; 120*c2c66affSColin Finck 121*c2c66affSColin Finck[ 122*c2c66affSColin Finck local, 123*c2c66affSColin Finck object, 124*c2c66affSColin Finck uuid(6de9a68a-a928-4522-bf57-655ae3866456), 125*c2c66affSColin Finck helpstring("IVMRSurfaceAllocatorEx9 interface"), 126*c2c66affSColin Finck pointer_default(unique) 127*c2c66affSColin Finck] 128*c2c66affSColin Finckinterface IVMRSurfaceAllocatorEx9 : IVMRSurfaceAllocator9 129*c2c66affSColin Finck{ 130*c2c66affSColin Finck HRESULT GetSurfaceEx([in] DWORD_PTR id, [in] DWORD surfaceindex, [in] DWORD flags, [out] IDirect3DSurface9 **surface, [out] RECT *dest); 131*c2c66affSColin Finck}; 132*c2c66affSColin Finck 133*c2c66affSColin Finck[ 134*c2c66affSColin Finck local, 135*c2c66affSColin Finck object, 136*c2c66affSColin Finck uuid(dca3f5df-bb3a-4d03-bd81-84614bfbfa0c), 137*c2c66affSColin Finck helpstring("IVMRSurfaceAllocatorNotify9 interface"), 138*c2c66affSColin Finck pointer_default(unique) 139*c2c66affSColin Finck] 140*c2c66affSColin Finckinterface IVMRSurfaceAllocatorNotify9 : IUnknown 141*c2c66affSColin Finck{ 142*c2c66affSColin Finck HRESULT AdviseSurfaceAllocator([in] DWORD_PTR id, [in] IVMRSurfaceAllocator9 *alloc); 143*c2c66affSColin Finck HRESULT SetD3DDevice([in] IDirect3DDevice9 *device, [in] HMONITOR monitor); 144*c2c66affSColin Finck HRESULT ChangeD3DDevice([in] IDirect3DDevice9 *device, [in] HMONITOR monitor); 145*c2c66affSColin Finck HRESULT AllocateSurfaceHelper([in] VMR9AllocationInfo *allocinfo, [in, out] DWORD *numbuffers, [out] IDirect3DSurface9 **surface); 146*c2c66affSColin Finck HRESULT NotifyEvent([in] LONG code, [in] LONG_PTR param1, [in] LONG_PTR param2); 147*c2c66affSColin Finck}; 148*c2c66affSColin Finck 149*c2c66affSColin Fincktypedef enum _VMR9AspectRatioMode 150*c2c66affSColin Finck{ 151*c2c66affSColin Finck VMR9ARMode_None, 152*c2c66affSColin Finck VMR9ARMode_LetterBox 153*c2c66affSColin Finck} VMR9AspectRatioMode; 154*c2c66affSColin Finck 155*c2c66affSColin Finck[ 156*c2c66affSColin Finck local, 157*c2c66affSColin Finck object, 158*c2c66affSColin Finck uuid(8f537d09-f85e-4414-b23b-502e54c79927), 159*c2c66affSColin Finck helpstring("IVMRWindowlessControl interface"), 160*c2c66affSColin Finck pointer_default(unique) 161*c2c66affSColin Finck] 162*c2c66affSColin Finckinterface IVMRWindowlessControl9 : IUnknown 163*c2c66affSColin Finck{ 164*c2c66affSColin Finck HRESULT GetNativeVideoSize([out] LONG *width, [out] LONG *height, [out] LONG *arwidth, [out] LONG *arheight); 165*c2c66affSColin Finck HRESULT GetMinIdealVideoSize([out] LONG *width, [out] LONG *height); 166*c2c66affSColin Finck HRESULT GetMaxIdealVideoSize([out] LONG *width, [out] LONG *height); 167*c2c66affSColin Finck HRESULT SetVideoPosition([in] const RECT *source, [in] const RECT *dest); 168*c2c66affSColin Finck HRESULT GetVideoPosition([out] RECT *source, [out] RECT *dest); 169*c2c66affSColin Finck HRESULT GetAspectRatioMode([out] DWORD *mode); 170*c2c66affSColin Finck HRESULT SetAspectRatioMode([in] DWORD mode); 171*c2c66affSColin Finck HRESULT SetVideoClippingWindow([in] HWND hwnd); 172*c2c66affSColin Finck HRESULT RepaintVideo([in] HWND hwnd, [in] HDC hdc); 173*c2c66affSColin Finck HRESULT DisplayModeChanged(); 174*c2c66affSColin Finck HRESULT GetCurrentImage([out] BYTE **dib); 175*c2c66affSColin Finck HRESULT SetBorderColor([in] COLORREF color); 176*c2c66affSColin Finck HRESULT GetBorderColor([out] COLORREF *color); 177*c2c66affSColin Finck}; 178*c2c66affSColin Finck 179*c2c66affSColin Fincktypedef enum _VMR9MixerPrefs 180*c2c66affSColin Finck{ 181*c2c66affSColin Finck /* Decimation */ 182*c2c66affSColin Finck MixerPref9_NoDecimation = 0x1, 183*c2c66affSColin Finck MixerPref9_DecimateOutput = 0x2, 184*c2c66affSColin Finck MixerPref9_ARAdjustXorY = 0x4, 185*c2c66affSColin Finck MixerPref9_NonSquareMixing = 0x8, 186*c2c66affSColin Finck MixerPref9_DecimateMask = 0xf, 187*c2c66affSColin Finck 188*c2c66affSColin Finck /* Filtering */ 189*c2c66affSColin Finck MixerPref9_BiLinearFiltering = 0x10, 190*c2c66affSColin Finck MixerPref9_PointFiltering = 0x20, 191*c2c66affSColin Finck MixerPref9_AnisotropicFiltering = 0x40, 192*c2c66affSColin Finck MixerPref9_PyramidalQuadFiltering = 0x80, 193*c2c66affSColin Finck MixerPref9_GaussianQuadFiltering = 0x100, 194*c2c66affSColin Finck MixerPref9_FilteringReserved = 0xe00, 195*c2c66affSColin Finck MixerPref9_FilteringMask = 0xff0, 196*c2c66affSColin Finck 197*c2c66affSColin Finck /* Render target */ 198*c2c66affSColin Finck MixerPref9_RenderTargetRGB = 0x1000, 199*c2c66affSColin Finck MixerPref9_RenderTargetYUV = 0x2000, 200*c2c66affSColin Finck MixerPref9_RenderTargetReserved = 0xfc000, 201*c2c66affSColin Finck 202*c2c66affSColin Finck MixerPref9_DynamicSwitchToBOB = 0x100000, 203*c2c66affSColin Finck MixerPref9_DynamicDecimateBy2 = 0x200000, 204*c2c66affSColin Finck MixerPref9_DynamicReserved = 0xc00000, 205*c2c66affSColin Finck MixerPref9_DynamicMask = 0xf00000, 206*c2c66affSColin Finck} VMR9MixerPrefs; 207*c2c66affSColin Finck 208*c2c66affSColin Fincktypedef struct _VMR9NormalizedRect 209*c2c66affSColin Finck{ 210*c2c66affSColin Finck FLOAT left; 211*c2c66affSColin Finck FLOAT top; 212*c2c66affSColin Finck FLOAT right; 213*c2c66affSColin Finck FLOAT bottom; 214*c2c66affSColin Finck} VMR9NormalizedRect; 215*c2c66affSColin Finck 216*c2c66affSColin Fincktypedef enum _VMR9ProcAmpControlFlags 217*c2c66affSColin Finck{ 218*c2c66affSColin Finck ProcAmpControl9_Brightness = 0x1, 219*c2c66affSColin Finck ProcAmpControl9_Contrast = 0x2, 220*c2c66affSColin Finck ProcAmpControl9_Hue = 0x4, 221*c2c66affSColin Finck ProcAmpControl9_Saturation = 0x8, 222*c2c66affSColin Finck ProcAmpControl9_Mask = 0xf 223*c2c66affSColin Finck} VMR9ProcAmpControlFlags; 224*c2c66affSColin Finck 225*c2c66affSColin Fincktypedef struct _VMR9ProcAmpControl 226*c2c66affSColin Finck{ 227*c2c66affSColin Finck DWORD dwSize; 228*c2c66affSColin Finck DWORD dwFlags; 229*c2c66affSColin Finck FLOAT Brightness; 230*c2c66affSColin Finck FLOAT Contrast; 231*c2c66affSColin Finck FLOAT Hue; 232*c2c66affSColin Finck FLOAT Saturation; 233*c2c66affSColin Finck} VMR9ProcAmpControl; 234*c2c66affSColin Finck 235*c2c66affSColin Fincktypedef struct _VMR9ProcAmpControlRange 236*c2c66affSColin Finck{ 237*c2c66affSColin Finck DWORD dwSize; 238*c2c66affSColin Finck VMR9ProcAmpControlFlags dwProperty; 239*c2c66affSColin Finck FLOAT MinValue; 240*c2c66affSColin Finck FLOAT MaxValue; 241*c2c66affSColin Finck FLOAT DefaultValue; 242*c2c66affSColin Finck FLOAT StepSize; 243*c2c66affSColin Finck} VMR9ProcAmpControlRange; 244*c2c66affSColin Finck 245*c2c66affSColin Finck[ 246*c2c66affSColin Finck local, 247*c2c66affSColin Finck object, 248*c2c66affSColin Finck uuid(1a777eaa-47c8-4930-b2c9-8fee1c1b0f3b), 249*c2c66affSColin Finck helpstring("IVMRMixerControl9 interface"), 250*c2c66affSColin Finck pointer_default(unique) 251*c2c66affSColin Finck] 252*c2c66affSColin Finckinterface IVMRMixerControl9 : IUnknown 253*c2c66affSColin Finck{ 254*c2c66affSColin Finck HRESULT SetAlpha([in] DWORD streamid, [in] FLOAT alpha); 255*c2c66affSColin Finck HRESULT GetAlpha([in] DWORD streamid, [out] FLOAT *alpha); 256*c2c66affSColin Finck HRESULT SetZOrder([in] DWORD streamid, [in] DWORD zorder); 257*c2c66affSColin Finck HRESULT GetZOrder([in] DWORD streamid, [out] DWORD *zorder); 258*c2c66affSColin Finck HRESULT SetOutputRect([in] DWORD streamid, [in] const VMR9NormalizedRect *rect); 259*c2c66affSColin Finck HRESULT GetOutputRect([in] DWORD streamid, [out] VMR9NormalizedRect *rect); 260*c2c66affSColin Finck HRESULT SetBackgroundClr([in] COLORREF back); 261*c2c66affSColin Finck HRESULT GetBackgroundClr([out] COLORREF *back); 262*c2c66affSColin Finck HRESULT SetMixingPrefs([in] DWORD mixingprefs); 263*c2c66affSColin Finck HRESULT GetMixingPrefs([out] DWORD *mixingprefs); 264*c2c66affSColin Finck HRESULT SetProcAmpControl([in] DWORD streamid, [in] VMR9ProcAmpControl *control); 265*c2c66affSColin Finck HRESULT GetProcAmpControl([in] DWORD streamid, [in, out] VMR9ProcAmpControl *control); 266*c2c66affSColin Finck HRESULT GetProcAmpControlRange([in] DWORD streamid, [in, out] VMR9ProcAmpControlRange *controlrange); 267*c2c66affSColin Finck}; 268*c2c66affSColin Finck 269*c2c66affSColin Fincktypedef struct _VMR9AlphaBitmap 270*c2c66affSColin Finck{ 271*c2c66affSColin Finck DWORD dwFlags; 272*c2c66affSColin Finck HDC hdc; 273*c2c66affSColin Finck IDirect3DSurface9 *pDDS; 274*c2c66affSColin Finck RECT rSrc; 275*c2c66affSColin Finck VMR9NormalizedRect *rDest; 276*c2c66affSColin Finck FLOAT fAlpha; 277*c2c66affSColin Finck COLORREF clrSrcKey; 278*c2c66affSColin Finck DWORD dwFilterMode; 279*c2c66affSColin Finck} VMR9AlphaBitmap; 280*c2c66affSColin Finck 281*c2c66affSColin Fincktypedef enum _VMR9AlphaBitmapFlags 282*c2c66affSColin Finck{ 283*c2c66affSColin Finck VMR9AlphaBitmap_Disable = 0x1, 284*c2c66affSColin Finck VMR9AlphaBitmap_hDC = 0x2, 285*c2c66affSColin Finck VMR9AlphaBitmap_EntireDDS = 0x4, 286*c2c66affSColin Finck VMR9AlphaBitmap_SrcColorKey = 0x8, 287*c2c66affSColin Finck VMR9AlphaBitmap_SrcRect = 0x10, 288*c2c66affSColin Finck VMR9AlphaBitmap_FilterMode = 0x20 289*c2c66affSColin Finck} VMR9AlphaBitmapFlags; 290*c2c66affSColin Finck 291*c2c66affSColin Finck[ 292*c2c66affSColin Finck local, 293*c2c66affSColin Finck object, 294*c2c66affSColin Finck uuid(ced175e5-1935-4820-81bd-ff6ad00c9108), 295*c2c66affSColin Finck helpstring("IVMRMixerBitmap interface"), 296*c2c66affSColin Finck pointer_default(unique) 297*c2c66affSColin Finck] 298*c2c66affSColin Finckinterface IVMRMixerBitmap9 : IUnknown 299*c2c66affSColin Finck{ 300*c2c66affSColin Finck HRESULT SetAlphaBitmap([in] const VMR9AlphaBitmap *bitmap); 301*c2c66affSColin Finck HRESULT UpdateAlphaBitmapParameters([in] const VMR9AlphaBitmap *bitmap); 302*c2c66affSColin Finck HRESULT GetAlphaBitmapParameters([out] VMR9AlphaBitmap *bitmap); 303*c2c66affSColin Finck}; 304*c2c66affSColin Finck 305*c2c66affSColin Finck[ 306*c2c66affSColin Finck local, 307*c2c66affSColin Finck object, 308*c2c66affSColin Finck uuid(dfc581a1-6e1f-4c3a-8d0a-5e9792ea2afc), 309*c2c66affSColin Finck helpstring("IVMRSurface interface"), 310*c2c66affSColin Finck pointer_default(unique) 311*c2c66affSColin Finck] 312*c2c66affSColin Finckinterface IVMRSurface9 : IUnknown 313*c2c66affSColin Finck{ 314*c2c66affSColin Finck HRESULT IsSurfaceLocked(); 315*c2c66affSColin Finck HRESULT LockSurface([out] BYTE **surface); 316*c2c66affSColin Finck HRESULT UnlockSurface(); 317*c2c66affSColin Finck HRESULT GetSurface([out] IDirect3DSurface9 **surface); 318*c2c66affSColin Finck}; 319*c2c66affSColin Finck 320*c2c66affSColin Fincktypedef enum _VMR9RenderPrefs 321*c2c66affSColin Finck{ 322*c2c66affSColin Finck RenderPrefs9_DoNotRenderBorder = 0x1, 323*c2c66affSColin Finck RenderPrefs9_Mask = 0x1 324*c2c66affSColin Finck} VMR9RenderPrefs; 325*c2c66affSColin Finck 326*c2c66affSColin Finck[ 327*c2c66affSColin Finck local, 328*c2c66affSColin Finck object, 329*c2c66affSColin Finck uuid(45c15cab-6e22-420a-8043-ae1f0ac02c7d), 330*c2c66affSColin Finck helpstring("IVMRImagePresenterConfig9 interface"), 331*c2c66affSColin Finck pointer_default(unique) 332*c2c66affSColin Finck] 333*c2c66affSColin Finckinterface IVMRImagePresenterConfig9 : IUnknown 334*c2c66affSColin Finck{ 335*c2c66affSColin Finck HRESULT SetRenderingPrefs([in] DWORD renderflags); 336*c2c66affSColin Finck HRESULT GetRenderingPrefs([out] DWORD *renderflags); 337*c2c66affSColin Finck}; 338*c2c66affSColin Finck 339*c2c66affSColin Finck[ 340*c2c66affSColin Finck local, 341*c2c66affSColin Finck object, 342*c2c66affSColin Finck uuid(d0cfe38b-93e7-4772-8957-0400c49a4485), 343*c2c66affSColin Finck helpstring("IVMRMixerStreamConfig interface"), 344*c2c66affSColin Finck pointer_default(unique) 345*c2c66affSColin Finck] 346*c2c66affSColin Finckinterface IVMRVideoStreamControl9: IUnknown 347*c2c66affSColin Finck{ 348*c2c66affSColin Finck HRESULT SetStreamActiveState([in] BOOL active); 349*c2c66affSColin Finck HRESULT GetStreamActiveState([out] BOOL *active); 350*c2c66affSColin Finck}; 351*c2c66affSColin Finck 352*c2c66affSColin Fincktypedef enum _VMR9Mode 353*c2c66affSColin Finck{ 354*c2c66affSColin Finck VMR9Mode_Windowed = 0x1, 355*c2c66affSColin Finck VMR9Mode_Windowless = 0x2, 356*c2c66affSColin Finck VMR9Mode_Renderless = 0x4, 357*c2c66affSColin Finck VMR9Mode_Mask = 0x7 358*c2c66affSColin Finck} VMR9Mode; 359*c2c66affSColin Finck 360*c2c66affSColin Finck[ 361*c2c66affSColin Finck local, 362*c2c66affSColin Finck object, 363*c2c66affSColin Finck uuid(5a804648-4f66-4867-9c43-4f5c822cf1b8), 364*c2c66affSColin Finck helpstring("IVMRFilterConfig9 interface"), 365*c2c66affSColin Finck pointer_default(unique) 366*c2c66affSColin Finck] 367*c2c66affSColin Finckinterface IVMRFilterConfig9 : IUnknown 368*c2c66affSColin Finck{ 369*c2c66affSColin Finck HRESULT SetImageCompositor([in] IVMRImageCompositor9 *compositor); 370*c2c66affSColin Finck HRESULT SetNumberOfStreams([in] DWORD max); 371*c2c66affSColin Finck HRESULT GetNumberOfStreams([out] DWORD *max); 372*c2c66affSColin Finck HRESULT SetRenderingPrefs([in] DWORD renderflags); 373*c2c66affSColin Finck HRESULT GetRenderingPrefs([out] DWORD *renderflags); 374*c2c66affSColin Finck HRESULT SetRenderingMode([in] DWORD mode); 375*c2c66affSColin Finck HRESULT GetRenderingMode([out] DWORD *mode); 376*c2c66affSColin Finck}; 377*c2c66affSColin Finck 378*c2c66affSColin Finck[ 379*c2c66affSColin Finck local, 380*c2c66affSColin Finck object, 381*c2c66affSColin Finck uuid(00d96c29-bbde-4efc-9901-bb5036392146), 382*c2c66affSColin Finck helpstring("IVMRAspectRatioControl9 interface"), 383*c2c66affSColin Finck pointer_default(unique) 384*c2c66affSColin Finck] 385*c2c66affSColin Finckinterface IVMRAspectRatioControl9 : IUnknown 386*c2c66affSColin Finck{ 387*c2c66affSColin Finck HRESULT GetAspectRatioMode([out] DWORD *mode); 388*c2c66affSColin Finck HRESULT SetAspectRatioMode([in] DWORD mode); 389*c2c66affSColin Finck} 390*c2c66affSColin Finck 391*c2c66affSColin Finck#define VMR9DEVICENAMELEN 32 392*c2c66affSColin Finck#define VMR9DEVICEDESCRIPTIONLEN 512 393*c2c66affSColin Finck 394*c2c66affSColin Fincktypedef struct _VMR9MonitorInfo 395*c2c66affSColin Finck{ 396*c2c66affSColin Finck UINT uDevID; 397*c2c66affSColin Finck RECT rcMonitor; 398*c2c66affSColin Finck HMONITOR hMon; 399*c2c66affSColin Finck DWORD dwFlags; 400*c2c66affSColin Finck WCHAR szDevice[VMR9DEVICENAMELEN]; 401*c2c66affSColin Finck WCHAR szDescription[VMR9DEVICEDESCRIPTIONLEN]; 402*c2c66affSColin Finck LARGE_INTEGER liDriverVersion; 403*c2c66affSColin Finck DWORD dwVendorId; 404*c2c66affSColin Finck DWORD dwDeviceId; 405*c2c66affSColin Finck DWORD dwSubSysId; 406*c2c66affSColin Finck DWORD dwRevision; 407*c2c66affSColin Finck} VMR9MonitorInfo; 408*c2c66affSColin Finck 409*c2c66affSColin Finck[ 410*c2c66affSColin Finck local, 411*c2c66affSColin Finck object, 412*c2c66affSColin Finck uuid(46c2e457-8ba0-4eef-b80b-0680f0978749), 413*c2c66affSColin Finck helpstring("IVMRMonitorConfig9 interface"), 414*c2c66affSColin Finck pointer_default(unique) 415*c2c66affSColin Finck] 416*c2c66affSColin Finckinterface IVMRMonitorConfig9 : IUnknown 417*c2c66affSColin Finck{ 418*c2c66affSColin Finck HRESULT SetMonitor([in] UINT uDev); 419*c2c66affSColin Finck HRESULT GetMonitor([out] UINT *uDev); 420*c2c66affSColin Finck HRESULT SetDefaultMonitor([in] UINT uDev); 421*c2c66affSColin Finck HRESULT GetDefaultMonitor([out] UINT *uDev); 422*c2c66affSColin Finck HRESULT GetAvailableMonitors([out, size_is(arraysize)] VMR9MonitorInfo *info, [in] DWORD arraysize, [out] DWORD *numdev); 423*c2c66affSColin Finck}; 424*c2c66affSColin Finck 425*c2c66affSColin Fincktypedef enum _VMR9DeinterlacePrefs 426*c2c66affSColin Finck{ 427*c2c66affSColin Finck DeinterlacePref9_NextBest = 0x1, 428*c2c66affSColin Finck DeinterlacePref9_BOB = 0x2, 429*c2c66affSColin Finck DeinterlacePref9_Weave = 0x4, 430*c2c66affSColin Finck DeinterlacePref9_Mask = 0x7 431*c2c66affSColin Finck} VMR9DeinterlacePrefs; 432*c2c66affSColin Finck 433*c2c66affSColin Fincktypedef enum _VMR9DeinterlaceTech 434*c2c66affSColin Finck{ 435*c2c66affSColin Finck DeinterlaceTech9_Unknown = 0, 436*c2c66affSColin Finck DeinterlaceTech9_BOBLineReplicate = 0x1, 437*c2c66affSColin Finck DeinterlaceTech9_BOBVerticalStretch = 0x2, 438*c2c66affSColin Finck DeinterlaceTech9_MedianFiltering = 0x4, 439*c2c66affSColin Finck DeinterlaceTech9_EdgeFiltering = 0x10, 440*c2c66affSColin Finck DeinterlaceTech9_FieldAdaptive = 0x20, 441*c2c66affSColin Finck DeinterlaceTech9_PixelAdaptive = 0x40, 442*c2c66affSColin Finck DeinterlaceTech9_MotionVectorSteered = 0x80 443*c2c66affSColin Finck} VMR9DeinterlaceTech; 444*c2c66affSColin Finck 445*c2c66affSColin Fincktypedef struct _VMR9Frequency 446*c2c66affSColin Finck{ 447*c2c66affSColin Finck DWORD dwNumerator; 448*c2c66affSColin Finck DWORD dwDenominator; 449*c2c66affSColin Finck} VMR9Frequency; 450*c2c66affSColin Finck 451*c2c66affSColin Fincktypedef enum _VMR9_SampleFormat 452*c2c66affSColin Finck{ 453*c2c66affSColin Finck VMR9_SampleReserved = 1, 454*c2c66affSColin Finck VMR9_SampleProgressiveFrame = 2, 455*c2c66affSColin Finck VMR9_SampleFieldInterleavedEvenFirst = 3, 456*c2c66affSColin Finck VMR9_SampleFieldInterleavedOddFirst = 4, 457*c2c66affSColin Finck VMR9_SampleFieldSingleEven = 5, 458*c2c66affSColin Finck VMR9_SampleFieldSingleOdd = 6, 459*c2c66affSColin Finck} VMR9_SampleFormat; 460*c2c66affSColin Finck 461*c2c66affSColin Fincktypedef struct _VMR9VideoDesc 462*c2c66affSColin Finck{ 463*c2c66affSColin Finck DWORD dwSize; 464*c2c66affSColin Finck DWORD dwSampleWidth; 465*c2c66affSColin Finck DWORD dwSampleHeight; 466*c2c66affSColin Finck VMR9_SampleFormat SampleFormat; 467*c2c66affSColin Finck DWORD dwFourCC; 468*c2c66affSColin Finck VMR9Frequency InputSampleFreq; 469*c2c66affSColin Finck VMR9Frequency OutputFrameFreq; 470*c2c66affSColin Finck} VMR9VideoDesc; 471*c2c66affSColin Finck 472*c2c66affSColin Fincktypedef struct _VMR9DeinterlaceCaps { 473*c2c66affSColin Finck DWORD dwSize; 474*c2c66affSColin Finck DWORD dwNumPreviousOutputFrames; 475*c2c66affSColin Finck DWORD dwNumForwardRefSamples; 476*c2c66affSColin Finck DWORD dwNumBackwardRefSamples; 477*c2c66affSColin Finck VMR9DeinterlaceTech DeinterlaceTechnology; 478*c2c66affSColin Finck} VMR9DeinterlaceCaps; 479*c2c66affSColin Finck 480*c2c66affSColin Finck[ 481*c2c66affSColin Finck local, 482*c2c66affSColin Finck object, 483*c2c66affSColin Finck uuid(a215fb8d-13c2-4f7f-993c-003d6271a459), 484*c2c66affSColin Finck helpstring("IVMRDeinterlaceControl9 interface"), 485*c2c66affSColin Finck pointer_default(unique) 486*c2c66affSColin Finck] 487*c2c66affSColin Finckinterface IVMRDeinterlaceControl9 : IUnknown 488*c2c66affSColin Finck{ 489*c2c66affSColin Finck HRESULT GetNumberOfDeinterlaceModes([in] VMR9VideoDesc *desc, [in, out] DWORD *nummodes, [out] GUID *modes); 490*c2c66affSColin Finck HRESULT GetDeinterlaceModeCaps([in] GUID *mode, [in] VMR9VideoDesc *desc, [out] VMR9DeinterlaceCaps *caps); 491*c2c66affSColin Finck HRESULT GetDeinterlaceMode([in] DWORD streamid, [out] GUID *mode); 492*c2c66affSColin Finck HRESULT SetDeinterlaceMode([in] DWORD streamid, [in] GUID *mode); 493*c2c66affSColin Finck HRESULT GetDeinterlacePrefs([out] DWORD *prefs); 494*c2c66affSColin Finck HRESULT SetDeinterlacePrefs([in] DWORD prefs); 495*c2c66affSColin Finck HRESULT GetActualDeinterlaceMode([in] DWORD streamid, [out] GUID *mode); 496*c2c66affSColin Finck}; 497*c2c66affSColin Finck 498*c2c66affSColin Fincktypedef struct _VMR9VideoStreamInfo { 499*c2c66affSColin Finck IDirect3DSurface9 *pddsVideoSurface; 500*c2c66affSColin Finck DWORD dwWidth; 501*c2c66affSColin Finck DWORD dwHeight; 502*c2c66affSColin Finck DWORD dwStrmID; 503*c2c66affSColin Finck FLOAT fAlpha; 504*c2c66affSColin Finck VMR9NormalizedRect rNormal; 505*c2c66affSColin Finck REFERENCE_TIME rtStart; 506*c2c66affSColin Finck REFERENCE_TIME rtEnd; 507*c2c66affSColin Finck VMR9_SampleFormat SampleFormat; 508*c2c66affSColin Finck} VMR9VideoStreamInfo; 509*c2c66affSColin Finck 510*c2c66affSColin Finck[ 511*c2c66affSColin Finck local, 512*c2c66affSColin Finck object, 513*c2c66affSColin Finck uuid(4a5c89eb-df51-4654-ac2a-e48e02bbabf6), 514*c2c66affSColin Finck helpstring("IVMRImageCompositor9 interface"), 515*c2c66affSColin Finck pointer_default(unique) 516*c2c66affSColin Finck] 517*c2c66affSColin Finckinterface IVMRImageCompositor9 : IUnknown 518*c2c66affSColin Finck{ 519*c2c66affSColin Finck HRESULT InitCompositionDevice([in] IUnknown *d3ddev); 520*c2c66affSColin Finck HRESULT TermCompositionDevice([in] IUnknown *d3ddev); 521*c2c66affSColin Finck HRESULT CompositeImage([in] IUnknown *d3ddev, [in] IDirect3DSurface9 *d3dtarget, [in] AM_MEDIA_TYPE *mttarget, 522*c2c66affSColin Finck [in] REFERENCE_TIME start, [in] REFERENCE_TIME stop, D3DCOLOR back, 523*c2c66affSColin Finck [in] VMR9VideoStreamInfo *info, [in] UINT streams); 524*c2c66affSColin Finck}; 525