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