Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

276 lines
9.1 KiB

  1. /****************************************************************************
  2. *
  3. * AVIIFACE.H
  4. *
  5. * Interface definitions for AVIFile
  6. *
  7. * Copyright (c) 1992 - 1995 Microsoft Corporation. All Rights Reserved.
  8. *
  9. * You have a royalty-free right to use, modify, reproduce and
  10. * distribute the Sample Files (and/or any modified version) in
  11. * any way you find useful, provided that you agree that
  12. * Microsoft has no warranty obligations or liability for any
  13. * Sample Application Files which are modified.
  14. *
  15. ***************************************************************************/
  16. #ifdef _WIN32
  17. // begin_vfw32
  18. #include <ole2.h>
  19. // end_vfw32
  20. #else
  21. #include <compobj.h>
  22. #endif
  23. // begin_vfw32
  24. /* - - - - - - - - */
  25. /****** AVI Stream Interface *******************************************/
  26. #undef INTERFACE
  27. #define INTERFACE IAVIStream
  28. DECLARE_INTERFACE_(IAVIStream, IUnknown)
  29. {
  30. // *** IUnknown methods ***
  31. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  32. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  33. STDMETHOD_(ULONG,Release) (THIS) PURE;
  34. // *** IAVIStream methods ***
  35. STDMETHOD(Create) (THIS_ LPARAM lParam1, LPARAM lParam2) PURE ;
  36. // end_vfw32
  37. #ifdef _WIN32
  38. // begin_vfw32
  39. STDMETHOD(Info) (THIS_ AVISTREAMINFOW FAR * psi, LONG lSize) PURE ;
  40. // end_vfw32
  41. #else
  42. STDMETHOD(Info) (THIS_ AVISTREAMINFO FAR * psi, LONG lSize) PURE ;
  43. #endif
  44. // begin_vfw32
  45. STDMETHOD_(LONG, FindSample)(THIS_ LONG lPos, LONG lFlags) PURE ;
  46. STDMETHOD(ReadFormat) (THIS_ LONG lPos,
  47. LPVOID lpFormat, LONG FAR *lpcbFormat) PURE ;
  48. STDMETHOD(SetFormat) (THIS_ LONG lPos,
  49. LPVOID lpFormat, LONG cbFormat) PURE ;
  50. STDMETHOD(Read) (THIS_ LONG lStart, LONG lSamples,
  51. LPVOID lpBuffer, LONG cbBuffer,
  52. LONG FAR * plBytes, LONG FAR * plSamples) PURE ;
  53. STDMETHOD(Write) (THIS_ LONG lStart, LONG lSamples,
  54. LPVOID lpBuffer, LONG cbBuffer,
  55. DWORD dwFlags,
  56. LONG FAR *plSampWritten,
  57. LONG FAR *plBytesWritten) PURE ;
  58. STDMETHOD(Delete) (THIS_ LONG lStart, LONG lSamples) PURE;
  59. STDMETHOD(ReadData) (THIS_ DWORD fcc, LPVOID lp, LONG FAR *lpcb) PURE ;
  60. STDMETHOD(WriteData) (THIS_ DWORD fcc, LPVOID lp, LONG cb) PURE ;
  61. #ifdef _WIN32
  62. STDMETHOD(SetInfo) (THIS_ AVISTREAMINFOW FAR * lpInfo,
  63. LONG cbInfo) PURE;
  64. #else
  65. STDMETHOD(Reserved1) (THIS) PURE;
  66. STDMETHOD(Reserved2) (THIS) PURE;
  67. STDMETHOD(Reserved3) (THIS) PURE;
  68. STDMETHOD(Reserved4) (THIS) PURE;
  69. STDMETHOD(Reserved5) (THIS) PURE;
  70. #endif
  71. };
  72. typedef IAVIStream FAR* PAVISTREAM;
  73. #undef INTERFACE
  74. #define INTERFACE IAVIStreaming
  75. DECLARE_INTERFACE_(IAVIStreaming, IUnknown)
  76. {
  77. // *** IUnknown methods ***
  78. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  79. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  80. STDMETHOD_(ULONG,Release) (THIS) PURE;
  81. // *** IAVIStreaming methods ***
  82. STDMETHOD(Begin) (THIS_
  83. LONG lStart, // start of what we expect
  84. // to play
  85. LONG lEnd, // expected end, or -1
  86. LONG lRate) PURE; // Should this be a float?
  87. STDMETHOD(End) (THIS) PURE;
  88. };
  89. typedef IAVIStreaming FAR* PAVISTREAMING;
  90. #undef INTERFACE
  91. #define INTERFACE IAVIEditStream
  92. DECLARE_INTERFACE_(IAVIEditStream, IUnknown)
  93. {
  94. // *** IUnknown methods ***
  95. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  96. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  97. STDMETHOD_(ULONG,Release) (THIS) PURE;
  98. // *** IAVIEditStream methods ***
  99. STDMETHOD(Cut) (THIS_ LONG FAR *plStart,
  100. LONG FAR *plLength,
  101. PAVISTREAM FAR * ppResult) PURE;
  102. STDMETHOD(Copy) (THIS_ LONG FAR *plStart,
  103. LONG FAR *plLength,
  104. PAVISTREAM FAR * ppResult) PURE;
  105. STDMETHOD(Paste) (THIS_ LONG FAR *plPos,
  106. LONG FAR *plLength,
  107. PAVISTREAM pstream,
  108. LONG lStart,
  109. LONG lEnd) PURE;
  110. STDMETHOD(Clone) (THIS_ PAVISTREAM FAR *ppResult) PURE;
  111. // end_vfw32
  112. #ifdef _WIN32
  113. // begin_vfw32
  114. STDMETHOD(SetInfo) (THIS_ AVISTREAMINFOW FAR * lpInfo,
  115. LONG cbInfo) PURE;
  116. // end_vfw32
  117. #else
  118. STDMETHOD(SetInfo) (THIS_ AVISTREAMINFO FAR * lpInfo,
  119. LONG cbInfo) PURE;
  120. #endif
  121. // begin_vfw32
  122. };
  123. typedef IAVIEditStream FAR* PAVIEDITSTREAM;
  124. /****** AVI File Interface *******************************************/
  125. #undef INTERFACE
  126. #define INTERFACE IAVIFile
  127. #define PAVIFILE IAVIFile FAR*
  128. DECLARE_INTERFACE_(IAVIFile, IUnknown)
  129. {
  130. // *** IUnknown methods ***
  131. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  132. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  133. STDMETHOD_(ULONG,Release) (THIS) PURE;
  134. // *** IAVIFile methods ***
  135. // end_vfw32
  136. #ifndef _WIN32
  137. STDMETHOD(Open) (THIS_
  138. const char FAR * szFile,
  139. UINT mode) PURE;
  140. STDMETHOD(Info) (THIS_
  141. AVIFILEINFO FAR * pfi,
  142. LONG lSize) PURE;
  143. STDMETHOD(GetStream) (THIS_
  144. PAVISTREAM FAR * ppStream,
  145. DWORD fccType,
  146. LONG lParam) PURE;
  147. STDMETHOD(CreateStream) (THIS_
  148. PAVISTREAM FAR * ppStream,
  149. AVISTREAMINFO FAR * psi) PURE;
  150. STDMETHOD(Save) (THIS_
  151. const char FAR * szFile,
  152. AVICOMPRESSOPTIONS FAR *lpOptions,
  153. AVISAVECALLBACK lpfnCallback) PURE;
  154. #else
  155. // begin_vfw32
  156. STDMETHOD(Info) (THIS_
  157. AVIFILEINFOW FAR * pfi,
  158. LONG lSize) PURE;
  159. STDMETHOD(GetStream) (THIS_
  160. PAVISTREAM FAR * ppStream,
  161. DWORD fccType,
  162. LONG lParam) PURE;
  163. STDMETHOD(CreateStream) (THIS_
  164. PAVISTREAM FAR * ppStream,
  165. AVISTREAMINFOW FAR * psi) PURE;
  166. // end_vfw32
  167. #endif
  168. // begin_vfw32
  169. STDMETHOD(WriteData) (THIS_
  170. DWORD ckid,
  171. LPVOID lpData,
  172. LONG cbData) PURE;
  173. STDMETHOD(ReadData) (THIS_
  174. DWORD ckid,
  175. LPVOID lpData,
  176. LONG FAR *lpcbData) PURE;
  177. STDMETHOD(EndRecord) (THIS) PURE;
  178. // end_vfw32
  179. #ifdef _WIN32
  180. // begin_vfw32
  181. STDMETHOD(DeleteStream) (THIS_
  182. DWORD fccType,
  183. LONG lParam) PURE;
  184. // end_vfw32
  185. #else
  186. STDMETHOD(Reserved1) (THIS) PURE;
  187. STDMETHOD(Reserved2) (THIS) PURE;
  188. STDMETHOD(Reserved3) (THIS) PURE;
  189. STDMETHOD(Reserved4) (THIS) PURE;
  190. STDMETHOD(Reserved5) (THIS) PURE;
  191. #endif
  192. // begin_vfw32
  193. };
  194. #undef PAVIFILE
  195. typedef IAVIFile FAR* PAVIFILE;
  196. /****** GetFrame Interface *******************************************/
  197. #undef INTERFACE
  198. #define INTERFACE IGetFrame
  199. #define PGETFRAME IGetFrame FAR*
  200. DECLARE_INTERFACE_(IGetFrame, IUnknown)
  201. {
  202. // *** IUnknown methods ***
  203. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  204. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  205. STDMETHOD_(ULONG,Release) (THIS) PURE;
  206. // *** IGetFrame methods ***
  207. STDMETHOD_(LPVOID,GetFrame) (THIS_ LONG lPos) PURE;
  208. // STDMETHOD_(LPVOID,GetFrameData) (THIS_ LONG lPos) PURE;
  209. STDMETHOD(Begin) (THIS_ LONG lStart, LONG lEnd, LONG lRate) PURE;
  210. STDMETHOD(End) (THIS) PURE;
  211. STDMETHOD(SetFormat) (THIS_ LPBITMAPINFOHEADER lpbi, LPVOID lpBits, int x, int y, int dx, int dy) PURE;
  212. // STDMETHOD(DrawFrameStart) (THIS) PURE;
  213. // STDMETHOD(DrawFrame) (THIS_ LONG lPos, HDC hdc, int x, int y, int dx, int dy) PURE;
  214. // STDMETHOD(DrawFrameEnd) (THIS) PURE;
  215. };
  216. #undef PGETFRAME
  217. typedef IGetFrame FAR* PGETFRAME;
  218. /****** GUIDs *******************************************/
  219. #define DEFINE_AVIGUID(name, l, w1, w2) \
  220. DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
  221. DEFINE_AVIGUID(IID_IAVIFile, 0x00020020, 0, 0);
  222. DEFINE_AVIGUID(IID_IAVIStream, 0x00020021, 0, 0);
  223. DEFINE_AVIGUID(IID_IAVIStreaming, 0x00020022, 0, 0);
  224. DEFINE_AVIGUID(IID_IGetFrame, 0x00020023, 0, 0);
  225. DEFINE_AVIGUID(IID_IAVIEditStream, 0x00020024, 0, 0);
  226. #ifndef UNICODE
  227. DEFINE_AVIGUID(CLSID_AVISimpleUnMarshal, 0x00020009, 0, 0);
  228. #endif
  229. DEFINE_AVIGUID(CLSID_AVIFile, 0x00020000, 0, 0);
  230. #define AVIFILEHANDLER_CANREAD 0x0001
  231. #define AVIFILEHANDLER_CANWRITE 0x0002
  232. #define AVIFILEHANDLER_CANACCEPTNONRGB 0x0004
  233. // end_vfw32