webservices: Add a helper to determine node type.
[wine.git] / include / vmrender.idl
blobc3d053dbb01dfad7ffd2355f5d9976c61aea0f90
1 /*
2 * Copyright (C) 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 #if 0
20 #pragma makedep install
21 #endif
23 cpp_quote("#if 0")
24 typedef DWORD IDirectDrawSurface7;
25 typedef DWORD IDirectDraw7;
26 typedef DWORD *LPBITMAPINFOHEADER;
27 typedef DWORD *LPDDPIXELFORMAT;
28 typedef struct { DWORD dw1, dw2; } DDCOLORKEY;
29 cpp_quote("#endif")
30 cpp_quote("#include <ddraw.h>")
32 interface IVMRSurface;
33 interface IVMRSurfaceAllocator;
34 interface IVMRSurfaceAllocatorNotify;
35 interface IVMRImagePresenter;
36 interface IVMRImagePresenterNotify;
37 interface IVMRWindowlessControl;
38 interface IVMRMixerControl;
39 interface IVMRMixerBitmap;
40 interface IVMRFilterConfig;
41 interface IVMRAspectRatioControl;
42 interface IVMRDeinterlaceControl;
43 interface IVMRMonitorConfig;
44 interface IVMRImageCompositor;
45 interface IVMRVideoStreamControl;
47 typedef enum _VMRPresentationFlags
49 VMRSample_SyncPoint = 0x01,
50 VMRSample_Preroll = 0x02,
51 VMRSample_Discontinuity = 0x04,
52 VMRSample_TimeValid = 0x08,
53 VMRSample_SrcDstRectsValid = 0x10
54 } VMRPresentationFlags;
56 typedef struct tagVMRPRESENTATIONINFO
58 DWORD dwFlags;
59 IDirectDrawSurface7 *lpSurf;
60 REFERENCE_TIME rtStart, rtEnd;
61 SIZE szAspectRatio;
62 RECT rcSrc, rcDst;
63 DWORD dwTypeSpecificFlags;
64 DWORD dwInterlaceFlags;
65 } VMRPRESENTATIONINFO;
68 local,
69 object,
70 uuid(ce704fe7-e71e-41fb-baa2-c4403e1182f5),
71 helpstring("IVMRImagePresenter interface"),
72 pointer_default(unique)
74 interface IVMRImagePresenter : IUnknown
76 HRESULT StartPresenting([in] DWORD_PTR id);
77 HRESULT StopPresenting([in] DWORD_PTR id);
78 HRESULT PresentImage([in] DWORD_PTR id, [in] VMRPRESENTATIONINFO *info);
81 typedef enum _VMRSurfaceAllocationFlags
83 AMAP_PIXELFORMAT_VALID = 0x01,
84 AMAP_3D_TARGET = 0x02,
85 AMAP_ALLOW_SYSMEM = 0x04,
86 AMAP_FORCE_SYSMEM = 0x08,
87 AMAP_DIRECTED_FLIP = 0x10,
88 AMAP_DXVA_TARGET = 0x20
89 } VMRSurfaceAllocationFlags;
91 typedef struct tagVMRALLOCATIONINFO
93 DWORD dwFlags;
94 LPBITMAPINFOHEADER lpHdr;
95 LPDDPIXELFORMAT lpPixFmt;
96 SIZE szAspectRatio;
97 DWORD dwMinBuffers;
98 DWORD dwMaxBuffers;
99 DWORD dwInterlaceFlags;
100 SIZE szNativeSize;
101 } VMRALLOCATIONINFO;
104 local,
105 object,
106 uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52),
107 helpstring("IVMRSurfaceAllocator interface"),
108 pointer_default(unique)
110 interface IVMRSurfaceAllocator : IUnknown
112 HRESULT AllocateSurface([in] DWORD_PTR id, [in] VMRALLOCATIONINFO *allocinfo, [in, out] DWORD *buffers, IDirectDrawSurface7 **surface);
113 HRESULT FreeSurface([in] DWORD_PTR id);
114 HRESULT PrepareSurface([in] DWORD_PTR id, [in] IDirectDrawSurface7 *surface, [in] DWORD dwSurfaceFlags);
115 HRESULT AdviseNotify([in] IVMRSurfaceAllocatorNotify *notify);
119 local,
120 object,
121 uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2),
122 helpstring("IVMRSurfaceAllocatorNotify interface"),
123 pointer_default(unique)
125 interface IVMRSurfaceAllocatorNotify : IUnknown
127 HRESULT AdviseSurfaceAllocator([in] DWORD_PTR id, [in] IVMRSurfaceAllocator *allocator);
128 HRESULT SetDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor);
129 HRESULT ChangeDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor);
130 HRESULT RestoreDDrawSurfaces();
131 HRESULT NotifyEvent([in] LONG EventCode, [in] LONG_PTR p1, [in] LONG_PTR p2);
132 HRESULT SetBorderColor([in] COLORREF border);
135 typedef enum _VMR_ASPECT_RATIO_MODE
137 VMR_ARMODE_NONE,
138 VMR_ARMODE_LETTER_BOX
139 } VMR_ASPECT_RATIO_MODE;
142 local,
143 object,
144 uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7),
145 helpstring("IVMRWindowlessControl interface"),
146 pointer_default(unique)
148 interface IVMRWindowlessControl : IUnknown
150 HRESULT GetNativeVideoSize([out] LONG *width, [out] LONG *height, [out] LONG *ar_width, [out] LONG *ar_height);
151 HRESULT GetMinIdealVideoSize([out] LONG *width, [out] LONG *height);
152 HRESULT GetMaxIdealVideoSize([out] LONG *width, [out] LONG *height);
153 HRESULT SetVideoPosition([in] const RECT *src_rect, [in] const RECT *dst_rect);
154 HRESULT GetVideoPosition([out] RECT *src_rect, [out] RECT *dst_rect);
155 HRESULT GetAspectRatioMode([out] DWORD *mode);
156 HRESULT SetAspectRatioMode([in] DWORD mode);
157 HRESULT SetVideoClippingWindow([in] HWND hwnd);
158 HRESULT RepaintVideo([in] HWND hwnd, [in] HDC hdc);
159 HRESULT DisplayModeChanged();
160 HRESULT GetCurrentImage([out] BYTE **data);
161 HRESULT SetBorderColor([in] COLORREF border);
162 HRESULT GetBorderColor([out] COLORREF *border);
163 HRESULT SetColorKey([in] COLORREF key);
164 HRESULT GetColorKey([out] COLORREF *key);
167 typedef enum _VMRMixerPrefs
169 MixerPref_NoDecimation = 0x0001,
170 MixerPref_DecimateOutput = 0x0002,
171 MixerPref_ARAdjustXorY = 0x0004,
172 MixerPref_DecimationReserved = 0x0008,
173 MixerPref_DecimateMask = 0x000f,
175 MixerPref_BiLinearFiltering = 0x0010,
176 MixerPref_PointFiltering = 0x0020,
177 MixerPref_FinteringMask = 0x00f0,
179 MixerPref_RenderTargetRGB = 0x0100,
180 MixerPref_RenderTargetYUV = 0x1000,
181 MixerPref_RenderTargetYUV420 = 0x0200,
182 MixerPref_RenderTargetYUV422 = 0x0400,
183 MixerPref_RenderTargetYUV444 = 0x0800,
184 MixerPref_RenderTargetReserved = 0xe000,
185 MixerPref_RenderTargetMask = 0xff00,
187 MixerPref_DynamicSwitchToBOB = 0x10000,
188 MixerPref_DynamicDecimateBy2 = 0x20000,
189 MixerPref_DynamicReserved = 0xc0000,
190 MixerPref_DynamicMask = 0xf0000
191 } VMRMixerPrefs;
193 typedef struct _NORMALIZEDRECT
195 FLOAT left, top, right, bottom;
196 } NORMALIZEDRECT;
199 local,
200 object,
201 uuid(1c1a17b0-bed0-415d-974b-dc6696131599),
202 helpstring("IVMRMixerControl interface"),
203 pointer_default(unique)
205 interface IVMRMixerControl : IUnknown
207 HRESULT SetAlpha([in] DWORD id, [in] FLOAT alpha);
208 HRESULT GetAlpha([in] DWORD id, [out] FLOAT *alpha);
209 HRESULT SetZOrder([in] DWORD id, [in] DWORD z);
210 HRESULT GetZOrder([in] DWORD id, [out] DWORD *z);
211 HRESULT SetOutputRect([in] DWORD id, [in] const NORMALIZEDRECT *rect);
212 HRESULT SetBackgroundClr([in] COLORREF background);
213 HRESULT GetBackgroundClr([out] COLORREF *background);
214 HRESULT SetMixingPrefs([in] DWORD prefs);
215 HRESULT GetMixingPrefs([out] DWORD *prefs);
218 typedef struct tagVMRGUID
220 struct _GUID *pGUID, GUID;
221 } VMRGUID;
223 #define VMRDEVICENAMELEN 32
224 #define VMRDEVICEDESCRIPTIONLEN 256
226 typedef struct tagVMRMONITORINFO
228 VMRGUID guid;
229 RECT rcMonitor;
230 HMONITOR hMon;
231 DWORD dwFlags;
232 WCHAR szDevice[VMRDEVICENAMELEN];
233 WCHAR szDescription[VMRDEVICEDESCRIPTIONLEN];
234 LARGE_INTEGER liDriverVersion;
235 DWORD dwVendorId;
236 DWORD dwDeviceId;
237 DWORD dwSubSysId;
238 DWORD dwRevision;
239 } VMRMONITORINFO;
242 local,
243 object,
244 uuid(9cf0b1b6-fbaa-4b7f-88cf-cf1f130a0dce),
245 helpstring("IVMRMonitorConfig interface"),
246 pointer_default(unique)
248 interface IVMRMonitorConfig : IUnknown
250 HRESULT SetMonitor([in] const VMRGUID *vmrguid);
251 HRESULT GetMonitor([out] VMRGUID *vmrguid);
252 HRESULT SetDefaultMonitor([in] const VMRGUID *vmrguid);
253 HRESULT GetDefaultMonitor([out] VMRGUID *vmrguid);
254 HRESULT GetAvailableMonitors([out, size_is(array_size)] VMRMONITORINFO *info, [in] DWORD array_size, [out] DWORD *retrieved);
257 typedef enum _VMRRenderPrefs
259 RenderPrefs_RestrictToInitialMonitor = 0x00,
260 RenderPrefs_ForceOffScreen = 0x01,
261 RenderPrefs_ForceOverlays = 0x02,
262 RenderPrefs_AllowOverlays = 0x00,
263 RenderPrefs_AllowOffscreen = 0x00,
264 RenderPrefs_DoNotRenderColorKeyAndBorder = 0x08,
265 RenderPrefs_Reserved = 0x10,
266 RenderPrefs_PreferAGPMemWhenMixing = 0x20,
267 RenderPrefs_Mask = 0x3f
268 } VMRRenderPrefs;
270 typedef enum _VMRMode
272 VMRMode_Windowed = 0x1,
273 VMRMode_Windowless = 0x2,
274 VMRMode_Renderless = 0x4,
275 VMRMode_Mask = 0x7
276 } VMRMode;
278 enum { MAX_NUMBER_OF_STREAMS = 16 };
281 local,
282 object,
283 uuid(9e5530c5-7034-48b4-bb46-0b8a6efc8e36),
284 helpstring("IVMRFilterConfig interface"),
285 pointer_default(unique)
287 interface IVMRFilterConfig : IUnknown
289 HRESULT SetImageCompositor([in] IVMRImageCompositor *compositor);
290 HRESULT SetNumberOfStreams([in] DWORD streams);
291 HRESULT GetNumberOfStreams([out] DWORD *streams);
292 HRESULT SetRenderingPrefs([in] DWORD prefs);
293 HRESULT GetRenderingPrefs([out] DWORD *prefs);
294 HRESULT SetRenderingMode([in] DWORD mode);
295 HRESULT GetRenderingMode([out] DWORD *mode);
299 local,
300 object,
301 uuid(ede80b5c-bad6-4623-b537-65586c9f8dfd),
302 helpstring("IVMRAspectRatioControl interface"),
303 pointer_default(unique)
305 interface IVMRAspectRatioControl : IUnknown
307 HRESULT GetAspectRatioMode([out] DWORD *armode);
308 HRESULT SetAspectRatioMode([in] DWORD armode);
311 typedef enum _VMRDeinterlacePrefs
313 DeinterlacePref_NextBest = 0x1,
314 DeinterlacePref_BOB = 0x2,
315 DeinterlacePref_Weave = 0x4,
316 DeinterlacePref_Mask = 0x7
317 } VMRDeinterlacePrefs;
319 typedef enum _VMRDeinterlaceTech
321 DeinterlaceTech_Unknown = 0x00,
322 DeinterlaceTech_BOBLineReplicate = 0x01,
323 DeinterlaceTech_BOBVerticalStretch = 0x02,
324 DeinterlaceTech_MedianFiltering = 0x04,
325 DeinterlaceTech_EdgeFiltering = 0x08,
326 DeinterlaceTech_FieldAdaptive = 0x10,
327 DeinterlaceTech_PixelAdaptive = 0x20,
328 DeinterlaceTech_MotionVectorSteered = 0x80
329 } VMRDeinterlaceTech;
331 typedef struct _VMRFrequency
333 DWORD dwNumerator, dwDenominator;
334 } VMRFrequency;
336 typedef struct _VMRVideoDesc
338 DWORD dwSize;
339 DWORD dwSampleWidth;
340 DWORD dwSampleHeight;
341 BOOL SingleFieldPerSample;
342 DWORD dwFourCC;
343 VMRFrequency InputSampleFreq;
344 VMRFrequency OutputFrameFreq;
345 } VMRVideoDesc;
347 typedef struct _VMRDeinterlaceCaps
349 DWORD dwSize;
350 DWORD dwNumPreviousOutputFrames;
351 DWORD dwNumForwardRefSamples;
352 DWORD dwNumBackwardRefSamples;
353 VMRDeinterlaceTech DeinterlaceTechnology;
354 } VMRDeinterlaceCaps;
357 local,
358 object,
359 uuid(bb057577-0db8-4e6a-87a7-1a8c9a505a0f),
360 helpstring("IVMRDeinterlaceControl interface"),
361 pointer_default(unique)
363 interface IVMRDeinterlaceControl : IUnknown
365 HRESULT GetNumberOfDeinterlaceModes([in] VMRVideoDesc *desc, [in, out] DWORD *num_modes, [out] GUID *modes);
366 HRESULT GetDeinterlaceModeCaps([in] GUID *mode, [in] VMRVideoDesc *desc, [in, out] VMRDeinterlaceCaps *caps);
367 HRESULT GetDeinterlaceMode([in] DWORD id, [out] GUID *mode);
368 HRESULT SetDeinterlaceMode([in] DWORD id, [in] GUID *mode);
369 HRESULT GetDeinterlacePrefs([out] DWORD *prefs);
370 HRESULT SetDeinterlacePrefs([in] DWORD prefs);
371 HRESULT GetActualDeinterlaceMode([in] DWORD id, [out] GUID *mode);
374 typedef struct _VMRALPHABITMAP
376 DWORD dwFlags;
377 HDC hdc;
378 IDirectDrawSurface7 *pDDS;
379 RECT rSrc;
380 RECT rDest;
381 FLOAT fAlpha;
382 COLORREF clrSrcKey;
383 } VMRALPHABITMAP, *PVMRALPHABITMAP;
385 cpp_quote("#define VMRBITMAP_DISABLE (0x01)")
386 cpp_quote("#define VMRBITMAP_HDC (0x02)")
387 cpp_quote("#define VMRBITMAP_ENTIREDDS (0x04)")
388 cpp_quote("#define VMRBITMAP_SRCCOLORKEY (0x08)")
389 cpp_quote("#define VMRBITMAP_SRCRECT (0x10)")
392 local,
393 object,
394 uuid(1e673275-0257-40aa-af20-7c608d4a0428),
395 helpstring("IVMRMixerBitmap interface"),
396 pointer_default(unique)
398 interface IVMRMixerBitmap : IUnknown
400 HRESULT SetAlphaBitmap([in] const VMRALPHABITMAP *params);
401 HRESULT UpdateAlphaBitmapParameters([in] VMRALPHABITMAP *params);
402 HRESULT GetAlphaBitmapParameters([out] VMRALPHABITMAP *params);
405 typedef struct _VMRVIDEOSTREAMINFO
407 IDirectDrawSurface7 *pddsVideoSurface;
408 DWORD dwWidth;
409 DWORD dwHeight;
410 DWORD dwStrmID;
411 FLOAT fAlpha;
412 DDCOLORKEY ddClrKey;
413 NORMALIZEDRECT rNormal;
414 } VMRVIDEOSTREAMINFO;
417 local,
418 object,
419 uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82),
420 helpstring("IVMRImageCompositor interface"),
421 pointer_default(unique)
423 interface IVMRImageCompositor : IUnknown
425 HRESULT InitCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget);
426 HRESULT TermCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget);
427 HRESULT SetStreamMediaType([in] DWORD id, [in] AM_MEDIA_TYPE *pmt, [in] BOOL texture);
428 HRESULT CompositeImage([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget,
429 [in] AM_MEDIA_TYPE *pmt, [in] REFERENCE_TIME start, [in] REFERENCE_TIME stop,
430 [in] DWORD backgrnd, [in] VMRVIDEOSTREAMINFO *info, [in] UINT streams);
434 local,
435 object,
436 uuid(058d1f11-2a54-4bef-bd54-df706626b727),
437 helpstring("IVMRVideoStreamControl interface"),
438 pointer_default(unique)
440 interface IVMRVideoStreamControl : IUnknown
442 HRESULT SetColorKey([in] DDCOLORKEY *key);
443 HRESULT GetColorKey([out] DDCOLORKEY *key);
444 HRESULT SetStreamActiveState([in] BOOL active);
445 HRESULT GetStreamActiveState([out] BOOL *active);
449 local,
450 object,
451 uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178),
452 helpstring("IVMRImagePresenterConfig interface"),
453 pointer_default(unique)
455 interface IVMRImagePresenterConfig : IUnknown
457 HRESULT SetRenderingPrefs([in] DWORD prefs);
458 HRESULT GetRenderingPrefs([out] DWORD *prefs);
462 local,
463 object,
464 uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea),
465 helpstring("IVMRImagePresenterExclModeConfig interface"),
466 pointer_default(unique)
468 interface IVMRImagePresenterExclModeConfig : IVMRImagePresenterConfig
470 HRESULT SetXlcModeDDObjAndPrimarySurface([in] IDirectDraw7 *dddev, [in] IDirectDrawSurface7 *ddsurface);
471 HRESULT GetXlcModeDDObjAndPrimarySurface([out] IDirectDraw7 **dddev, [out] IDirectDrawSurface7 **ddsurface);
475 local,
476 object,
477 uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a),
478 helpstring("IVPManager interface"),
479 pointer_default(unique)
481 interface IVPManager : IUnknown
483 HRESULT SetVideoPortIndex([in] DWORD index);
484 HRESULT GetVideoPortIndex([out] DWORD *index);