mediaobj.idl 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. /*
  2. * Copyright (C) 2002 Alexandre Julliard
  3. * Copyright (C) 2004 Vincent Béron
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2.1 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  18. */
  19. import "unknwn.idl";
  20. import "objidl.idl";
  21. import "strmif.idl";
  22. typedef struct _DMOMediaType
  23. {
  24. GUID majortype;
  25. GUID subtype;
  26. BOOL bFixedSizeSamples;
  27. BOOL bTemporalCompression;
  28. ULONG lSampleSize;
  29. GUID formattype;
  30. IUnknown *pUnk;
  31. ULONG cbFormat;
  32. BYTE *pbFormat;
  33. } DMO_MEDIA_TYPE;
  34. /*****************************************************************************
  35. * IEnumDMO interface
  36. */
  37. [
  38. object,
  39. uuid(2C3CD98A-2BFA-4A53-9C27-5249BA64BA0F),
  40. pointer_default(unique)
  41. ]
  42. interface IEnumDMO : IUnknown
  43. {
  44. [local]
  45. HRESULT Next(
  46. [in] DWORD cItemsToFetch,
  47. [out] CLSID *pCLSID,
  48. [out] WCHAR **Names,
  49. [out] DWORD *pcItemsFetched
  50. );
  51. HRESULT Skip(
  52. [in] DWORD cItemsToSkip
  53. );
  54. HRESULT Reset();
  55. HRESULT Clone(
  56. [out] IEnumDMO **ppEnum
  57. );
  58. }
  59. /*****************************************************************************
  60. * IMediaBuffer interface
  61. */
  62. [
  63. object,
  64. uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837),
  65. local
  66. ]
  67. interface IMediaBuffer : IUnknown
  68. {
  69. HRESULT SetLength(
  70. DWORD cbLength
  71. );
  72. HRESULT GetMaxLength(
  73. [out] DWORD *pcbMaxLength
  74. );
  75. HRESULT GetBufferAndLength(
  76. [out] BYTE **ppBuffer,
  77. [out] DWORD *pcbLength
  78. );
  79. }
  80. enum _DMO_INPUT_STATUS_FLAGS
  81. {
  82. DMO_INPUT_STATUSF_ACCEPT_DATA = 0x00000001,
  83. };
  84. enum _DMO_INPUT_DATA_BUFFER_FLAGS
  85. {
  86. DMO_INPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001,
  87. DMO_INPUT_DATA_BUFFERF_TIME = 0x00000002,
  88. DMO_INPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004,
  89. };
  90. enum _DMO_PROCESS_OUTPUT_FLAGS
  91. {
  92. DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x00000001,
  93. };
  94. typedef struct _DMO_OUTPUT_DATA_BUFFER {
  95. IMediaBuffer *pBuffer;
  96. DWORD dwStatus;
  97. REFERENCE_TIME rtTimestamp;
  98. REFERENCE_TIME rtTimelength;
  99. } DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER;
  100. enum _DMO_INPLACE_PROCESS_FLAGS {
  101. DMO_INPLACE_NORMAL = 0x00000000,
  102. DMO_INPLACE_ZERO = 0x00000001
  103. };
  104. enum _DMO_SET_TYPE_FLAGS {
  105. DMO_SET_TYPEF_TEST_ONLY = 0x00000001,
  106. DMO_SET_TYPEF_CLEAR = 0x00000002,
  107. };
  108. enum _DMO_OUTPUT_DATA_BUFFERF_FLAGS {
  109. DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001,
  110. DMO_OUTPUT_DATA_BUFFERF_TIME = 0x00000002,
  111. DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004,
  112. DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE = 0x01000000,
  113. };
  114. /*****************************************************************************
  115. * IMediaObject interface
  116. */
  117. [
  118. object,
  119. uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4),
  120. local
  121. ]
  122. interface IMediaObject : IUnknown
  123. {
  124. HRESULT GetStreamCount(
  125. [out] DWORD *pcInputStreams,
  126. [out] DWORD *pcOutputStreams
  127. );
  128. HRESULT GetInputStreamInfo(
  129. DWORD dwInputStreamIndex,
  130. [out] DWORD *pdwFlags
  131. );
  132. HRESULT GetOutputStreamInfo(
  133. DWORD dwOutputStreamIndex,
  134. [out] DWORD *pdwFlags
  135. );
  136. HRESULT GetInputType(
  137. DWORD dwInputStreamIndex,
  138. DWORD dwTypeIndex,
  139. [out] DMO_MEDIA_TYPE *pmt
  140. );
  141. HRESULT GetOutputType(
  142. DWORD dwOutputStreamIndex,
  143. DWORD dwTypeIndex,
  144. [out] DMO_MEDIA_TYPE *pmt
  145. );
  146. HRESULT SetInputType(
  147. DWORD dwInputStreamIndex,
  148. [in] const DMO_MEDIA_TYPE *pmt,
  149. DWORD dwFlags
  150. );
  151. HRESULT SetOutputType(
  152. DWORD dwOutputStreamIndex,
  153. [in] const DMO_MEDIA_TYPE *pmt,
  154. DWORD dwFlags
  155. );
  156. HRESULT GetInputCurrentType(
  157. DWORD dwInputStreamIndex,
  158. [out] DMO_MEDIA_TYPE *pmt
  159. );
  160. HRESULT GetOutputCurrentType(
  161. DWORD dwOutputStreamIndex,
  162. [out] DMO_MEDIA_TYPE *pmt
  163. );
  164. HRESULT GetInputSizeInfo(
  165. DWORD dwInputStreamIndex,
  166. [out] DWORD *pcbSize,
  167. [out] DWORD *pcbMaxLookahead,
  168. [out] DWORD *pcbAlignment
  169. );
  170. HRESULT GetOutputSizeInfo(
  171. DWORD dwOutputStreamIndex,
  172. [out] DWORD *pcbSize,
  173. [out] DWORD *pcbAlignment
  174. );
  175. HRESULT GetInputMaxLatency(
  176. DWORD dwInputStreamIndex,
  177. [out] REFERENCE_TIME *prtMaxLatency
  178. );
  179. HRESULT SetInputMaxLatency(
  180. DWORD dwInputStreamIndex,
  181. REFERENCE_TIME rtMaxLatency
  182. );
  183. HRESULT Flush();
  184. HRESULT Discontinuity(DWORD dwInputStreamIndex);
  185. HRESULT AllocateStreamingResources();
  186. HRESULT FreeStreamingResources();
  187. HRESULT GetInputStatus(
  188. DWORD dwInputStreamIndex,
  189. [out] DWORD *dwFlags
  190. );
  191. HRESULT ProcessInput(
  192. DWORD dwInputStreamIndex,
  193. IMediaBuffer *pBuffer,
  194. DWORD dwFlags,
  195. REFERENCE_TIME rtTimestamp,
  196. REFERENCE_TIME rtTimelength
  197. );
  198. HRESULT ProcessOutput(
  199. DWORD dwFlags,
  200. DWORD cOutputBufferCount,
  201. [in,out] DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,
  202. [out] DWORD *pdwStatus
  203. );
  204. HRESULT Lock(LONG bLock);
  205. }
  206. /*****************************************************************************
  207. * IMediaObjectInPlace interface
  208. */
  209. [
  210. object,
  211. uuid(651b9ad0-0fc7-4aa9-9538-d89931010741),
  212. local
  213. ]
  214. interface IMediaObjectInPlace : IUnknown {
  215. HRESULT Process(
  216. [in] ULONG ulSize,
  217. [in,out] BYTE* pData,
  218. [in] REFERENCE_TIME refTimeStart,
  219. [in] DWORD dwFlags
  220. );
  221. HRESULT Clone(
  222. [out] IMediaObjectInPlace **ppMediaObject
  223. );
  224. HRESULT GetLatency(
  225. [out] REFERENCE_TIME *pLatencyTime
  226. );
  227. }
  228. enum _DMO_QUALITY_STATUS_FLAGS
  229. {
  230. DMO_QUALITY_STATUS_ENABLED = 0x00000001,
  231. };
  232. [
  233. object,
  234. uuid(65abea96-cf36-453f-af8a-705e98f16260),
  235. local
  236. ]
  237. interface IDMOQualityControl : IUnknown
  238. {
  239. HRESULT SetNow([in] REFERENCE_TIME now);
  240. HRESULT SetStatus([in] DWORD flags);
  241. HRESULT GetStatus([out] DWORD *flags);
  242. }
  243. enum _DMO_VIDEO_OUTPUT_STREAM_FLAGS
  244. {
  245. DMO_VOSF_NEEDS_PREVIOUS_SAMPLE = 0x00000001,
  246. };
  247. [
  248. object,
  249. uuid(be8f4f4e-5b16-4d29-b350-7f6b5d9298ac),
  250. local
  251. ]
  252. interface IDMOVideoOutputOptimizations : IUnknown
  253. {
  254. HRESULT QueryOperationModePreferences(ULONG index, DWORD *flags);
  255. HRESULT SetOperationMode(ULONG index, DWORD flags);
  256. HRESULT GetCurrentOperationMode(ULONG index, DWORD *flags);
  257. HRESULT GetCurrentSampleRequirements(ULONG index, DWORD *flags);
  258. }