mshtml: IPropertyBag stub implementation.
[wine.git] / include / vmrender.idl
blob3c3fd7bd30928ba0e14c9f6e70c518bfc2d77f30
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 cpp_quote("#if 0")
20 typedef DWORD IDirectDrawSurface7;
21 typedef DWORD IDirectDraw7;
22 typedef DWORD *LPBITMAPINFOHEADER;
23 typedef DWORD *LPDDPIXELFORMAT;
24 typedef struct { DWORD dw1, dw2; } DDCOLORKEY;
25 cpp_quote("#endif")
26 cpp_quote("#include <ddraw.h>")
28 interface IVMRSurface;
29 interface IVMRSurfaceAllocator;
30 interface IVMRSurfaceAllocatorNotify;
31 interface IVMRImagePresenter;
32 interface IVMRImagePresenterNotify;
33 interface IVMRWindowlessControl;
34 interface IVMRMixerControl;
35 interface IVMRMixerBitmap;
36 interface IVMRFilterConfig;
37 interface IVMRAspectRatioControl;
38 interface IVMRDeinterlaceControl;
39 interface IVMRMonitorConfig;
40 interface IVMRImageCompositor;
41 interface IVMRVideoStreamControl;
43 typedef enum _VMRPresentationFlags
45 VMRSample_SyncPoint = 0x01,
46 VMRSample_Preroll = 0x02,
47 VMRSample_Discontinuity = 0x04,
48 VMRSample_TimeValid = 0x08,
49 VMRSample_SrcDstRectsValid = 0x10
50 } VMRPresentationFlags;
52 typedef struct tagVMRPRESENTATIONINFO
54 DWORD dwFlags;
55 IDirectDrawSurface7 *lpSurf;
56 REFERENCE_TIME rtStart, rtEnd;
57 SIZE szAspectRatio;
58 RECT rcSrc, rcDst;
59 DWORD dwTypeSpecificFlags;
60 DWORD dwInterlaceFlags;
61 } VMRPRESENTATIONINFO;
64 local,
65 object,
66 uuid(ce704fe7-e71e-41fb-baa2-c4403e1182f5),
67 helpstring("IVMRImagePresenter interface"),
68 pointer_default(unique)
70 interface 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);
77 typedef 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;
87 typedef struct tagVMRALLOCATIONINFO
89 DWORD dwFlags;
90 LPBITMAPINFOHEADER lpHdr;
91 LPDDPIXELFORMAT lpPixFmt;
92 SIZE szAspectRatio;
93 DWORD dwMinBuffers;
94 DWORD dwMaxBuffers;
95 DWORD dwInterlaceFlags;
96 SIZE szNativeSize;
97 } VMRALLOCATIONINFO;
100 local,
101 object,
102 uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52),
103 helpstring("IVMRSurfaceAllocator interface"),
104 pointer_default(unique)
106 interface 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);
115 local,
116 object,
117 uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2),
118 helpstring("IVMRSurfaceAllocatorNotify interface"),
119 pointer_default(unique)
121 interface 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);
131 typedef enum _VMR_ASPECT_RATIO_MODE
133 VMR_ARMODE_NONE,
134 VMR_ARMODE_LETTER_BOX
135 } VMR_ASPECT_RATIO_MODE;
138 local,
139 object,
140 uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7),
141 helpstring("IVMRWindowlessControl interface"),
142 pointer_default(unique)
144 interface 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);
163 typedef 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
187 } VMRMixerPrefs;
189 typedef struct _NORMALIZEDRECT
191 FLOAT left, top, right, bottom;
192 } NORMALIZEDRECT;
195 local,
196 object,
197 uuid(1c1a17b0-bed0-415d-974b-dc6696131599),
198 helpstring("IVMRMixerControl interface"),
199 pointer_default(unique)
201 interface 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);
214 typedef struct tagVMRGUID
216 struct _GUID *pGUID, GUID;
217 } VMRGUID;
219 #define VMRDEVICENAMELEN 32
220 #define VMRDEVICEDESCRIPTIONLEN 256
222 typedef struct tagVMRMONITORINFO
224 VMRGUID guid;
225 RECT rcMonitor;
226 HMONITOR hMon;
227 DWORD dwFlags;
228 WCHAR szDevice[VMRDEVICENAMELEN];
229 WCHAR szDescription[VMRDEVICEDESCRIPTIONLEN];
230 LARGE_INTEGER liDriverVersion;
231 DWORD dwVendorId;
232 DWORD dwDeviceId;
233 DWORD dwSubSysId;
234 DWORD dwRevision;
235 } VMRMONITORINFO;
238 local,
239 object,
240 uuid(9cf0b1b6-fbaa-4b7f-88cf-cf1f130a0dce),
241 helpstring("IVMRMonitorConfig interface"),
242 pointer_default(unique)
244 interface 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);
253 typedef 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
264 } VMRRenderPrefs;
266 typedef enum _VMRMode
268 VMRMode_Windowed = 0x1,
269 VMRMode_Windowless = 0x2,
270 VMRMode_Renderless = 0x4,
271 VMRMode_Mask = 0x7
272 } VMRMode;
274 enum { MAX_NUMBER_OF_STREAMS = 16 };
277 local,
278 object,
279 uuid(9e5530c5-7034-48b4-bb46-0b8a6efc8e36),
280 helpstring("IVMRFilterConfig interface"),
281 pointer_default(unique)
283 interface 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);
295 local,
296 object,
297 uuid(ede80b5c-bad6-4623-b537-65586c9f8dfd),
298 helpstring("IVMRAspectRatioControl interface"),
299 pointer_default(unique)
301 interface IVMRAspectRatioControl : IUnknown
303 HRESULT GetAspectRatioMode([out] DWORD *armode);
304 HRESULT SetAspectRatioMode([in] DWORD armode);
307 typedef enum _VMRDeinterlacePrefs
309 DeinterlacePref_NextBest = 0x1,
310 DeinterlacePref_BOB = 0x2,
311 DeinterlacePref_Weave = 0x4,
312 DeinterlacePref_Mask = 0x7
313 } VMRDeinterlacePrefs;
315 typedef 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
325 } VMRDeinterlaceTech;
327 typedef struct _VMRFrequency
329 DWORD dwNumerator, dwDenominator;
330 } VMRFrequency;
332 typedef struct _VMRVideoDesc
334 DWORD dwSize;
335 DWORD dwSampleWidth;
336 DWORD dwSampleHeight;
337 BOOL SingleFieldPerSample;
338 DWORD dwFourCC;
339 VMRFrequency InputSampleFreq;
340 VMRFrequency OutputFrameFreq;
341 } VMRVideoDesc;
343 typedef struct _VMRDeinterlaceCaps
345 DWORD dwSize;
346 DWORD dwNumPreviousOutputFrames;
347 DWORD dwNumForwardRefSamples;
348 DWORD dwNumBackwardRefSamples;
349 VMRDeinterlaceTech DeinterlaceTechnology;
350 } VMRDeinterlaceCaps;
353 local,
354 object,
355 uuid(bb057577-0db8-4e6a-87a7-1a8c9a505a0f),
356 helpstring("IVMRDeinterlaceControl interface"),
357 pointer_default(unique)
359 interface 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);
370 typedef struct _VMRALPHABITMAP
372 DWORD dwFlags;
373 HDC hdc;
374 IDirectDrawSurface7 *pDDS;
375 RECT rSrc;
376 RECT rDest;
377 FLOAT fAlpha;
378 COLORREF clrSrcKey;
379 } VMRALPHABITMAP, *PVMRALPHABITMAP;
381 cpp_quote("#define VMRBITMAP_DISABLE (0x01)")
382 cpp_quote("#define VMRBITMAP_HDC (0x02)")
383 cpp_quote("#define VMRBITMAP_ENTIREDDS (0x04)")
384 cpp_quote("#define VMRBITMAP_SRCCOLORKEY (0x08)")
385 cpp_quote("#define VMRBITMAP_SRCRECT (0x10)")
388 local,
389 object,
390 uuid(1e673275-0257-40aa-af20-7c608d4a0428),
391 helpstring("IVMRMixerBitmap interface"),
392 pointer_default(unique)
394 interface IVMRMixerBitmap : IUnknown
396 HRESULT SetAlphaBitmap([in] const VMRALPHABITMAP *params);
397 HRESULT UpdateAlphaBitmapParameters([in] VMRALPHABITMAP *params);
398 HRESULT GetAlphaBitmapParameters([out] VMRALPHABITMAP *params);
401 typedef struct _VMRVIDEOSTREAMINFO
403 IDirectDrawSurface7 *pddsVideoSurface;
404 DWORD dwWidth;
405 DWORD dwHeight;
406 DWORD dwStrmID;
407 FLOAT fAlpha;
408 DDCOLORKEY ddClrKey;
409 NORMALIZEDRECT rNormal;
410 } VMRVIDEOSTREAMINFO;
413 local,
414 object,
415 uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82),
416 helpstring("IVMRImageCompositor interface"),
417 pointer_default(unique)
419 interface 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);
430 local,
431 object,
432 uuid(058d1f11-2a54-4bef-bd54-df706626b727),
433 helpstring("IVMRVideoStreamControl interface"),
434 pointer_default(unique)
436 interface 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);
445 local,
446 object,
447 uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178),
448 helpstring("IVMRImagePresenterConfig interface"),
449 pointer_default(unique)
451 interface IVMRImagePresenterConfig : IUnknown
453 HRESULT SetRenderingPrefs([in] DWORD prefs);
454 HRESULT GetRenderingPrefs([out] DWORD *prefs);
458 local,
459 object,
460 uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea),
461 helpstring("IVMRImagePresenterExclModeConfig interface"),
462 pointer_default(unique)
464 interface IVMRImagePresenterExclModeConfig : IVMRImagePresenterConfig
466 HRESULT SetXlcModeDDObjAndPrimarySurface([in] IDirectDraw7 *dddev, [in] IDirectDrawSurface7 *ddsurface);
467 HRESULT GetXlcModeDDObjAndPrimarySurface([out] IDirectDraw7 **dddev, [out] IDirectDrawSurface7 **ddsurface);
471 local,
472 object,
473 uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a),
474 helpstring("IVPManager interface"),
475 pointer_default(unique)
477 interface IVPManager : IUnknown
479 HRESULT SetVideoPortIndex([in] DWORD index);
480 HRESULT GetVideoPortIndex([out] DWORD *index);