Don't user the local attribute twice.
[reactos.git] / reactos / include / dxsdk / vmrender.idl
1
2 cpp_quote("#if 0")
3
4 import "unknwn.idl";
5 typedef int DWORD;
6 typedef int REFERENCE_TIME;
7 typedef int HMONITOR;
8 typedef int AM_MEDIA_TYPE;
9
10 typedef DWORD* LPDIRECTDRAW7;
11 typedef DWORD* LPDIRECTDRAWSURFACE7;
12 typedef DWORD* LPDDPIXELFORMAT;
13 typedef DWORD* LPBITMAPINFOHEADER;
14 typedef struct {DWORD dw1; DWORD dw2;} DDCOLORKEY;
15 typedef DDCOLORKEY* LPDDCOLORKEY;
16 cpp_quote ("#endif")
17
18 cpp_quote("#include <ddraw.h>")
19
20 cpp_quote("#define VMRBITMAP_DISABLE 0x00000001")
21 cpp_quote("#define VMRBITMAP_HDC 0x00000002")
22 cpp_quote("#define VMRBITMAP_ENTIREDDS 0x00000004")
23 cpp_quote("#define VMRBITMAP_SRCCOLORKEY 0x00000008")
24 cpp_quote("#define VMRBITMAP_SRCRECT 0x00000010")
25
26 interface IVMRSurface;
27 interface IVMRSurfaceAllocator;
28 interface IVMRSurfaceAllocatorNotify;
29 interface IVMRImagePresenter;
30 interface IVMRImagePresenterConfig;
31 interface IVMRWindowlessControl;
32 interface IVMRMixerControl;
33 interface IVMRMixerBitmap;
34 interface IVMRFilterConfig;
35 interface IVMRAspectRatioControl;
36 interface IVMRDeinterlaceControl;
37 interface IVMRMonitorConfig;
38 interface IVMRImageCompositor;
39 interface IVMRVideoStreamControl;
40
41 #define VMRDEVICENAMELEN 32
42 #define VMRDEVICEDESCRIPTIONLEN 256
43
44 typedef enum
45 {
46 VMRSample_SyncPoint = 0x00000001,
47 VMRSample_Preroll = 0x00000002,
48 VMRSample_Discontinuity = 0x00000004,
49 VMRSample_TimeValid = 0x00000008,
50 VMRSample_SrcDstRectsValid= 0x00000010
51 } VMRPresentationFlags;
52
53 typedef enum
54 {
55 AMAP_PIXELFORMAT_VALID = 0x01,
56 AMAP_3D_TARGET = 0x02,
57 AMAP_ALLOW_SYSMEM = 0x04,
58 AMAP_FORCE_SYSMEM = 0x08,
59 AMAP_DIRECTED_FLIP = 0x10,
60 AMAP_DXVA_TARGET = 0x20
61 } VMRSurfaceAllocationFlags;
62
63 typedef enum
64 {
65 VMR_ARMODE_NONE,
66 VMR_ARMODE_LETTER_BOX
67 } VMR_ASPECT_RATIO_MODE;
68
69
70 typedef enum
71 {
72 MixerPref_NoDecimation = 0x00000001,
73 MixerPref_DecimateOutput = 0x00000002,
74 MixerPref_ARAdjustXorY = 0x00000004,
75 MixerPref_DecimationReserved = 0x00000008,
76 MixerPref_DecimateMask = 0x0000000F,
77 MixerPref_BiLinearFiltering = 0x00000010,
78 MixerPref_PointFiltering = 0x00000020,
79 MixerPref_FilteringMask = 0x000000F0,
80 MixerPref_RenderTargetRGB = 0x00000100,
81 MixerPref_RenderTargetYUV = 0x00001000,
82 MixerPref_RenderTargetYUV420 = 0x00000200,
83 MixerPref_RenderTargetYUV422 = 0x00000400,
84 MixerPref_RenderTargetYUV444 = 0x00000800,
85 MixerPref_RenderTargetReserved = 0x0000E000,
86 MixerPref_RenderTargetMask = 0x0000FF00,
87 MixerPref_DynamicSwitchToBOB = 0x00010000,
88 MixerPref_DynamicDecimateBy2 = 0x00020000,
89 MixerPref_DynamicReserved = 0x000C0000,
90 MixerPref_DynamicMask = 0x000F0000
91 } VMRMixerPrefs;
92
93 typedef enum
94 {
95 RenderPrefs_RestrictToInitialMonitor = 0x00000000,
96 RenderPrefs_ForceOffscreen = 0x00000001,
97 RenderPrefs_ForceOverlays = 0x00000002,
98 RenderPrefs_AllowOverlays = 0x00000000,
99 RenderPrefs_AllowOffscreen = 0x00000000,
100 RenderPrefs_DoNotRenderColorKeyAndBorder = 0x00000008,
101 RenderPrefs_Reserved = 0x00000010,
102 RenderPrefs_PreferAGPMemWhenMixing = 0x00000020,
103
104 RenderPrefs_Mask = 0x0000003f,
105 } VMRRenderPrefs;
106
107 typedef enum
108 {
109 VMRMode_Windowed = 0x00000001,
110 VMRMode_Windowless = 0x00000002,
111 VMRMode_Renderless = 0x00000004,
112 VMRMode_Mask = 0x00000007,
113 } VMRMode;
114
115 enum
116 {
117 MAX_NUMBER_OF_STREAMS = 16
118 };
119
120 typedef enum
121 {
122 DeinterlacePref_NextBest = 0x01,
123 DeinterlacePref_BOB = 0x02,
124 DeinterlacePref_Weave = 0x04,
125 DeinterlacePref_Mask = 0x07
126 } VMRDeinterlacePrefs;
127
128 typedef enum
129 {
130 DeinterlaceTech_Unknown = 0x0000,
131 DeinterlaceTech_BOBLineReplicate = 0x0001,
132 DeinterlaceTech_BOBVerticalStretch = 0x0002,
133 DeinterlaceTech_MedianFiltering = 0x0004,
134 DeinterlaceTech_EdgeFiltering = 0x0010,
135 DeinterlaceTech_FieldAdaptive = 0x0020,
136 DeinterlaceTech_PixelAdaptive = 0x0040,
137 DeinterlaceTech_MotionVectorSteered = 0x0080
138 } VMRDeinterlaceTech;
139
140 typedef struct tagVMRPRESENTATIONINFO
141 {
142 DWORD dwFlags;
143 LPDIRECTDRAWSURFACE7 lpSurf;
144 REFERENCE_TIME rtStart;
145 REFERENCE_TIME rtEnd;
146 SIZE szAspectRatio;
147 RECT rcSrc;
148 RECT rcDst;
149 DWORD dwTypeSpecificFlags;
150 DWORD dwInterlaceFlags;
151 } VMRPRESENTATIONINFO;
152
153 typedef struct tagVMRALLOCATIONINFO
154 {
155 DWORD dwFlags;
156 LPBITMAPINFOHEADER lpHdr;
157 LPDDPIXELFORMAT lpPixFmt;
158 SIZE szAspectRatio;
159 DWORD dwMinBuffers;
160 DWORD dwMaxBuffers;
161 DWORD dwInterlaceFlags;
162 SIZE szNativeSize;
163 } VMRALLOCATIONINFO;
164
165 typedef struct _NORMALIZEDRECT
166 {
167 float left;
168 float top;
169 float right;
170 float bottom;
171 } NORMALIZEDRECT, *PNORMALIZEDRECT;
172
173 typedef struct tagVMRGUID
174 {
175 GUID* pGUID;
176 GUID GUID;
177 } VMRGUID;
178
179 typedef struct tagVMRMONITORINFO
180 {
181 VMRGUID guid;
182 RECT rcMonitor;
183 HMONITOR hMon;
184 DWORD dwFlags;
185 wchar_t szDevice[VMRDEVICENAMELEN];
186 wchar_t szDescription[VMRDEVICEDESCRIPTIONLEN];
187 LARGE_INTEGER liDriverVersion;
188 DWORD dwVendorId;
189 DWORD dwDeviceId;
190 DWORD dwSubSysId;
191 DWORD dwRevision;
192 } VMRMONITORINFO;
193
194 typedef struct _VMRFrequency
195 {
196 DWORD dwNumerator;
197 DWORD dwDenominator;
198 } VMRFrequency;
199
200 typedef struct _VMRVideoDesc
201 {
202 DWORD dwSize;
203 DWORD dwSampleWidth;
204 DWORD dwSampleHeight;
205 BOOL SingleFieldPerSample;
206 DWORD dwFourCC;
207 VMRFrequency InputSampleFreq;
208 VMRFrequency OutputFrameFreq;
209 } VMRVideoDesc;
210
211 typedef struct _VMRDeinterlaceCaps
212 {
213 DWORD dwSize;
214 DWORD dwNumPreviousOutputFrames;
215 DWORD dwNumForwardRefSamples;
216 DWORD dwNumBackwardRefSamples;
217 VMRDeinterlaceTech DeinterlaceTechnology;
218 } VMRDeinterlaceCaps;
219
220 typedef struct _VMRALPHABITMAP
221 {
222 DWORD dwFlags;
223 HDC hdc;
224 LPDIRECTDRAWSURFACE7 pDDS;
225 RECT rSrc;
226 NORMALIZEDRECT rDest;
227 FLOAT fAlpha;
228 COLORREF clrSrcKey;
229 } VMRALPHABITMAP, *PVMRALPHABITMAP;
230
231 typedef struct _VMRVIDEOSTREAMINFO
232 {
233 LPDIRECTDRAWSURFACE7 pddsVideoSurface;
234 DWORD dwWidth;
235 DWORD dwHeight;
236 FLOAT dwStrmID;
237 FLOAT fAlpha;
238 DDCOLORKEY ddClrKey;
239 NORMALIZEDRECT rNormal;
240 } VMRVIDEOSTREAMINFO;
241
242
243
244 [
245 local,
246 object,
247 uuid(CE704FE7-E71E-41fb-BAA2-C4403E1182F5),
248 pointer_default(unique)
249 ]
250 interface IVMRImagePresenter : IUnknown
251 {
252 HRESULT StartPresenting([in] DWORD_PTR dwUserID);
253 HRESULT StopPresenting([in] DWORD_PTR dwUserID);
254 HRESULT PresentImage([in] DWORD_PTR dwUserID, [in] VMRPRESENTATIONINFO* lpPresInfo);
255 };
256
257 [
258 local,
259 object,
260 uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52),
261 pointer_default(unique)
262 ]
263 interface IVMRSurfaceAllocator : IUnknown
264 {
265 HRESULT AllocateSurface([in] DWORD_PTR dwUserID, [in] VMRALLOCATIONINFO* lpAllocInfo, [in] [out] DWORD* lpdwActualBuffers, [out] LPDIRECTDRAWSURFACE7 *lplpSurface);
266 HRESULT FreeSurface([in] DWORD_PTR dwID);
267 HRESULT PrepareSurface([in] DWORD_PTR dwUserID, [in] LPDIRECTDRAWSURFACE7 lpSurface, [in] DWORD dwSurfaceFlags);
268 HRESULT AdviseNotify([in] IVMRSurfaceAllocatorNotify* lpIVMRSurfAllocNotify);
269 };
270
271 [
272 local,
273 object,
274 uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2),
275 pointer_default(unique)
276 ]
277 interface IVMRSurfaceAllocatorNotify : IUnknown
278 {
279 HRESULT AdviseSurfaceAllocator([in] DWORD_PTR dwUserID, [in] IVMRSurfaceAllocator* lpIVRMSurfaceAllocator);
280 HRESULT SetDDrawDevice([in] LPDIRECTDRAW7 lpDDrawDevice, [in] HMONITOR hMonitor);
281 HRESULT ChangeDDrawDevice([in] LPDIRECTDRAW7 lpDDrawDevice, [in] HMONITOR hMonitor);
282 HRESULT RestoreDDrawSurfaces();
283 HRESULT NotifyEvent([in] LONG EventCode, [in] LONG_PTR Param1, [in] LONG_PTR Param2);
284 HRESULT SetBorderColor([in] COLORREF clrBorder);
285 };
286
287 [
288 local,
289 object,
290 uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7),
291 pointer_default(unique)
292 ]
293 interface IVMRWindowlessControl : IUnknown
294 {
295 HRESULT GetNativeVideoSize([out] LONG* lpWidth, [out] LONG* lpHeight, [out] LONG* lpARWidth, [out] LONG* lpARHeight);
296 HRESULT GetMinIdealVideoSize([out] LONG* lpWidth, [out] LONG* lpHeight);
297 HRESULT GetMaxIdealVideoSize([out] LONG* lpWidth, [out] LONG* lpHeight);
298 HRESULT SetVideoPosition([in] const LPRECT lpSRCRect, [in] const LPRECT lpDSTRect);
299 HRESULT GetVideoPosition([out] LPRECT lpSRCRect, [out] LPRECT lpDSTRect);
300 HRESULT GetAspectRatioMode([out] DWORD* lpAspectRatioMode);
301 HRESULT SetAspectRatioMode([in] DWORD AspectRatioMode);
302 HRESULT SetVideoClippingWindow([in] HWND hwnd);
303 HRESULT RepaintVideo([in] HWND hwnd, [in] HDC hdc);
304 HRESULT DisplayModeChanged();
305 HRESULT GetCurrentImage([out] BYTE** lpDib);
306 HRESULT SetBorderColor([in] COLORREF Clr);
307 HRESULT GetBorderColor([out] COLORREF* lpClr);
308 HRESULT SetColorKey([in] COLORREF Clr);
309 HRESULT GetColorKey([out] COLORREF* lpClr);
310 };
311
312 [
313 local,
314 object,
315 uuid(1c1a17b0-bed0-415d-974b-dc6696131599),
316 pointer_default(unique)
317 ]
318 interface IVMRMixerControl : IUnknown
319 {
320 HRESULT SetAlpha([in] DWORD dwStreamID, [in] float Alpha);
321 HRESULT GetAlpha([in] DWORD dwStreamID, [out] float* pAlpha);
322 HRESULT SetZOrder([in] DWORD dwStreamID, [in] DWORD dwZ);
323 HRESULT GetZOrder([in] DWORD dwStreamID, [out] DWORD* pZ);
324 HRESULT SetOutputRect([in] DWORD dwStreamID, [in] const NORMALIZEDRECT *pRect);
325 HRESULT GetOutputRect([in] DWORD dwStreamID, [out] NORMALIZEDRECT *pRect);
326 HRESULT SetBackgroundClr([in] COLORREF ClrBkg);
327 HRESULT GetBackgroundClr([in] COLORREF* lpClrBkg);
328 HRESULT SetMixingPrefs([in] DWORD dwMixerPrefs);
329 HRESULT GetMixingPrefs([out] DWORD* pdwMixerPrefs);
330 };
331
332 [
333 object,
334 local,
335 uuid(9cf0b1b6-fbaa-4b7f-88cf-cf1f130a0dce),
336 pointer_default(unique)
337 ]
338 interface IVMRMonitorConfig : IUnknown
339 {
340 HRESULT SetMonitor([in] const VMRGUID *pGUID);
341 HRESULT GetMonitor([out] VMRGUID *pGUID);
342 HRESULT SetDefaultMonitor([in] const VMRGUID *pGUID);
343 HRESULT GetDefaultMonitor([out] VMRGUID *pGUID);
344 HRESULT GetAvailableMonitors([out, size_is(dwMaxInfoArraySize)] VMRMONITORINFO* pInfo, [in] DWORD dwMaxInfoArraySize, [out] DWORD* pdwNumDevices);
345 };
346
347
348 [
349 object,
350 local,
351 uuid(9e5530c5-7034-48b4-bb46-0b8a6efc8e36),
352 pointer_default(unique)
353 ]
354 interface IVMRFilterConfig : IUnknown
355 {
356 HRESULT SetImageCompositor([in] IVMRImageCompositor* lpVMRImgCompositor);
357 HRESULT SetNumberOfStreams([in] DWORD dwMaxStreams);
358 HRESULT GetNumberOfStreams([out] DWORD* pdwMaxStreams);
359 HRESULT SetRenderingPrefs([in] DWORD dwRenderFlags);
360 HRESULT GetRenderingPrefs([out] DWORD* pdwRenderFlags);
361 HRESULT SetRenderingMode([in] DWORD Mode);
362 HRESULT GetRenderingMode([out] DWORD* pMode);
363 }
364
365
366 [
367 object,
368 local,
369 uuid(ede80b5c-bad6-4623-b537-65586c9f8dfd),
370 pointer_default(unique)
371 ]
372 interface IVMRAspectRatioControl : IUnknown
373 {
374 HRESULT GetAspectRatioMode([out] LPDWORD lpdwARMode);
375 HRESULT SetAspectRatioMode([in] DWORD dwARMode);
376 }
377
378 [
379 object,
380 local,
381 uuid(bb057577-0db8-4e6a-87a7-1a8c9a505a0f),
382 pointer_default(unique)
383 ]
384 interface IVMRDeinterlaceControl : IUnknown
385 {
386
387 HRESULT GetNumberOfDeinterlaceModes([in] VMRVideoDesc* lpVideoDescription, [in] [out] LPDWORD lpdwNumDeinterlaceModes, [out] LPGUID lpDeinterlaceModes);
388 HRESULT GetDeinterlaceModeCaps([in] LPGUID lpDeinterlaceMode, [in] VMRVideoDesc* lpVideoDescription, [in] [out] VMRDeinterlaceCaps* lpDeinterlaceCaps);
389 HRESULT GetDeinterlaceMode([in] DWORD dwStreamID, [out] LPGUID lpDeinterlaceMode );
390 HRESULT SetDeinterlaceMode([in] DWORD dwStreamID, [in] LPGUID lpDeinterlaceMode);
391 HRESULT GetDeinterlacePrefs([out] LPDWORD lpdwDeinterlacePrefs);
392 HRESULT SetDeinterlacePrefs([in] DWORD dwDeinterlacePrefs);
393 HRESULT GetActualDeinterlaceMode([in] DWORD dwStreamID, [out] LPGUID lpDeinterlaceMode);
394 }
395
396 [
397 object,
398 local,
399 uuid(1E673275-0257-40aa-AF20-7C608D4A0428),
400 pointer_default(unique)
401 ]
402 interface IVMRMixerBitmap : IUnknown
403 {
404 HRESULT SetAlphaBitmap([in] const VMRALPHABITMAP *pBmpParms);
405 HRESULT UpdateAlphaBitmapParameters([in] PVMRALPHABITMAP pBmpParms);
406 HRESULT GetAlphaBitmapParameters([out] PVMRALPHABITMAP pBmpParms);
407 };
408
409 [
410 local,
411 object,
412 uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82),
413 pointer_default(unique)
414 ]
415 interface IVMRImageCompositor : IUnknown
416 {
417 HRESULT InitCompositionTarget([in] IUnknown* pD3DDevice, [in] LPDIRECTDRAWSURFACE7 pddsRenderTarget);
418 HRESULT TermCompositionTarget([in] IUnknown* pD3DDevice, [in] LPDIRECTDRAWSURFACE7 pddsRenderTarget);
419 HRESULT SetStreamMediaType([in] DWORD dwStrmID, [in] AM_MEDIA_TYPE* pmt, [in] BOOL fTexture);
420 HRESULT CompositeImage([in] IUnknown* pD3DDevice, [in] LPDIRECTDRAWSURFACE7 pddsRenderTarget, [in] AM_MEDIA_TYPE* pmtRenderTarget, [in] REFERENCE_TIME rtStart, [in] REFERENCE_TIME rtEnd, [in] DWORD dwClrBkGnd, [in] VMRVIDEOSTREAMINFO* pVideoStreamInfo, [in] UINT cStreams);
421 };
422
423 [
424 object,
425 local,
426 uuid(058d1f11-2a54-4bef-bd54-df706626b727),
427 pointer_default(unique)
428 ]
429 interface IVMRVideoStreamControl: IUnknown
430 {
431 HRESULT SetColorKey([in] LPDDCOLORKEY lpClrKey);
432 HRESULT GetColorKey([out] LPDDCOLORKEY lpClrKey);
433 HRESULT SetStreamActiveState([in] BOOL fActive);
434 HRESULT GetStreamActiveState([out] BOOL* lpfActive);
435 };
436
437 [
438 local,
439 object,
440 uuid(a9849bbe-9ec8-4263-b764-62730f0d15d0),
441 pointer_default(unique)
442 ]
443 interface IVMRSurface : IUnknown
444 {
445 HRESULT IsSurfaceLocked();
446 HRESULT LockSurface([out] BYTE** lpSurface);
447 HRESULT UnlockSurface();
448 HRESULT GetSurface([out] LPDIRECTDRAWSURFACE7 *lplpSurface);
449 };
450
451 [
452 local,
453 object,
454 uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178),
455 pointer_default(unique)
456 ]
457
458 interface IVMRImagePresenterConfig : IUnknown
459 {
460 HRESULT SetRenderingPrefs([in] DWORD dwRenderFlags);
461 HRESULT GetRenderingPrefs([out] DWORD* dwRenderFlags);
462 }
463
464 [
465 local,
466 object,
467 uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea),
468 pointer_default(unique)
469 ]
470
471 interface IVMRImagePresenterExclModeConfig : IVMRImagePresenterConfig
472 {
473 HRESULT SetXlcModeDDObjAndPrimarySurface([in] LPDIRECTDRAW7 lpDDObj, [in] LPDIRECTDRAWSURFACE7 lpPrimarySurf);
474 HRESULT GetXlcModeDDObjAndPrimarySurface([out] LPDIRECTDRAW7* lpDDObj, [out] LPDIRECTDRAWSURFACE7* lpPrimarySurf);
475 }
476
477 [
478 local,
479 object,
480 uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a),
481 pointer_default(unique)
482 ]
483 interface IVPManager : IUnknown
484 {
485 HRESULT SetVideoPortIndex([in] DWORD dwVideoPortIndex);
486 HRESULT GetVideoPortIndex([out] DWORD* pdwVideoPortIndex);
487 };
488