2 * Copyright (C) 2003 Robert Shearman
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
21 /* trick widl into thinking that it knows the DirectDraw types
22 * as there is no IDL file for them (yet) */
24 typedef void * LPDIRECTDRAW
;
25 typedef void DDSURFACEDESC
,DDCAPS
;
26 typedef DWORD RGBQUAD
;
27 typedef LONGLONG REFERENCE_TIME
;
41 } BITMAPINFOHEADER
, *PBITMAPINFOHEADER
, *LPBITMAPINFOHEADER
;
44 cpp_quote
("#include <ddraw.h>")
46 cpp_quote
("#define AMDDS_NONE 0x00")
47 cpp_quote
("#define AMDDS_DCIPS 0x01")
48 cpp_quote
("#define AMDDS_PS 0x02")
49 cpp_quote
("#define AMDDS_RGBOVR 0x04")
50 cpp_quote
("#define AMDDS_YUVOVR 0x08")
51 cpp_quote
("#define AMDDS_RGBOFF 0x10")
52 cpp_quote
("#define AMDDS_YUVOFF 0x20")
53 cpp_quote
("#define AMDDS_RGBFLP 0x40")
54 cpp_quote
("#define AMDDS_YUVFLP 0x80")
55 cpp_quote
("#define AMDDS_ALL 0xFF")
56 cpp_quote
("#define AMDDS_DEFAULT AMDDS_ALL")
58 cpp_quote
("#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP)")
59 cpp_quote
("#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP)")
60 cpp_quote
("#define AMDSS_PRIMARY (AMDDS_DCIPS | AMDDS_PS)")
64 /* uuid(36d39eb0-dd75-11ce-bf0e-00aa0055595a) conflicts with uuids.h */
65 pointer_default(unique),
68 interface IDirectDrawVideo
: IUnknown
70 HRESULT GetSwitches
([out] DWORD
* pSwitches
);
71 HRESULT SetSwitches
([in] DWORD Switches
);
72 HRESULT GetCaps
([out] DDCAPS
* pCaps
);
73 HRESULT GetEmulatedCaps
([out] DDCAPS
*pCaps
);
74 HRESULT GetSurfaceDesc
([out] DDSURFACEDESC
* pSurfaceDesc
);
75 HRESULT GetFourCCCodes
([out] DWORD
* pCount
, [out] DWORD
* pCodes
);
76 HRESULT SetDirectDraw
([in] LPDIRECTDRAW pDirectDraw
);
77 HRESULT GetDirectDraw
([out] LPDIRECTDRAW
* ppDirectDraw
);
78 HRESULT GetSurfaceType
([out] DWORD
* pSurfaceType
);
80 HRESULT UseScanLine
([in] long UseScanLine
);
81 HRESULT CanUseScanLine
([out] long * UseScanLine
);
82 HRESULT UseOverlayStretch
([in] long UseOverlayStretch
);
83 HRESULT CanUseOverlayStretch
([out] long * UseOverlayStretch
);
84 HRESULT UseWhenFullScreen
([in] long UseWhenFullScreen
);
85 HRESULT WillUseFullScreen
([out] long * UseWhenFullScreen
);
90 /* uuid(1bd0ecb0-f8e2-11ce-aac6-0020af0b99a3) conflicts with uuids.h */
91 pointer_default(unique),
94 interface IQualProp
: IUnknown
96 [propget] HRESULT FramesDroppedInRenderer
([out] int * pcFrames
);
97 [propget] HRESULT FramesDrawn
([out] int * pcFramesDrawn
);
98 [propget] HRESULT AvgFrameRate
([out] int * piAvgFrameRate
);
99 [propget] HRESULT Jitter
([out] int * iJitter
);
100 [propget] HRESULT AvgSyncOffset
([out] int * piAvg
);
101 [propget] HRESULT DevSyncOffset
([out] int * piDev
);
106 /* uuid(dd1d7110-7836-11cf-bf47-00aa0055595a) conflicts with uuids.h */
107 pointer_default(unique)
109 interface IFullScreenVideo
: IUnknown
111 HRESULT CountModes
([out] long * pModes
);
112 HRESULT GetModeInfo
([in] long Mode
, [out] long * pWidth
, [out] long * pHeight
, [out] long * pDepth
);
113 HRESULT GetCurrentMode
([out] long * pMode
);
114 HRESULT IsModeAvailable
([in] long Mode
);
115 HRESULT IsModeEnabled
([in] long Mode
);
116 HRESULT SetEnabled
([in] long Mode
, [in] long bEnabled
);
117 HRESULT GetClipFactor
([out] long * pClipFactor
);
118 HRESULT SetClipFactor
([in] long ClipFactor
);
119 HRESULT SetMessageDrain
([in] HWND hwnd
);
120 HRESULT GetMessageDrain
([out] HWND
* hwnd
);
121 HRESULT SetMonitor
([in] long Monitor
);
122 HRESULT GetMonitor
([out] long * Monitor
);
123 HRESULT HideOnDeactivate
([in] long Hide
);
124 HRESULT IsHideOnDeactivate
();
125 HRESULT SetCaption
([in] BSTR strCaption
);
126 HRESULT GetCaption
([out] BSTR * pstrCaption
);
127 HRESULT SetDefault
();
132 /* uuid(53479470-f1dd-11cf-bc42-00aa00ac74f6) conflicts with uuids.h */
133 pointer_default(unique),
136 interface IFullScreenVideoEx
: IFullScreenVideo
138 HRESULT SetAcceleratorTable
([in] HWND hwnd
, [in] HACCEL hAccel
);
139 HRESULT GetAcceleratorTable
([out] HWND
* phwnd
, [out] HACCEL
* phAccel
);
140 HRESULT KeepPixelAspectRatio
([in] long KeepAspect
);
141 /* FIXME: not sure is this next method is an [out] */
142 HRESULT IsKeepPixelAspectRatio
([out] long * pKeepAspect
);
147 /* uuid(61ded640-e912-11ce-a099-00aa00479a58) conflicts with uuids.h */
148 pointer_default(unique),
151 interface IBaseVideoMixer
: IUnknown
153 HRESULT SetLeadPin
([in] int iPin
);
154 HRESULT GetLeadPin
([out] int * piPin
);
155 HRESULT GetInputPinCount
([out] int * piPinCount
);
156 HRESULT IsUsingClock
([out] int * pbValue
);
157 HRESULT SetUsingClock
([in] int bValue
);
158 HRESULT GetClockPeriod
([out] int * pbValue
);
159 HRESULT SetClockPeriod
([in] int bValue
);
162 #define iPALETTE_COLORS
256
163 #define iMASK_COLORS
3
165 cpp_quote
("#define iPALETTE_COLORS 256")
166 cpp_quote
("#define iEGA_COLORS 16")
167 cpp_quote
("#define iMASK_COLORS 3")
168 cpp_quote
("#define iTRUECOLOR 16")
169 cpp_quote
("#define iRED 0")
170 cpp_quote
("#define iGREEN 1")
171 cpp_quote
("#define iBLUE 2")
172 cpp_quote
("#define iPALETTE 8")
173 cpp_quote
("#define iMAXBITS 8")
175 typedef struct tag_TRUECOLORINFO
177 DWORD dwBitMasks
[iMASK_COLORS
];
178 RGBQUAD bmiColors
[iPALETTE_COLORS
];
181 typedef struct tagVIDEOINFOHEADER
186 DWORD dwBitErrorRate
;
187 REFERENCE_TIME AvgTimePerFrame
;
189 BITMAPINFOHEADER bmiHeader
;
192 typedef struct tagVIDEOINFO
197 DWORD dwBitErrorRate
;
198 REFERENCE_TIME AvgTimePerFrame
;
200 BITMAPINFOHEADER bmiHeader
;
204 RGBQUAD bmiColors
[iPALETTE_COLORS
];
205 DWORD dwBitMasks
[iMASK_COLORS
];
206 TRUECOLORINFO TrueColorInfo
;
210 typedef struct tagMPEG1VIDEOINFO
213 DWORD dwStartTimeCode
;
214 DWORD cbSequenceHeader
;
215 BYTE bSequenceHeader
[1];
218 cpp_quote
("#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140")
219 cpp_quote
("#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)")
221 typedef struct tagAnalogVideoInfo
226 DWORD dwActiveHeight
;
227 REFERENCE_TIME AvgTimePerFrame
;
232 AM_PROPERTY_FRAMESTEP_STEP
= 0x01,
233 AM_PROPERTY_FRAMESTEP_CANCEL
= 0x02,
234 AM_PROPERTY_FRAMESTEP_CANSTEP
= 0x03,
235 AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE
= 0x04
236 } AM_PROPERTY_FRAMESTEP
;
238 typedef struct _AM_FRAMESTEP_STEP
240 DWORD dwFramesToStep
;