axcore.idl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. /*
  2. * Copyright (C) 2002 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. #define CHARS_IN_GUID 39
  19. cpp_quote("#define CHARS_IN_GUID 39")
  20. /* GetTimeFormat is defined in winnls.h as
  21. * either the W or A suffixed version */
  22. cpp_quote("#undef GetTimeFormat")
  23. typedef struct _AMMediaType
  24. {
  25. GUID majortype;
  26. GUID subtype;
  27. BOOL bFixedSizeSamples;
  28. BOOL bTemporalCompression;
  29. ULONG lSampleSize;
  30. GUID formattype;
  31. IUnknown * pUnk;
  32. ULONG cbFormat;
  33. [size_is(cbFormat)] BYTE * pbFormat;
  34. } AM_MEDIA_TYPE;
  35. typedef enum _PinDirection
  36. {
  37. PINDIR_INPUT,
  38. PINDIR_OUTPUT
  39. } PIN_DIRECTION;
  40. #define MAX_PIN_NAME 128
  41. #define MAX_FILTER_NAME 128
  42. cpp_quote("#define MAX_PIN_NAME 128")
  43. cpp_quote("#define MAX_FILTER_NAME 128")
  44. typedef LONGLONG REFERENCE_TIME;
  45. typedef DOUBLE REFTIME;
  46. typedef DWORD_PTR HSEMAPHORE;
  47. typedef DWORD_PTR HEVENT;
  48. typedef struct _AllocatorProperties
  49. {
  50. long cBuffers;
  51. long cbBuffer;
  52. long cbAlign;
  53. long cbPrefix;
  54. } ALLOCATOR_PROPERTIES;
  55. interface IAMovieSetup;
  56. interface IEnumFilters;
  57. interface IEnumMediaTypes;
  58. interface IEnumPins;
  59. interface IBaseFilter;
  60. interface IFilterGraph;
  61. interface IMediaFilter;
  62. interface IMediaSample;
  63. interface IMemAllocator;
  64. interface IMemAllocatorCallbackTemp;
  65. interface IMemAllocatorNotifyCallbackTemp;
  66. interface IMemInputPin;
  67. interface IPin;
  68. interface IReferenceClock;
  69. [
  70. object,
  71. uuid(56a86891-0ad4-11ce-b03a-0020af0ba770),
  72. pointer_default(unique)
  73. ]
  74. interface IPin : IUnknown
  75. {
  76. typedef struct _PinInfo
  77. {
  78. IBaseFilter *pFilter;
  79. PIN_DIRECTION dir;
  80. WCHAR achName[MAX_PIN_NAME];
  81. } PIN_INFO;
  82. HRESULT Connect(
  83. [in] IPin * pReceivePin,
  84. [in] const AM_MEDIA_TYPE * pmt);
  85. HRESULT ReceiveConnection(
  86. [in] IPin * pConnector,
  87. [in] const AM_MEDIA_TYPE *pmt);
  88. HRESULT Disconnect(void);
  89. HRESULT ConnectedTo(
  90. [out] IPin **pPin);
  91. HRESULT ConnectionMediaType(
  92. [out] AM_MEDIA_TYPE *pmt);
  93. HRESULT QueryPinInfo(
  94. [out] PIN_INFO * pInfo);
  95. HRESULT QueryDirection(
  96. [out] PIN_DIRECTION *pPinDir);
  97. HRESULT QueryId(
  98. [out] LPWSTR * Id);
  99. HRESULT QueryAccept(
  100. [in] const AM_MEDIA_TYPE *pmt);
  101. HRESULT EnumMediaTypes(
  102. [out] IEnumMediaTypes **ppEnum);
  103. HRESULT QueryInternalConnections(
  104. [out] IPin* *apPin,
  105. [in, out] ULONG *nPin);
  106. HRESULT EndOfStream(void);
  107. HRESULT BeginFlush(void);
  108. HRESULT EndFlush(void);
  109. HRESULT NewSegment(
  110. [in] REFERENCE_TIME tStart,
  111. [in] REFERENCE_TIME tStop,
  112. [in] double dRate);
  113. }
  114. typedef IPin *PPIN;
  115. [
  116. object,
  117. uuid(56a86892-0ad4-11ce-b03a-0020af0ba770),
  118. pointer_default(unique)
  119. ]
  120. interface IEnumPins : IUnknown
  121. {
  122. HRESULT Next(
  123. [in] ULONG cPins,
  124. [out, size_is(cPins)] IPin ** ppPins,
  125. [out] ULONG * pcFetched);
  126. HRESULT Skip(
  127. [in] ULONG cPins);
  128. HRESULT Reset(void);
  129. HRESULT Clone(
  130. [out] IEnumPins **ppEnum);
  131. }
  132. typedef IEnumPins *PENUMPINS;
  133. [
  134. object,
  135. uuid(89c31040-846b-11ce-97d3-00aa0055595a),
  136. pointer_default(unique)
  137. ]
  138. interface IEnumMediaTypes : IUnknown
  139. {
  140. HRESULT Next(
  141. [in] ULONG cMediaTypes,
  142. [out, size_is(cMediaTypes)]
  143. AM_MEDIA_TYPE ** ppMediaTypes,
  144. [out] ULONG * pcFetched
  145. );
  146. HRESULT Skip(
  147. [in] ULONG cMediaTypes);
  148. HRESULT Reset(void);
  149. HRESULT Clone(
  150. [out] IEnumMediaTypes **ppEnum
  151. );
  152. }
  153. typedef IEnumMediaTypes *PENUMMEDIATYPES;
  154. [
  155. object,
  156. uuid(56a8689f-0ad4-11ce-b03a-0020af0ba770),
  157. pointer_default(unique)
  158. ]
  159. interface IFilterGraph : IUnknown
  160. {
  161. HRESULT AddFilter(
  162. [in] IBaseFilter * pFilter,
  163. [in, string] LPCWSTR pName);
  164. HRESULT RemoveFilter(
  165. [in] IBaseFilter * pFilter);
  166. HRESULT EnumFilters(
  167. [out] IEnumFilters **ppEnum);
  168. HRESULT FindFilterByName(
  169. [in, string] LPCWSTR pName,
  170. [out] IBaseFilter ** ppFilter);
  171. HRESULT ConnectDirect(
  172. [in] IPin * ppinOut,
  173. [in] IPin * ppinIn,
  174. [in, unique] const AM_MEDIA_TYPE* pmt);
  175. HRESULT Reconnect(
  176. [in] IPin * ppin);
  177. HRESULT Disconnect(
  178. [in] IPin * ppin);
  179. HRESULT SetDefaultSyncSource(void);
  180. }
  181. typedef IFilterGraph *PFILTERGRAPH;
  182. [
  183. object,
  184. uuid(56a86893-0ad4-11ce-b03a-0020af0ba770),
  185. pointer_default(unique)
  186. ]
  187. interface IEnumFilters : IUnknown
  188. {
  189. HRESULT Next(
  190. [in] ULONG cFilters,
  191. [out] IBaseFilter ** ppFilter,
  192. [out] ULONG * pcFetched);
  193. HRESULT Skip(
  194. [in] ULONG cFilters);
  195. HRESULT Reset(void);
  196. HRESULT Clone(
  197. [out] IEnumFilters **ppEnum);
  198. }
  199. typedef IEnumFilters *PENUMFILTERS;
  200. [
  201. object,
  202. uuid(56a86899-0ad4-11ce-b03a-0020af0ba770),
  203. pointer_default(unique)
  204. ]
  205. interface IMediaFilter : IPersist
  206. {
  207. typedef enum _FilterState
  208. {
  209. State_Stopped,
  210. State_Paused,
  211. State_Running
  212. } FILTER_STATE;
  213. HRESULT Stop(void);
  214. HRESULT Pause(void);
  215. HRESULT Run(REFERENCE_TIME tStart);
  216. HRESULT GetState(
  217. [in] DWORD dwMilliSecsTimeout,
  218. [out] FILTER_STATE *State);
  219. HRESULT SetSyncSource(
  220. [in] IReferenceClock * pClock);
  221. HRESULT GetSyncSource(
  222. [out] IReferenceClock ** pClock);
  223. }
  224. typedef IMediaFilter *PMEDIAFILTER;
  225. [
  226. object,
  227. uuid(56a86895-0ad4-11ce-b03a-0020af0ba770),
  228. pointer_default(unique)
  229. ]
  230. interface IBaseFilter : IMediaFilter
  231. {
  232. typedef struct _FilterInfo
  233. {
  234. WCHAR achName[MAX_FILTER_NAME];
  235. IFilterGraph * pGraph;
  236. } FILTER_INFO;
  237. HRESULT EnumPins(
  238. [out] IEnumPins ** ppEnum);
  239. HRESULT FindPin(
  240. [in, string] LPCWSTR Id,
  241. [out] IPin ** ppPin);
  242. HRESULT QueryFilterInfo(
  243. [out] FILTER_INFO * pInfo);
  244. HRESULT JoinFilterGraph(
  245. [in] IFilterGraph * pGraph,
  246. [in, string] LPCWSTR pName);
  247. HRESULT QueryVendorInfo(
  248. [out, string] LPWSTR* pVendorInfo);
  249. }
  250. typedef IBaseFilter *PFILTER;
  251. [
  252. object,
  253. uuid(56a86897-0ad4-11ce-b03a-0020af0ba770),
  254. pointer_default(unique)
  255. ]
  256. interface IReferenceClock : IUnknown
  257. {
  258. HRESULT GetTime(
  259. [out] REFERENCE_TIME *pTime);
  260. HRESULT AdviseTime(
  261. [in] REFERENCE_TIME baseTime,
  262. [in] REFERENCE_TIME streamTime,
  263. [in] HEVENT hEvent,
  264. [out] DWORD_PTR * pdwAdviseCookie);
  265. HRESULT AdvisePeriodic(
  266. [in] REFERENCE_TIME startTime,
  267. [in] REFERENCE_TIME periodTime,
  268. [in] HSEMAPHORE hSemaphore,
  269. [out] DWORD_PTR * pdwAdviseCookie);
  270. HRESULT Unadvise(
  271. [in] DWORD_PTR dwAdviseCookie);
  272. }
  273. typedef IReferenceClock *PREFERENCECLOCK;
  274. /*
  275. [
  276. object,
  277. uuid(36b73885-c2c8-11cf-8b46-00805f6cef60),
  278. pointer_default(unique)
  279. ]
  280. interface IReferenceClock2 : IReferenceClock
  281. {
  282. }
  283. typedef IReferenceClock2 *PREFERENCECLOCK2;
  284. */
  285. [
  286. local,
  287. object,
  288. uuid(56a8689a-0ad4-11ce-b03a-0020af0ba770),
  289. pointer_default(unique)
  290. ]
  291. interface IMediaSample : IUnknown
  292. {
  293. HRESULT GetPointer([out] BYTE ** ppBuffer);
  294. long GetSize(void);
  295. HRESULT GetTime(
  296. [out] REFERENCE_TIME * pTimeStart,
  297. [out] REFERENCE_TIME * pTimeEnd);
  298. HRESULT SetTime(
  299. [in] REFERENCE_TIME * pTimeStart,
  300. [in] REFERENCE_TIME * pTimeEnd);
  301. HRESULT IsSyncPoint(void);
  302. HRESULT SetSyncPoint(BOOL bIsSyncPoint);
  303. HRESULT IsPreroll(void);
  304. HRESULT SetPreroll(BOOL bIsPreroll);
  305. LONG GetActualDataLength(void);
  306. HRESULT SetActualDataLength(LONG length);
  307. HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType);
  308. HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType);
  309. HRESULT IsDiscontinuity(void);
  310. HRESULT SetDiscontinuity(BOOL bDiscontinuity);
  311. HRESULT GetMediaTime(
  312. [out] LONGLONG * pTimeStart,
  313. [out] LONGLONG * pTimeEnd);
  314. HRESULT SetMediaTime(
  315. [in] LONGLONG * pTimeStart,
  316. [in] LONGLONG * pTimeEnd);
  317. }
  318. typedef IMediaSample *PMEDIASAMPLE;
  319. enum tagAM_SAMPLE_PROPERTY_FLAGS
  320. {
  321. AM_SAMPLE_SPLICEPOINT = 0x01,
  322. AM_SAMPLE_PREROLL = 0x02,
  323. AM_SAMPLE_DATADISCONTINUITY = 0x04,
  324. AM_SAMPLE_TYPECHANGED = 0x08,
  325. AM_SAMPLE_TIMEVALID = 0x10,
  326. AM_SAMPLE_TIMEDISCONTINUITY = 0x40,
  327. AM_SAMPLE_FLUSH_ON_PAUSE = 0x80,
  328. AM_SAMPLE_STOPVALID = 0x100,
  329. AM_SAMPLE_ENDOFSTREAM = 0x200,
  330. AM_STREAM_MEDIA = 0,
  331. AM_STREAM_CONTROL = 1
  332. };
  333. typedef struct tagAM_SAMPLE2_PROPERTIES
  334. {
  335. DWORD cbData;
  336. DWORD dwTypeSpecificFlags;
  337. DWORD dwSampleFlags;
  338. LONG lActual;
  339. REFERENCE_TIME tStart;
  340. REFERENCE_TIME tStop;
  341. DWORD dwStreamId;
  342. AM_MEDIA_TYPE *pMediaType;
  343. BYTE *pbBuffer;
  344. LONG cbBuffer;
  345. } AM_SAMPLE2_PROPERTIES;
  346. [
  347. local,
  348. object,
  349. uuid(36b73884-c2c8-11cf-8b46-00805f6cef60),
  350. pointer_default(unique)
  351. ]
  352. interface IMediaSample2 : IMediaSample
  353. {
  354. HRESULT GetProperties(
  355. [in] DWORD cbProperties,
  356. [out, size_is(cbProperties)] BYTE * pbProperties
  357. );
  358. HRESULT SetProperties(
  359. [in] DWORD cbProperties,
  360. [in, size_is(cbProperties)] const BYTE * pbProperties
  361. );
  362. }
  363. typedef IMediaSample2 *PMEDIASAMPLE2;
  364. #define AM_GBF_PREVFRAMESKIPPED 1
  365. #define AM_GBF_NOTASYNCPOINT 2
  366. cpp_quote("#define AM_GBF_PREVFRAMESKIPPED 1")
  367. cpp_quote("#define AM_GBF_NOTASYNCPOINT 2")
  368. cpp_quote("#define AM_GBF_NOWAIT 4")
  369. [
  370. object,
  371. uuid(56a8689c-0ad4-11ce-b03a-0020af0ba770),
  372. pointer_default(unique)
  373. ]
  374. interface IMemAllocator : IUnknown
  375. {
  376. HRESULT SetProperties(
  377. [in] ALLOCATOR_PROPERTIES* pRequest,
  378. [out] ALLOCATOR_PROPERTIES* pActual);
  379. HRESULT GetProperties(
  380. [out] ALLOCATOR_PROPERTIES* pProps);
  381. HRESULT Commit(void);
  382. HRESULT Decommit(void);
  383. HRESULT GetBuffer(
  384. [out] IMediaSample **ppBuffer,
  385. [in] REFERENCE_TIME * pStartTime,
  386. [in] REFERENCE_TIME * pEndTime,
  387. [in] DWORD dwFlags);
  388. HRESULT ReleaseBuffer(
  389. [in] IMediaSample *pBuffer);
  390. }
  391. typedef IMemAllocator *PMEMALLOCATOR;
  392. [
  393. object,
  394. uuid(379a0cf0-c1de-11d2-abf5-00a0c905f375),
  395. pointer_default(unique)
  396. ]
  397. interface IMemAllocatorCallbackTemp : IMemAllocator
  398. {
  399. HRESULT SetNotify(
  400. [in] IMemAllocatorNotifyCallbackTemp *pNotify);
  401. HRESULT GetFreeCount(
  402. [out] LONG *plBuffersFree);
  403. }
  404. [
  405. object,
  406. uuid(92980b30-c1de-11d2-abf5-00a0c905f375),
  407. pointer_default(unique)
  408. ]
  409. interface IMemAllocatorNotifyCallbackTemp : IUnknown
  410. {
  411. HRESULT NotifyRelease();
  412. }
  413. [
  414. object,
  415. uuid(56a8689d-0ad4-11ce-b03a-0020af0ba770),
  416. pointer_default(unique)
  417. ]
  418. interface IMemInputPin : IUnknown
  419. {
  420. HRESULT GetAllocator(
  421. [out] IMemAllocator ** ppAllocator);
  422. HRESULT NotifyAllocator(
  423. [in] IMemAllocator * pAllocator,
  424. [in] BOOL bReadOnly);
  425. HRESULT GetAllocatorRequirements( [out] ALLOCATOR_PROPERTIES*pProps );
  426. HRESULT Receive(
  427. [in] IMediaSample * pSample);
  428. HRESULT ReceiveMultiple(
  429. [in, size_is(nSamples)] IMediaSample **pSamples,
  430. [in] long nSamples,
  431. [out] long *nSamplesProcessed);
  432. HRESULT ReceiveCanBlock();
  433. }
  434. typedef IMemInputPin *PMEMINPUTPIN;
  435. [
  436. object,
  437. uuid(a3d8cec0-7e5a-11cf-bbc5-00805f6cef20),
  438. pointer_default(unique)
  439. ]
  440. interface IAMovieSetup : IUnknown
  441. {
  442. HRESULT Register( );
  443. HRESULT Unregister( );
  444. }
  445. typedef IAMovieSetup *PAMOVIESETUP;
  446. typedef enum AM_SEEKING_SeekingFlags
  447. {
  448. AM_SEEKING_NoPositioning = 0x00,
  449. AM_SEEKING_AbsolutePositioning = 0x01,
  450. AM_SEEKING_RelativePositioning = 0x02,
  451. AM_SEEKING_IncrementalPositioning = 0x03,
  452. AM_SEEKING_PositioningBitsMask = 0x03,
  453. AM_SEEKING_SeekToKeyFrame = 0x04,
  454. AM_SEEKING_ReturnTime = 0x08,
  455. AM_SEEKING_Segment = 0x10,
  456. AM_SEEKING_NoFlush = 0x20
  457. } AM_SEEKING_SEEKING_FLAGS;
  458. typedef enum AM_SEEKING_SeekingCapabilities
  459. {
  460. AM_SEEKING_CanSeekAbsolute = 0x001,
  461. AM_SEEKING_CanSeekForwards = 0x002,
  462. AM_SEEKING_CanSeekBackwards = 0x004,
  463. AM_SEEKING_CanGetCurrentPos = 0x008,
  464. AM_SEEKING_CanGetStopPos = 0x010,
  465. AM_SEEKING_CanGetDuration = 0x020,
  466. AM_SEEKING_CanPlayBackwards = 0x040,
  467. AM_SEEKING_CanDoSegments = 0x080,
  468. AM_SEEKING_Source = 0x100
  469. } AM_SEEKING_SEEKING_CAPABILITIES;
  470. [
  471. object,
  472. uuid(36b73880-c2c8-11cf-8b46-00805f6cef60),
  473. pointer_default(unique)
  474. ]
  475. interface IMediaSeeking : IUnknown
  476. {
  477. HRESULT GetCapabilities( [out] DWORD * pCapabilities );
  478. HRESULT CheckCapabilities( [in,out] DWORD * pCapabilities );
  479. HRESULT IsFormatSupported([in] const GUID * pFormat);
  480. HRESULT QueryPreferredFormat([out] GUID * pFormat);
  481. HRESULT GetTimeFormat([out] GUID *pFormat);
  482. HRESULT IsUsingTimeFormat([in] const GUID * pFormat);
  483. HRESULT SetTimeFormat([in] const GUID * pFormat);
  484. HRESULT GetDuration([out] LONGLONG *pDuration);
  485. HRESULT GetStopPosition([out] LONGLONG *pStop);
  486. HRESULT GetCurrentPosition([out] LONGLONG *pCurrent);
  487. HRESULT ConvertTimeFormat([out] LONGLONG * pTarget, [in] const GUID * pTargetFormat,
  488. [in] LONGLONG Source, [in] const GUID * pSourceFormat );
  489. HRESULT SetPositions(
  490. [in,out] LONGLONG * pCurrent,
  491. [in] DWORD dwCurrentFlags,
  492. [in,out] LONGLONG * pStop,
  493. [in] DWORD dwStopFlags);
  494. HRESULT GetPositions(
  495. [out] LONGLONG * pCurrent,
  496. [out] LONGLONG * pStop);
  497. HRESULT GetAvailable(
  498. [out] LONGLONG * pEarliest,
  499. [out] LONGLONG * pLatest);
  500. HRESULT SetRate([in] double dRate);
  501. HRESULT GetRate([out] double * pdRate);
  502. HRESULT GetPreroll([out] LONGLONG * pllPreroll);
  503. }
  504. typedef IMediaSeeking *PMEDIASEEKING;
  505. enum tagAM_MEDIAEVENT_FLAGS
  506. {
  507. AM_MEDIAEVENT_NONOTIFY = 0x01
  508. };