29interface IVMRSurfaceAllocator;
30interface IVMRSurfaceAllocatorNotify;
31interface IVMRImagePresenter;
32interface IVMRImagePresenterNotify;
33interface IVMRWindowlessControl;
34interface IVMRMixerControl;
35interface IVMRMixerBitmap;
36interface IVMRFilterConfig;
37interface IVMRAspectRatioControl;
38interface IVMRDeinterlaceControl;
39interface IVMRMonitorConfig;
40interface IVMRImageCompositor;
41interface IVMRVideoStreamControl;
43typedef enum _VMRPresentationFlags
45 VMRSample_SyncPoint = 0x01,
46 VMRSample_Preroll = 0x02,
47 VMRSample_Discontinuity = 0x04,
48 VMRSample_TimeValid = 0x08,
49 VMRSample_SrcDstRectsValid = 0x10
50} VMRPresentationFlags;
52typedef struct tagVMRPRESENTATIONINFO
55 IDirectDrawSurface7 *lpSurf;
56 REFERENCE_TIME rtStart, rtEnd;
59 DWORD dwTypeSpecificFlags;
60 DWORD dwInterlaceFlags;
66 uuid(ce704fe7-e71e-41fb-baa2-c4403e1182f5),
67 helpstring("IVMRImagePresenter interface"),
68 pointer_default(unique)
70interface IVMRImagePresenter : IUnknown
72 HRESULT StartPresenting([in] DWORD_PTR id);
73 HRESULT StopPresenting([in] DWORD_PTR id);
74 HRESULT PresentImage([in] DWORD_PTR id, [in] VMRPRESENTATIONINFO *info);
77typedef enum _VMRSurfaceAllocationFlags
79 AMAP_PIXELFORMAT_VALID = 0x01,
80 AMAP_3D_TARGET = 0x02,
81 AMAP_ALLOW_SYSMEM = 0x04,
82 AMAP_FORCE_SYSMEM = 0x08,
83 AMAP_DIRECTED_FLIP = 0x10,
84 AMAP_DXVA_TARGET = 0x20
85} VMRSurfaceAllocationFlags;
87typedef struct tagVMRALLOCATIONINFO
90 LPBITMAPINFOHEADER lpHdr;
91 LPDDPIXELFORMAT lpPixFmt;
95 DWORD dwInterlaceFlags;
102 uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52),
103 helpstring("IVMRSurfaceAllocator interface"),
104 pointer_default(unique)
106interface IVMRSurfaceAllocator : IUnknown
108 HRESULT AllocateSurface([in] DWORD_PTR id, [in] VMRALLOCATIONINFO *allocinfo, [in, out] DWORD *buffers, IDirectDrawSurface7 **surface);
109 HRESULT FreeSurface([in] DWORD_PTR id);
110 HRESULT PrepareSurface([in] DWORD_PTR id, [in] IDirectDrawSurface7 *surface, [in] DWORD dwSurfaceFlags);
111 HRESULT AdviseNotify([in] IVMRSurfaceAllocatorNotify *notify);
117 uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2),
118 helpstring("IVMRSurfaceAllocatorNotify interface"),
119 pointer_default(unique)
121interface IVMRSurfaceAllocatorNotify : IUnknown
123 HRESULT AdviseSurfaceAllocator([in] DWORD_PTR id, [in] IVMRSurfaceAllocator *allocator);
124 HRESULT SetDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor);
125 HRESULT ChangeDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor);
126 HRESULT RestoreDDrawSurfaces();
127 HRESULT NotifyEvent([in] LONG EventCode, [in] LONG_PTR p1, [in] LONG_PTR p2);
128 HRESULT SetBorderColor([in] COLORREF border);
131typedef enum _VMR_ASPECT_RATIO_MODE
134 VMR_ARMODE_LETTER_BOX
135} VMR_ASPECT_RATIO_MODE;
140 uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7),
141 helpstring("IVMRWindowlessControl interface"),
142 pointer_default(unique)
144interface IVMRWindowlessControl : IUnknown
146 HRESULT GetNativeVideoSize([out] LONG *width, [out] LONG *height, [out] LONG *ar_width, [out] LONG *ar_height);
147 HRESULT GetMinIdealVideoSize([out] LONG *width, [out] LONG *height);
148 HRESULT GetMaxIdealVideoSize([out] LONG *width, [out] LONG *height);
149 HRESULT SetVideoPosition([in] const RECT *src_rect, [in] const RECT *dst_rect);
150 HRESULT GetVideoPosition([out] RECT *src_rect, [out] RECT *dst_rect);
151 HRESULT GetAspectRatioMode([out] DWORD *mode);
152 HRESULT SetAspectRatioMode([in] DWORD mode);
153 HRESULT SetVideoClippingWindow([in] HWND hwnd);
154 HRESULT RepaintVideo([in] HWND hwnd, [in] HDC hdc);
155 HRESULT DisplayModeChanged();
156 HRESULT GetCurrentImage([out] BYTE **data);
157 HRESULT SetBorderColor([in] COLORREF border);
158 HRESULT GetBorderColor([out] COLORREF *border);
159 HRESULT SetColorKey([in] COLORREF key);
160 HRESULT GetColorKey([out] COLORREF *key);
163typedef enum _VMRMixerPrefs
165 MixerPref_NoDecimation = 0x0001,
166 MixerPref_DecimateOutput = 0x0002,
167 MixerPref_ARAdjustXorY = 0x0004,
168 MixerPref_DecimationReserved = 0x0008,
169 MixerPref_DecimateMask = 0x000f,
171 MixerPref_BiLinearFiltering = 0x0010,
172 MixerPref_PointFiltering = 0x0020,
173 MixerPref_FinteringMask = 0x00f0,
175 MixerPref_RenderTargetRGB = 0x0100,
176 MixerPref_RenderTargetYUV = 0x1000,
177 MixerPref_RenderTargetYUV420 = 0x0200,
178 MixerPref_RenderTargetYUV422 = 0x0400,
179 MixerPref_RenderTargetYUV444 = 0x0800,
180 MixerPref_RenderTargetReserved = 0xe000,
181 MixerPref_RenderTargetMask = 0xff00,
183 MixerPref_DynamicSwitchToBOB = 0x10000,
184 MixerPref_DynamicDecimateBy2 = 0x20000,
185 MixerPref_DynamicReserved = 0xc0000,
186 MixerPref_DynamicMask = 0xf0000
189typedef struct _NORMALIZEDRECT
191 FLOAT left, top, right, bottom;
197 uuid(1c1a17b0-bed0-415d-974b-dc6696131599),
198 helpstring("IVMRMixerControl interface"),
199 pointer_default(unique)
201interface IVMRMixerControl : IUnknown
203 HRESULT SetAlpha([in] DWORD id, [in] FLOAT alpha);
204 HRESULT GetAlpha([in] DWORD id, [out] FLOAT *alpha);
205 HRESULT SetZOrder([in] DWORD id, [in] DWORD z);
206 HRESULT GetZOrder([in] DWORD id, [out] DWORD *z);
207 HRESULT SetOutputRect([in] DWORD id, [in] const NORMALIZEDRECT *rect);
208 HRESULT SetBackgroundClr([in] COLORREF background);
209 HRESULT GetBackgroundClr([out] COLORREF *background);
210 HRESULT SetMixingPrefs([in] DWORD prefs);
211 HRESULT GetMixingPrefs([out] DWORD *prefs);
214typedef struct tagVMRGUID
216 struct _GUID *pGUID, GUID;
219#define VMRDEVICENAMELEN 32
220#define VMRDEVICEDESCRIPTIONLEN 256
222typedef struct tagVMRMONITORINFO
228 WCHAR szDevice[VMRDEVICENAMELEN];
229 WCHAR szDescription[VMRDEVICEDESCRIPTIONLEN];
230 LARGE_INTEGER liDriverVersion;
240 uuid(9cf0b1b6-fbaa-4b7f-88cf-cf1f130a0dce),
241 helpstring("IVMRMonitorConfig interface"),
242 pointer_default(unique)
244interface IVMRMonitorConfig : IUnknown
246 HRESULT SetMonitor([in] const VMRGUID *vmrguid);
247 HRESULT GetMonitor([out] VMRGUID *vmrguid);
248 HRESULT SetDefaultMonitor([in] const VMRGUID *vmrguid);
249 HRESULT GetDefaultMonitor([out] VMRGUID *vmrguid);
250 HRESULT GetAvailableMonitors([out, size_is(array_size)] VMRMONITORINFO *info, [in] DWORD array_size, [out] DWORD *retrieved);
253typedef enum _VMRRenderPrefs
255 RenderPrefs_RestrictToInitialMonitor = 0x00,
256 RenderPrefs_ForceOffScreen = 0x01,
257 RenderPrefs_ForceOverlays = 0x02,
258 RenderPrefs_AllowOverlays = 0x00,
259 RenderPrefs_AllowOffscreen = 0x00,
260 RenderPrefs_DoNotRenderColorKeyAndBorder = 0x08,
261 RenderPrefs_Reserved = 0x10,
262 RenderPrefs_PreferAGPMemWhenMixing = 0x20,
263 RenderPrefs_Mask = 0x3f
268 VMRMode_Windowed = 0x1,
269 VMRMode_Windowless = 0x2,
270 VMRMode_Renderless = 0x4,
274enum { MAX_NUMBER_OF_STREAMS = 16 };
279 uuid(9e5530c5-7034-48b4-bb46-0b8a6efc8e36),
280 helpstring("IVMRFilterConfig interface"),
281 pointer_default(unique)
283interface IVMRFilterConfig : IUnknown
285 HRESULT SetImageCompositor([in] IVMRImageCompositor *compositor);
286 HRESULT SetNumberOfStreams([in] DWORD streams);
287 HRESULT GetNumberOfStreams([out] DWORD *streams);
288 HRESULT SetRenderingPrefs([in] DWORD prefs);
289 HRESULT GetRenderingPrefs([out] DWORD *prefs);
290 HRESULT SetRenderingMode([in] DWORD mode);
291 HRESULT GetRenderingMode([out] DWORD *mode);
297 uuid(ede80b5c-bad6-4623-b537-65586c9f8dfd),
298 helpstring("IVMRAspectRatioControl interface"),
299 pointer_default(unique)
301interface IVMRAspectRatioControl : IUnknown
303 HRESULT GetAspectRatioMode([out] DWORD *armode);
304 HRESULT SetAspectRatioMode([in] DWORD armode);
307typedef enum _VMRDeinterlacePrefs
309 DeinterlacePref_NextBest = 0x1,
310 DeinterlacePref_BOB = 0x2,
311 DeinterlacePref_Weave = 0x4,
312 DeinterlacePref_Mask = 0x7
313} VMRDeinterlacePrefs;
315typedef enum _VMRDeinterlaceTech
317 DeinterlaceTech_Unknown = 0x00,
318 DeinterlaceTech_BOBLineReplicate = 0x01,
319 DeinterlaceTech_BOBVerticalStretch = 0x02,
320 DeinterlaceTech_MedianFiltering = 0x04,
321 DeinterlaceTech_EdgeFiltering = 0x08,
322 DeinterlaceTech_FieldAdaptive = 0x10,
323 DeinterlaceTech_PixelAdaptive = 0x20,
324 DeinterlaceTech_MotionVectorSteered = 0x80
327typedef struct _VMRFrequency
329 DWORD dwNumerator, dwDenominator;
332typedef struct _VMRVideoDesc
336 DWORD dwSampleHeight;
337 BOOL SingleFieldPerSample;
339 VMRFrequency InputSampleFreq;
340 VMRFrequency OutputFrameFreq;
343typedef struct _VMRDeinterlaceCaps
346 DWORD dwNumPreviousOutputFrames;
347 DWORD dwNumForwardRefSamples;
348 DWORD dwNumBackwardRefSamples;
349 VMRDeinterlaceTech DeinterlaceTechnology;
355 uuid(bb057577-0db8-4e6a-87a7-1a8c9a505a0f),
356 helpstring("IVMRDeinterlaceControl interface"),
357 pointer_default(unique)
359interface IVMRDeinterlaceControl : IUnknown
361 HRESULT GetNumberOfDeinterlaceModes([in] VMRVideoDesc *desc, [in, out] DWORD *num_modes, [out] GUID *modes);
362 HRESULT GetDeinterlaceModeCaps([in] GUID *mode, [in] VMRVideoDesc *desc, [in, out] VMRDeinterlaceCaps *caps);
363 HRESULT GetDeinterlaceMode([in] DWORD id, [out] GUID *mode);
364 HRESULT SetDeinterlaceMode([in] DWORD id, [in] GUID *mode);
365 HRESULT GetDeinterlacePrefs([out] DWORD *prefs);
366 HRESULT SetDeinterlacePrefs([in] DWORD prefs);
367 HRESULT GetActualDeinterlaceMode([in] DWORD id, [out] GUID *mode);
370typedef struct _VMRALPHABITMAP
374 IDirectDrawSurface7 *pDDS;
379} VMRALPHABITMAP, *PVMRALPHABITMAP;
381cpp_quote("#define VMRBITMAP_DISABLE (0x01)")
382cpp_quote("#define VMRBITMAP_HDC (0x02)")
383cpp_quote("#define VMRBITMAP_ENTIREDDS (0x04)")
384cpp_quote("#define VMRBITMAP_SRCCOLORKEY (0x08)")
385cpp_quote("#define VMRBITMAP_SRCRECT (0x10)")
390 uuid(1e673275-0257-40aa-af20-7c608d4a0428),
391 helpstring("IVMRMixerBitmap interface"),
392 pointer_default(unique)
394interface IVMRMixerBitmap : IUnknown
396 HRESULT SetAlphaBitmap([in] const VMRALPHABITMAP *params);
397 HRESULT UpdateAlphaBitmapParameters([in] VMRALPHABITMAP *params);
398 HRESULT GetAlphaBitmapParameters([out] VMRALPHABITMAP *params);
401typedef struct _VMRVIDEOSTREAMINFO
403 IDirectDrawSurface7 *pddsVideoSurface;
409 NORMALIZEDRECT rNormal;
415 uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82),
416 helpstring("IVMRImageCompositor interface"),
417 pointer_default(unique)
419interface IVMRImageCompositor : IUnknown
421 HRESULT InitCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget);
422 HRESULT TermCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget);
423 HRESULT SetStreamMediaType([in] DWORD id, [in] AM_MEDIA_TYPE *pmt, [in] BOOL texture);
424 HRESULT CompositeImage([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget,
425 [in] AM_MEDIA_TYPE *pmt, [in] REFERENCE_TIME start, [in] REFERENCE_TIME stop,
426 [in] DWORD backgrnd, [in] VMRVIDEOSTREAMINFO *info, [in] UINT streams);
432 uuid(058d1f11-2a54-4bef-bd54-df706626b727),
433 helpstring("IVMRVideoStreamControl interface"),
434 pointer_default(unique)
436interface IVMRVideoStreamControl : IUnknown
438 HRESULT SetColorKey([in] DDCOLORKEY *key);
439 HRESULT GetColorKey([out] DDCOLORKEY *key);
440 HRESULT SetStreamActiveState([in] BOOL active);
441 HRESULT GetStreamActiveState([out] BOOL *active);
447 uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178),
448 helpstring("IVMRImagePresenterConfig interface"),
449 pointer_default(unique)
451interface IVMRImagePresenterConfig : IUnknown
453 HRESULT SetRenderingPrefs([in] DWORD prefs);
454 HRESULT GetRenderingPrefs([out] DWORD *prefs);
460 uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea),
461 helpstring("IVMRImagePresenterExclModeConfig interface"),
462 pointer_default(unique)
464interface IVMRImagePresenterExclModeConfig : IVMRImagePresenterConfig
466 HRESULT SetXlcModeDDObjAndPrimarySurface([in] IDirectDraw7 *dddev, [in] IDirectDrawSurface7 *ddsurface);
467 HRESULT GetXlcModeDDObjAndPrimarySurface([out] IDirectDraw7 **dddev, [out] IDirectDrawSurface7 **ddsurface);
473 uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a),
474 helpstring("IVPManager interface"),
475 pointer_default(unique)
477interface IVPManager : IUnknown
479 HRESULT SetVideoPortIndex([in] DWORD index);
480 HRESULT GetVideoPortIndex([out] DWORD *index);
CD3D10_BUFFER_DESC D3D10_BUFFER_DESC cpp_quote(" ~CD3D10_BUFFER_DESC() {}") operator const D3D10_BUFFER_DESC &() const
DWORD IDirectDrawSurface7