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.

241 lines
8.3 KiB

  1. /****************************************************************************
  2. *
  3. * AVIIFACE.H
  4. *
  5. * Interface definitions for AVIFile
  6. *
  7. * Copyright (c) 1992 - 1994 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. #include <ole2.h>
  18. #else
  19. #include <compobj.h>
  20. #endif
  21. #ifndef RIID
  22. #if defined(__cplusplus)
  23. #define RIID IID FAR&
  24. #define RCLSID CLSID FAR&
  25. #else
  26. #define RIID IID FAR*
  27. #define RCLSID CLSID FAR*
  28. #endif
  29. #endif
  30. /* - - - - - - - - */
  31. /****** AVI Stream Interface *******************************************/
  32. #undef INTERFACE
  33. #define INTERFACE IAVIStream
  34. DECLARE_INTERFACE_(IAVIStream, IUnknown)
  35. {
  36. // *** IUnknown methods ***
  37. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  38. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  39. STDMETHOD_(ULONG,Release) (THIS) PURE;
  40. // *** IAVIStream methods ***
  41. STDMETHOD(Create) (THIS_ LPARAM lParam1, LPARAM lParam2) PURE ;
  42. STDMETHOD(Info) (THIS_ AVISTREAMINFO FAR * psi, LONG lSize) PURE ;
  43. STDMETHOD_(LONG, FindSample)(THIS_ LONG lPos, LONG lFlags) PURE ;
  44. STDMETHOD(ReadFormat) (THIS_ LONG lPos,
  45. LPVOID lpFormat, LONG FAR *lpcbFormat) PURE ;
  46. STDMETHOD(SetFormat) (THIS_ LONG lPos,
  47. LPVOID lpFormat, LONG cbFormat) PURE ;
  48. STDMETHOD(Read) (THIS_ LONG lStart, LONG lSamples,
  49. LPVOID lpBuffer, LONG cbBuffer,
  50. LONG FAR * plBytes, LONG FAR * plSamples) PURE ;
  51. STDMETHOD(Write) (THIS_ LONG lStart, LONG lSamples,
  52. LPVOID lpBuffer, LONG cbBuffer,
  53. DWORD dwFlags,
  54. LONG FAR *plSampWritten,
  55. LONG FAR *plBytesWritten) PURE ;
  56. STDMETHOD(Delete) (THIS_ LONG lStart, LONG lSamples) PURE;
  57. STDMETHOD(ReadData) (THIS_ DWORD fcc, LPVOID lp, LONG FAR *lpcb) PURE ;
  58. STDMETHOD(WriteData) (THIS_ DWORD fcc, LPVOID lp, LONG cb) PURE ;
  59. STDMETHOD(Reserved1) (THIS) PURE;
  60. STDMETHOD(Reserved2) (THIS) PURE;
  61. STDMETHOD(Reserved3) (THIS) PURE;
  62. STDMETHOD(Reserved4) (THIS) PURE;
  63. STDMETHOD(Reserved5) (THIS) PURE;
  64. };
  65. typedef IAVIStream FAR* PAVISTREAM;
  66. #undef INTERFACE
  67. #define INTERFACE IAVIStreaming
  68. DECLARE_INTERFACE_(IAVIStreaming, IUnknown)
  69. {
  70. // *** IUnknown methods ***
  71. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  72. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  73. STDMETHOD_(ULONG,Release) (THIS) PURE;
  74. // *** IAVIStreaming methods ***
  75. STDMETHOD(Begin) (THIS_
  76. LONG lStart, // start of what we expect
  77. // to play
  78. LONG lEnd, // expected end, or -1
  79. LONG lRate) PURE; // Should this be a float?
  80. STDMETHOD(End) (THIS) PURE;
  81. };
  82. typedef IAVIStreaming FAR* PAVISTREAMING;
  83. #undef INTERFACE
  84. #define INTERFACE IAVIEditStream
  85. DECLARE_INTERFACE_(IAVIEditStream, IUnknown)
  86. {
  87. // *** IUnknown methods ***
  88. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  89. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  90. STDMETHOD_(ULONG,Release) (THIS) PURE;
  91. // *** IAVIEditStream methods ***
  92. STDMETHOD(Cut) (THIS_ LONG FAR *plStart,
  93. LONG FAR *plLength,
  94. PAVISTREAM FAR * ppResult) PURE;
  95. STDMETHOD(Copy) (THIS_ LONG FAR *plStart,
  96. LONG FAR *plLength,
  97. PAVISTREAM FAR * ppResult) PURE;
  98. STDMETHOD(Paste) (THIS_ LONG FAR *plPos,
  99. LONG FAR *plLength,
  100. PAVISTREAM pstream,
  101. LONG lStart,
  102. LONG lEnd) PURE;
  103. STDMETHOD(Clone) (THIS_ PAVISTREAM FAR *ppResult) PURE;
  104. STDMETHOD(SetInfo) (THIS_ AVISTREAMINFO FAR * lpInfo,
  105. LONG cbInfo) PURE;
  106. };
  107. typedef IAVIEditStream FAR* PAVIEDITSTREAM;
  108. /****** AVI File Interface *******************************************/
  109. #undef INTERFACE
  110. #define INTERFACE IAVIFile
  111. #define PAVIFILE IAVIFile FAR*
  112. DECLARE_INTERFACE_(IAVIFile, IUnknown)
  113. {
  114. // *** IUnknown methods ***
  115. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  116. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  117. STDMETHOD_(ULONG,Release) (THIS) PURE;
  118. // *** IAVIFile methods ***
  119. #ifdef WIN32
  120. STDMETHOD(Open) (THIS_
  121. const TCHAR FAR * szFile,
  122. UINT mode) PURE;
  123. #else
  124. STDMETHOD(Open) (THIS_
  125. const char FAR * szFile,
  126. UINT mode) PURE;
  127. #endif
  128. STDMETHOD(Info) (THIS_
  129. AVIFILEINFO FAR * pfi,
  130. LONG lSize) PURE;
  131. STDMETHOD(GetStream) (THIS_
  132. PAVISTREAM FAR * ppStream,
  133. DWORD fccType,
  134. LONG lParam) PURE;
  135. STDMETHOD(CreateStream) (THIS_
  136. PAVISTREAM FAR * ppStream,
  137. AVISTREAMINFO FAR * psi) PURE;
  138. #ifdef WIN32
  139. STDMETHOD(Save) (THIS_
  140. const TCHAR FAR * szFile,
  141. AVICOMPRESSOPTIONS FAR *lpOptions,
  142. AVISAVECALLBACK lpfnCallback) PURE;
  143. #else
  144. STDMETHOD(Save) (THIS_
  145. const char FAR * szFile,
  146. AVICOMPRESSOPTIONS FAR *lpOptions,
  147. AVISAVECALLBACK lpfnCallback) PURE;
  148. #endif
  149. STDMETHOD(WriteData) (THIS_
  150. DWORD ckid,
  151. LPVOID lpData,
  152. LONG cbData) PURE;
  153. STDMETHOD(ReadData) (THIS_
  154. DWORD ckid,
  155. LPVOID lpData,
  156. LONG FAR *lpcbData) PURE;
  157. STDMETHOD(EndRecord) (THIS) PURE;
  158. STDMETHOD(Reserved1) (THIS) PURE;
  159. STDMETHOD(Reserved2) (THIS) PURE;
  160. STDMETHOD(Reserved3) (THIS) PURE;
  161. STDMETHOD(Reserved4) (THIS) PURE;
  162. STDMETHOD(Reserved5) (THIS) PURE;
  163. };
  164. #undef PAVIFILE
  165. typedef IAVIFile FAR* PAVIFILE;
  166. /****** GetFrame Interface *******************************************/
  167. #undef INTERFACE
  168. #define INTERFACE IGetFrame
  169. #define PGETFRAME IGetFrame FAR*
  170. DECLARE_INTERFACE_(IGetFrame, IUnknown)
  171. {
  172. // *** IUnknown methods ***
  173. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  174. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  175. STDMETHOD_(ULONG,Release) (THIS) PURE;
  176. // *** IGetFrame methods ***
  177. STDMETHOD_(LPVOID,GetFrame) (THIS_ LONG lPos) PURE;
  178. // STDMETHOD_(LPVOID,GetFrameData) (THIS_ LONG lPos) PURE;
  179. STDMETHOD(Begin) (THIS_ LONG lStart, LONG lEnd, LONG lRate) PURE;
  180. STDMETHOD(End) (THIS) PURE;
  181. STDMETHOD(SetFormat) (THIS_ LPBITMAPINFOHEADER lpbi, LPVOID lpBits, int x, int y, int dx, int dy) PURE;
  182. // STDMETHOD(DrawFrameStart) (THIS) PURE;
  183. // STDMETHOD(DrawFrame) (THIS_ LONG lPos, HDC hdc, int x, int y, int dx, int dy) PURE;
  184. // STDMETHOD(DrawFrameEnd) (THIS) PURE;
  185. };
  186. #undef PGETFRAME
  187. typedef IGetFrame FAR* PGETFRAME;
  188. /****** GUIDs *******************************************/
  189. #define DEFINE_AVIGUID(name, l, w1, w2) \
  190. DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
  191. DEFINE_AVIGUID(IID_IAVIFile, 0x00020020, 0, 0);
  192. DEFINE_AVIGUID(IID_IAVIStream, 0x00020021, 0, 0);
  193. DEFINE_AVIGUID(IID_IAVIStreaming, 0x00020022, 0, 0);
  194. DEFINE_AVIGUID(IID_IGetFrame, 0x00020023, 0, 0);
  195. DEFINE_AVIGUID(IID_IAVIEditStream, 0x00020024, 0, 0);
  196. #ifndef UNICODE
  197. DEFINE_AVIGUID(CLSID_AVISimpleUnMarshal, 0x00020009, 0, 0);
  198. #endif
  199. #define AVIFILEHANDLER_CANREAD 0x0001
  200. #define AVIFILEHANDLER_CANWRITE 0x0002
  201. #define AVIFILEHANDLER_CANACCEPTNONRGB 0x0004