amvideo.idl 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. typedef void * LPDIRECTDRAW;
  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. pointer_default(unique)
  59. ]
  60. interface IDirectDrawVideo : IUnknown
  61. {
  62. HRESULT GetSwitches([out] DWORD * pSwitches);
  63. HRESULT SetSwitches([in] DWORD Switches);
  64. HRESULT GetCaps([out] DDCAPS * pCaps);
  65. HRESULT GetEmulatedCaps([out] DDCAPS *pCaps);
  66. HRESULT GetSurfaceDesc([out] DDSURFACEDESC * pSurfaceDesc);
  67. HRESULT GetFourCCCodes([out] DWORD * pCount, [out] DWORD * pCodes);
  68. HRESULT SetDirectDraw([in] LPDIRECTDRAW pDirectDraw);
  69. HRESULT GetDirectDraw([out] LPDIRECTDRAW * ppDirectDraw);
  70. HRESULT GetSurfaceType([out] DWORD * pSurfaceType);
  71. HRESULT SetDefault();
  72. HRESULT UseScanLine([in] long UseScanLine);
  73. HRESULT CanUseScanLine([out] long * UseScanLine);
  74. HRESULT UseOverlayStretch([in] long UseOverlayStretch);
  75. HRESULT CanUseOverlayStretch([out] long * UseOverlayStretch);
  76. HRESULT UseWhenFullScreen([in] long UseWhenFullScreen);
  77. HRESULT WillUseFullScreen([out] long * UseWhenFullScreen);
  78. }
  79. [
  80. object,
  81. pointer_default(unique)
  82. ]
  83. interface IQualProp : IUnknown
  84. {
  85. [propget] HRESULT FramesDroppedInRenderer([out] int * pcFrames);
  86. [propget] HRESULT FramesDrawn([out] int * pcFramesDrawn);
  87. [propget] HRESULT AvgFrameRate([out] int * piAvgFrameRate);
  88. [propget] HRESULT Jitter([out] int * iJitter);
  89. [propget] HRESULT AvgSyncOffset([out] int * piAvg);
  90. [propget] HRESULT DevSyncOffset([out] int * piDev);
  91. }
  92. [
  93. object,
  94. pointer_default(unique)
  95. ]
  96. interface IFullScreenVideo : IUnknown
  97. {
  98. HRESULT CountModes([out] long * pModes);
  99. HRESULT GetModeInfo([in] long Mode, [out] long * pWidth, [out] long * pHeight, [out] long * pDepth);
  100. HRESULT GetCurrentMode([out] long * pMode);
  101. HRESULT IsModeAvailable([in] long Mode);
  102. HRESULT IsModeEnabled([in] long Mode);
  103. HRESULT SetEnabled([in] long Mode, [in] long bEnabled);
  104. HRESULT GetClipFactor([out] long * pClipFactor);
  105. HRESULT SetClipFactor([in] long ClipFactor);
  106. HRESULT SetMessageDrain([in] HWND hwnd);
  107. HRESULT GetMessageDrain([out] HWND * hwnd);
  108. HRESULT SetMonitor([in] long Monitor);
  109. HRESULT GetMonitor([out] long * Monitor);
  110. HRESULT HideOnDeactivate([in] long Hide);
  111. HRESULT IsHideOnDeactivate();
  112. HRESULT SetCaption([in] BSTR strCaption);
  113. HRESULT GetCaption([out] BSTR * pstrCaption);
  114. HRESULT SetDefault();
  115. }
  116. [
  117. object,
  118. pointer_default(unique)
  119. ]
  120. interface IFullScreenVideoEx : IFullScreenVideo
  121. {
  122. HRESULT SetAcceleratorTable([in] HWND hwnd, [in] HACCEL hAccel);
  123. HRESULT GetAcceleratorTable([out] HWND * phwnd, [out] HACCEL * phAccel);
  124. HRESULT KeepPixelAspectRatio([in] long KeepAspect);
  125. /* FIXME: not sure is this next method is an [out] */
  126. HRESULT IsKeepPixelAspectRatio([out] long * pKeepAspect);
  127. }
  128. [
  129. object,
  130. pointer_default(unique)
  131. ]
  132. interface IBaseVideoMixer : IUnknown
  133. {
  134. HRESULT SetLeadPin([in] int iPin);
  135. HRESULT GetLeadPin([out] int * piPin);
  136. HRESULT GetInputPinCount([out] int * piPinCount);
  137. HRESULT IsUsingClock([out] int * pbValue);
  138. HRESULT SetUsingClock([in] int bValue);
  139. HRESULT GetClockPeriod([out] int * pbValue);
  140. HRESULT SetClockPeriod([in] int bValue);
  141. }
  142. #define iPALETTE_COLORS 256
  143. #define iMASK_COLORS 3
  144. cpp_quote("#define iPALETTE_COLORS 256")
  145. cpp_quote("#define iEGA_COLORS 16")
  146. cpp_quote("#define iMASK_COLORS 3")
  147. cpp_quote("#define iTRUECOLOR 16")
  148. cpp_quote("#define iRED 0")
  149. cpp_quote("#define iGREEN 1")
  150. cpp_quote("#define iBLUE 2")
  151. cpp_quote("#define iPALETTE 8")
  152. cpp_quote("#define iMAXBITS 8")
  153. typedef struct tag_TRUECOLORINFO
  154. {
  155. DWORD dwBitMasks[iMASK_COLORS];
  156. RGBQUAD bmiColors[iPALETTE_COLORS];
  157. } TRUECOLORINFO;
  158. typedef struct tagVIDEOINFOHEADER
  159. {
  160. RECT rcSource;
  161. RECT rcTarget;
  162. DWORD dwBitRate;
  163. DWORD dwBitErrorRate;
  164. REFERENCE_TIME AvgTimePerFrame;
  165. BITMAPINFOHEADER bmiHeader;
  166. } VIDEOINFOHEADER;
  167. typedef struct tagVIDEOINFO
  168. {
  169. RECT rcSource;
  170. RECT rcTarget;
  171. DWORD dwBitRate;
  172. DWORD dwBitErrorRate;
  173. REFERENCE_TIME AvgTimePerFrame;
  174. BITMAPINFOHEADER bmiHeader;
  175. union
  176. {
  177. RGBQUAD bmiColors[iPALETTE_COLORS];
  178. DWORD dwBitMasks[iMASK_COLORS];
  179. TRUECOLORINFO TrueColorInfo;
  180. };
  181. } VIDEOINFO;
  182. typedef struct tagMPEG1VIDEOINFO
  183. {
  184. VIDEOINFOHEADER hdr;
  185. DWORD dwStartTimeCode;
  186. DWORD cbSequenceHeader;
  187. BYTE bSequenceHeader[1];
  188. } MPEG1VIDEOINFO;
  189. cpp_quote("#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140")
  190. cpp_quote("#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)")
  191. typedef struct tagAnalogVideoInfo
  192. {
  193. RECT rcSource;
  194. RECT rcTarget;
  195. DWORD dwActiveWidth;
  196. DWORD dwActiveHeight;
  197. REFERENCE_TIME AvgTimePerFrame;
  198. } ANALOGVIDEOINFO;
  199. typedef enum
  200. {
  201. AM_PROPERTY_FRAMESTEP_STEP = 0x01,
  202. AM_PROPERTY_FRAMESTEP_CANCEL = 0x02,
  203. AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03,
  204. AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04
  205. } AM_PROPERTY_FRAMESTEP;
  206. typedef struct _AM_FRAMESTEP_STEP
  207. {
  208. DWORD dwFramesToStep;
  209. } AM_FRAMESTEP_STEP;