amvideo.idl 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /*
  2. * Copyright (C) 2003 Robert Shearman
  3. *
  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.
  8. *
  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.
  13. *
  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
  17. */
  18. import "objidl.idl";
  19. /* trick widl into thinking that it knows the DirectDraw types
  20. * as there is no IDL file for them (yet) */
  21. cpp_quote("#if 0")
  22. interface IDirectDraw;
  23. typedef void DDSURFACEDESC,DDCAPS;
  24. typedef DWORD RGBQUAD;
  25. typedef LONGLONG REFERENCE_TIME;
  26. typedef struct
  27. {
  28. DWORD biSize;
  29. LONG biWidth;
  30. LONG biHeight;
  31. WORD biPlanes;
  32. WORD biBitCount;
  33. DWORD biCompression;
  34. DWORD biSizeImage;
  35. LONG biXPelsPerMeter;
  36. LONG biYPelsPerMeter;
  37. DWORD biClrUsed;
  38. DWORD biClrImportant;
  39. } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
  40. cpp_quote("#endif")
  41. cpp_quote("#include <ddraw.h>")
  42. cpp_quote("#define AMDDS_NONE 0x00")
  43. cpp_quote("#define AMDDS_DCIPS 0x01")
  44. cpp_quote("#define AMDDS_PS 0x02")
  45. cpp_quote("#define AMDDS_RGBOVR 0x04")
  46. cpp_quote("#define AMDDS_YUVOVR 0x08")
  47. cpp_quote("#define AMDDS_RGBOFF 0x10")
  48. cpp_quote("#define AMDDS_YUVOFF 0x20")
  49. cpp_quote("#define AMDDS_RGBFLP 0x40")
  50. cpp_quote("#define AMDDS_YUVFLP 0x80")
  51. cpp_quote("#define AMDDS_ALL 0xFF")
  52. cpp_quote("#define AMDDS_DEFAULT AMDDS_ALL")
  53. cpp_quote("#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP)")
  54. cpp_quote("#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP)")
  55. cpp_quote("#define AMDSS_PRIMARY (AMDDS_DCIPS | AMDDS_PS)")
  56. [
  57. object,
  58. /* uuid(36d39eb0-dd75-11ce-bf0e-00aa0055595a) conflicts with uuids.h */
  59. pointer_default(unique),
  60. local
  61. ]
  62. interface IDirectDrawVideo : IUnknown
  63. {
  64. HRESULT GetSwitches([out] DWORD * pSwitches);
  65. HRESULT SetSwitches([in] DWORD Switches);
  66. HRESULT GetCaps([out] DDCAPS * pCaps);
  67. HRESULT GetEmulatedCaps([out] DDCAPS *pCaps);
  68. HRESULT GetSurfaceDesc([out] DDSURFACEDESC * pSurfaceDesc);
  69. HRESULT GetFourCCCodes([out] DWORD * pCount, [out] DWORD * pCodes);
  70. HRESULT SetDirectDraw([in] IDirectDraw *ddraw);
  71. HRESULT GetDirectDraw([out] IDirectDraw **ddraw);
  72. HRESULT GetSurfaceType([out] DWORD * pSurfaceType);
  73. HRESULT SetDefault();
  74. HRESULT UseScanLine([in] long UseScanLine);
  75. HRESULT CanUseScanLine([out] long * UseScanLine);
  76. HRESULT UseOverlayStretch([in] long UseOverlayStretch);
  77. HRESULT CanUseOverlayStretch([out] long * UseOverlayStretch);
  78. HRESULT UseWhenFullScreen([in] long UseWhenFullScreen);
  79. HRESULT WillUseFullScreen([out] long * UseWhenFullScreen);
  80. }
  81. [
  82. object,
  83. /* uuid(1bd0ecb0-f8e2-11ce-aac6-0020af0b99a3) conflicts with uuids.h */
  84. pointer_default(unique),
  85. local
  86. ]
  87. interface IQualProp : IUnknown
  88. {
  89. [propget] HRESULT FramesDroppedInRenderer([out] int * pcFrames);
  90. [propget] HRESULT FramesDrawn([out] int * pcFramesDrawn);
  91. [propget] HRESULT AvgFrameRate([out] int * piAvgFrameRate);
  92. [propget] HRESULT Jitter([out] int * iJitter);
  93. [propget] HRESULT AvgSyncOffset([out] int * piAvg);
  94. [propget] HRESULT DevSyncOffset([out] int * piDev);
  95. }
  96. [
  97. object,
  98. /* uuid(dd1d7110-7836-11cf-bf47-00aa0055595a) conflicts with uuids.h */
  99. pointer_default(unique)
  100. ]
  101. interface IFullScreenVideo : IUnknown
  102. {
  103. HRESULT CountModes([out] long * pModes);
  104. HRESULT GetModeInfo([in] long Mode, [out] long * pWidth, [out] long * pHeight, [out] long * pDepth);
  105. HRESULT GetCurrentMode([out] long * pMode);
  106. HRESULT IsModeAvailable([in] long Mode);
  107. HRESULT IsModeEnabled([in] long Mode);
  108. HRESULT SetEnabled([in] long Mode, [in] long bEnabled);
  109. HRESULT GetClipFactor([out] long * pClipFactor);
  110. HRESULT SetClipFactor([in] long ClipFactor);
  111. HRESULT SetMessageDrain([in] HWND hwnd);
  112. HRESULT GetMessageDrain([out] HWND * hwnd);
  113. HRESULT SetMonitor([in] long Monitor);
  114. HRESULT GetMonitor([out] long * Monitor);
  115. HRESULT HideOnDeactivate([in] long Hide);
  116. HRESULT IsHideOnDeactivate();
  117. HRESULT SetCaption([in] BSTR strCaption);
  118. HRESULT GetCaption([out] BSTR * pstrCaption);
  119. HRESULT SetDefault();
  120. }
  121. [
  122. object,
  123. /* uuid(53479470-f1dd-11cf-bc42-00aa00ac74f6) conflicts with uuids.h */
  124. pointer_default(unique),
  125. local
  126. ]
  127. interface IFullScreenVideoEx : IFullScreenVideo
  128. {
  129. HRESULT SetAcceleratorTable([in] HWND hwnd, [in] HACCEL hAccel);
  130. HRESULT GetAcceleratorTable([out] HWND * phwnd, [out] HACCEL * phAccel);
  131. HRESULT KeepPixelAspectRatio([in] long KeepAspect);
  132. /* FIXME: not sure is this next method is an [out] */
  133. HRESULT IsKeepPixelAspectRatio([out] long * pKeepAspect);
  134. }
  135. [
  136. object,
  137. /* uuid(61ded640-e912-11ce-a099-00aa00479a58) conflicts with uuids.h */
  138. pointer_default(unique),
  139. local
  140. ]
  141. interface IBaseVideoMixer : IUnknown
  142. {
  143. HRESULT SetLeadPin([in] int iPin);
  144. HRESULT GetLeadPin([out] int * piPin);
  145. HRESULT GetInputPinCount([out] int * piPinCount);
  146. HRESULT IsUsingClock([out] int * pbValue);
  147. HRESULT SetUsingClock([in] int bValue);
  148. HRESULT GetClockPeriod([out] int * pbValue);
  149. HRESULT SetClockPeriod([in] int bValue);
  150. }
  151. #define iPALETTE_COLORS 256
  152. #define iMASK_COLORS 3
  153. cpp_quote("#define iPALETTE_COLORS 256")
  154. cpp_quote("#define iEGA_COLORS 16")
  155. cpp_quote("#define iMASK_COLORS 3")
  156. cpp_quote("#define iTRUECOLOR 16")
  157. cpp_quote("#define iRED 0")
  158. cpp_quote("#define iGREEN 1")
  159. cpp_quote("#define iBLUE 2")
  160. cpp_quote("#define iPALETTE 8")
  161. cpp_quote("#define iMAXBITS 8")
  162. typedef struct tag_TRUECOLORINFO
  163. {
  164. DWORD dwBitMasks[iMASK_COLORS];
  165. RGBQUAD bmiColors[iPALETTE_COLORS];
  166. } TRUECOLORINFO;
  167. typedef struct tagVIDEOINFOHEADER
  168. {
  169. RECT rcSource;
  170. RECT rcTarget;
  171. DWORD dwBitRate;
  172. DWORD dwBitErrorRate;
  173. REFERENCE_TIME AvgTimePerFrame;
  174. BITMAPINFOHEADER bmiHeader;
  175. } VIDEOINFOHEADER;
  176. typedef struct tagVIDEOINFO
  177. {
  178. RECT rcSource;
  179. RECT rcTarget;
  180. DWORD dwBitRate;
  181. DWORD dwBitErrorRate;
  182. REFERENCE_TIME AvgTimePerFrame;
  183. BITMAPINFOHEADER bmiHeader;
  184. union
  185. {
  186. RGBQUAD bmiColors[iPALETTE_COLORS];
  187. DWORD dwBitMasks[iMASK_COLORS];
  188. TRUECOLORINFO TrueColorInfo;
  189. };
  190. } VIDEOINFO;
  191. typedef struct tagMPEG1VIDEOINFO
  192. {
  193. VIDEOINFOHEADER hdr;
  194. DWORD dwStartTimeCode;
  195. DWORD cbSequenceHeader;
  196. BYTE bSequenceHeader[1];
  197. } MPEG1VIDEOINFO;
  198. cpp_quote("#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140")
  199. cpp_quote("#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)")
  200. typedef struct tagAnalogVideoInfo
  201. {
  202. RECT rcSource;
  203. RECT rcTarget;
  204. DWORD dwActiveWidth;
  205. DWORD dwActiveHeight;
  206. REFERENCE_TIME AvgTimePerFrame;
  207. } ANALOGVIDEOINFO;
  208. typedef enum
  209. {
  210. AM_PROPERTY_FRAMESTEP_STEP = 0x01,
  211. AM_PROPERTY_FRAMESTEP_CANCEL = 0x02,
  212. AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03,
  213. AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04
  214. } AM_PROPERTY_FRAMESTEP;
  215. typedef struct _AM_FRAMESTEP_STEP
  216. {
  217. DWORD dwFramesToStep;
  218. } AM_FRAMESTEP_STEP;