ksproxy.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef __KSPROXY__
  7. #define __KSPROXY__
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #undef KSDDKAPI
  12. #ifdef _KSDDK_
  13. #define KSDDKAPI
  14. #else
  15. #define KSDDKAPI DECLSPEC_IMPORT
  16. #endif
  17. #define STATIC_IID_IKsObject \
  18. 0x423c13a2,0x2070,0x11d0,0x9e,0xf7,0x00,0xaa,0x00,0xa2,0x16,0xa1
  19. #define STATIC_IID_IKsPinEx \
  20. 0x7bb38260,0xd19c,0x11d2,0xb3,0x8a,0x00,0xa0,0xc9,0x5e,0xc2,0x2e
  21. #define STATIC_IID_IKsPin \
  22. 0xb61178d1,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1
  23. #define STATIC_IID_IKsPinPipe \
  24. 0xe539cd90,0xa8b4,0x11d1,0x81,0x89,0x00,0xa0,0xc9,0x06,0x28,0x02
  25. #define STATIC_IID_IKsDataTypeHandler \
  26. 0x5ffbaa02,0x49a3,0x11d0,0x9f,0x36,0x00,0xaa,0x00,0xa2,0x16,0xa1
  27. #define STATIC_IID_IKsDataTypeCompletion \
  28. 0x827D1A0E,0x0F73,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
  29. #define STATIC_IID_IKsInterfaceHandler \
  30. 0xD3ABC7E0,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96
  31. #define STATIC_IID_IKsClockPropertySet \
  32. 0x5C5CBD84,0xE755,0x11D0,0xAC,0x18,0x00,0xA0,0xC9,0x22,0x31,0x96
  33. #define STATIC_IID_IKsAllocator \
  34. 0x8da64899,0xc0d9,0x11d0,0x84,0x13,0x00,0x00,0xf8,0x22,0xfe,0x8a
  35. #define STATIC_IID_IKsAllocatorEx \
  36. 0x091bb63a,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02
  37. #ifndef STATIC_IID_IKsPropertySet
  38. #define STATIC_IID_IKsPropertySet \
  39. 0x31EFAC30,0x515C,0x11d0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93
  40. #endif
  41. #define STATIC_IID_IKsTopology \
  42. 0x28F54683,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
  43. #ifndef STATIC_IID_IKsControl
  44. #define STATIC_IID_IKsControl \
  45. 0x28F54685,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
  46. #endif
  47. #define STATIC_IID_IKsAggregateControl \
  48. 0x7F40EAC0,0x3947,0x11D2,0x87,0x4E,0x00,0xA0,0xC9,0x22,0x31,0x96
  49. #define STATIC_CLSID_Proxy \
  50. 0x17CCA71B,0xECD7,0x11D0,0xB9,0x08,0x00,0xA0,0xC9,0x22,0x31,0x96
  51. #ifdef _KS_
  52. DEFINE_GUIDEX(IID_IKsObject);
  53. DEFINE_GUIDEX(IID_IKsPin);
  54. DEFINE_GUIDEX(IID_IKsPinEx);
  55. DEFINE_GUIDEX(IID_IKsPinPipe);
  56. DEFINE_GUIDEX(IID_IKsDataTypeHandler);
  57. DEFINE_GUIDEX(IID_IKsDataTypeCompletion);
  58. DEFINE_GUIDEX(IID_IKsInterfaceHandler);
  59. DEFINE_GUIDEX(IID_IKsClockPropertySet);
  60. DEFINE_GUIDEX(IID_IKsAllocator);
  61. DEFINE_GUIDEX(IID_IKsAllocatorEx);
  62. #define IID_IKsQualityForwarder KSCATEGORY_QUALITY
  63. #define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY
  64. typedef enum {
  65. KsAllocatorMode_User,
  66. KsAllocatorMode_Kernel
  67. } KSALLOCATORMODE;
  68. typedef enum {
  69. FramingProp_Uninitialized,
  70. FramingProp_None,
  71. FramingProp_Old,
  72. FramingProp_Ex
  73. } FRAMING_PROP;
  74. typedef FRAMING_PROP *PFRAMING_PROP;
  75. typedef enum {
  76. Framing_Cache_Update,
  77. Framing_Cache_ReadLast,
  78. Framing_Cache_ReadOrig,
  79. Framing_Cache_Write
  80. } FRAMING_CACHE_OPS;
  81. typedef struct {
  82. LONGLONG MinTotalNominator;
  83. LONGLONG MaxTotalNominator;
  84. LONGLONG TotalDenominator;
  85. } OPTIMAL_WEIGHT_TOTALS;
  86. typedef struct IPin IPin;
  87. typedef struct IKsPin IKsPin;
  88. typedef struct IKsAllocator IKsAllocator;
  89. typedef struct IKsAllocatorEx IKsAllocatorEx;
  90. #define AllocatorStrategy_DontCare 0
  91. #define AllocatorStrategy_MinimizeNumberOfFrames 0x00000001
  92. #define AllocatorStrategy_MinimizeFrameSize 0x00000002
  93. #define AllocatorStrategy_MinimizeNumberOfAllocators 0x00000004
  94. #define AllocatorStrategy_MaximizeSpeed 0x00000008
  95. #define PipeFactor_None 0
  96. #define PipeFactor_UserModeUpstream 0x00000001
  97. #define PipeFactor_UserModeDownstream 0x00000002
  98. #define PipeFactor_MemoryTypes 0x00000004
  99. #define PipeFactor_Flags 0x00000008
  100. #define PipeFactor_PhysicalRanges 0x00000010
  101. #define PipeFactor_OptimalRanges 0x00000020
  102. #define PipeFactor_FixedCompression 0x00000040
  103. #define PipeFactor_UnknownCompression 0x00000080
  104. #define PipeFactor_Buffers 0x00000100
  105. #define PipeFactor_Align 0x00000200
  106. #define PipeFactor_PhysicalEnd 0x00000400
  107. #define PipeFactor_LogicalEnd 0x00000800
  108. typedef enum {
  109. PipeState_DontCare,
  110. PipeState_RangeNotFixed,
  111. PipeState_RangeFixed,
  112. PipeState_CompressionUnknown,
  113. PipeState_Finalized
  114. } PIPE_STATE;
  115. typedef struct _PIPE_DIMENSIONS {
  116. KS_COMPRESSION AllocatorPin;
  117. KS_COMPRESSION MaxExpansionPin;
  118. KS_COMPRESSION EndPin;
  119. } PIPE_DIMENSIONS,*PPIPE_DIMENSIONS;
  120. typedef enum {
  121. Pipe_Allocator_None,
  122. Pipe_Allocator_FirstPin,
  123. Pipe_Allocator_LastPin,
  124. Pipe_Allocator_MiddlePin
  125. } PIPE_ALLOCATOR_PLACE;
  126. typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE;
  127. typedef enum {
  128. KS_MemoryTypeDontCare = 0,
  129. KS_MemoryTypeKernelPaged,
  130. KS_MemoryTypeKernelNonPaged,
  131. KS_MemoryTypeDeviceHostMapped,
  132. KS_MemoryTypeDeviceSpecific,
  133. KS_MemoryTypeUser,
  134. KS_MemoryTypeAnyHost
  135. } KS_LogicalMemoryType;
  136. typedef KS_LogicalMemoryType *PKS_LogicalMemoryType;
  137. typedef struct _PIPE_TERMINATION {
  138. ULONG Flags;
  139. ULONG OutsideFactors;
  140. ULONG Weigth;
  141. KS_FRAMING_RANGE PhysicalRange;
  142. KS_FRAMING_RANGE_WEIGHTED OptimalRange;
  143. KS_COMPRESSION Compression;
  144. } PIPE_TERMINATION;
  145. typedef struct _ALLOCATOR_PROPERTIES_EX
  146. {
  147. __LONG32 cBuffers;
  148. __LONG32 cbBuffer;
  149. __LONG32 cbAlign;
  150. __LONG32 cbPrefix;
  151. GUID MemoryType;
  152. GUID BusType;
  153. PIPE_STATE State;
  154. PIPE_TERMINATION Input;
  155. PIPE_TERMINATION Output;
  156. ULONG Strategy;
  157. ULONG Flags;
  158. ULONG Weight;
  159. KS_LogicalMemoryType LogicalMemoryType;
  160. PIPE_ALLOCATOR_PLACE AllocatorPlace;
  161. PIPE_DIMENSIONS Dimensions;
  162. KS_FRAMING_RANGE PhysicalRange;
  163. IKsAllocatorEx *PrevSegment;
  164. ULONG CountNextSegments;
  165. IKsAllocatorEx **NextSegments;
  166. ULONG InsideFactors;
  167. ULONG NumberPins;
  168. } ALLOCATOR_PROPERTIES_EX;
  169. typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX;
  170. #ifdef __STREAMS__
  171. struct IKsClockPropertySet;
  172. #ifdef __CRT_UUID_DECL
  173. __CRT_UUID_DECL(IKsClockPropertySet,0x5c5cbd84,0xe755,0x11d0,0xac,0x18,0x00,0xa0,0xc9,0x22,0x31,0x96);
  174. #endif
  175. #undef INTERFACE
  176. #define INTERFACE IKsClockPropertySet
  177. DECLARE_INTERFACE_(IKsClockPropertySet,IUnknown)
  178. {
  179. STDMETHOD(KsGetTime) (THIS_
  180. LONGLONG *Time
  181. ) PURE;
  182. STDMETHOD(KsSetTime) (THIS_
  183. LONGLONG Time
  184. ) PURE;
  185. STDMETHOD(KsGetPhysicalTime) (THIS_
  186. LONGLONG *Time
  187. ) PURE;
  188. STDMETHOD(KsSetPhysicalTime) (THIS_
  189. LONGLONG Time
  190. ) PURE;
  191. STDMETHOD(KsGetCorrelatedTime) (THIS_
  192. KSCORRELATED_TIME *CorrelatedTime
  193. ) PURE;
  194. STDMETHOD(KsSetCorrelatedTime) (THIS_
  195. KSCORRELATED_TIME *CorrelatedTime
  196. ) PURE;
  197. STDMETHOD(KsGetCorrelatedPhysicalTime)(THIS_
  198. KSCORRELATED_TIME *CorrelatedTime
  199. ) PURE;
  200. STDMETHOD(KsSetCorrelatedPhysicalTime)(THIS_
  201. KSCORRELATED_TIME *CorrelatedTime
  202. ) PURE;
  203. STDMETHOD(KsGetResolution) (THIS_
  204. KSRESOLUTION *Resolution
  205. ) PURE;
  206. STDMETHOD(KsGetState) (THIS_
  207. KSSTATE *State
  208. ) PURE;
  209. };
  210. struct IKsAllocator;
  211. #ifdef __CRT_UUID_DECL
  212. __CRT_UUID_DECL(IKsAllocator,0x8da64899,0xc0d9,0x11d0,0x84,0x13,0x00,0x00,0xf8,0x22,0xfe,0x8a);
  213. #endif
  214. #undef INTERFACE
  215. #define INTERFACE IKsAllocator
  216. DECLARE_INTERFACE_(IKsAllocator,IUnknown)
  217. {
  218. STDMETHOD_(HANDLE,KsGetAllocatorHandle)(THIS) PURE;
  219. STDMETHOD_(KSALLOCATORMODE,KsGetAllocatorMode)(THIS) PURE;
  220. STDMETHOD(KsGetAllocatorStatus) (THIS_
  221. PKSSTREAMALLOCATOR_STATUS AllocatorStatus
  222. ) PURE;
  223. STDMETHOD_(VOID,KsSetAllocatorMode) (THIS_
  224. KSALLOCATORMODE Mode
  225. ) PURE;
  226. };
  227. struct IKsAllocatorEx;
  228. #ifdef __CRT_UUID_DECL
  229. __CRT_UUID_DECL(IKsAllocatorEx,0x091bb63a,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02);
  230. #endif
  231. #undef INTERFACE
  232. #define INTERFACE IKsAllocatorEx
  233. DECLARE_INTERFACE_(IKsAllocatorEx,IKsAllocator)
  234. {
  235. STDMETHOD_(PALLOCATOR_PROPERTIES_EX,KsGetProperties)(THIS) PURE;
  236. STDMETHOD_(VOID,KsSetProperties) (THIS_
  237. PALLOCATOR_PROPERTIES_EX
  238. ) PURE;
  239. STDMETHOD_(VOID,KsSetAllocatorHandle) (THIS_
  240. HANDLE AllocatorHandle
  241. ) PURE;
  242. STDMETHOD_(HANDLE,KsCreateAllocatorAndGetHandle)(THIS_
  243. IKsPin *KsPin
  244. ) PURE;
  245. };
  246. typedef enum {
  247. KsPeekOperation_PeekOnly,
  248. KsPeekOperation_AddRef
  249. } KSPEEKOPERATION;
  250. typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT;
  251. struct IKsPin;
  252. #ifdef __CRT_UUID_DECL
  253. __CRT_UUID_DECL(IKsPin,0xb61178d1,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1);
  254. #endif
  255. #undef INTERFACE
  256. #define INTERFACE IKsPin
  257. DECLARE_INTERFACE_(IKsPin,IUnknown)
  258. {
  259. STDMETHOD(KsQueryMediums) (THIS_
  260. PKSMULTIPLE_ITEM *MediumList
  261. ) PURE;
  262. STDMETHOD(KsQueryInterfaces) (THIS_
  263. PKSMULTIPLE_ITEM *InterfaceList
  264. ) PURE;
  265. STDMETHOD(KsCreateSinkPinHandle) (THIS_
  266. KSPIN_INTERFACE& Interface,
  267. KSPIN_MEDIUM& Medium
  268. ) PURE;
  269. STDMETHOD(KsGetCurrentCommunication) (THIS_
  270. KSPIN_COMMUNICATION *Communication,
  271. KSPIN_INTERFACE *Interface,
  272. KSPIN_MEDIUM *Medium
  273. ) PURE;
  274. STDMETHOD(KsPropagateAcquire) (THIS) PURE;
  275. STDMETHOD(KsDeliver) (THIS_
  276. IMediaSample *Sample,
  277. ULONG Flags
  278. ) PURE;
  279. STDMETHOD(KsMediaSamplesCompleted) (THIS_
  280. PKSSTREAM_SEGMENT StreamSegment
  281. ) PURE;
  282. STDMETHOD_(IMemAllocator *,KsPeekAllocator)(THIS_
  283. KSPEEKOPERATION Operation
  284. ) PURE;
  285. STDMETHOD(KsReceiveAllocator) (THIS_
  286. IMemAllocator *MemAllocator
  287. ) PURE;
  288. STDMETHOD(KsRenegotiateAllocator) (THIS) PURE;
  289. STDMETHOD_(LONG,KsIncrementPendingIoCount)(THIS) PURE;
  290. STDMETHOD_(LONG,KsDecrementPendingIoCount)(THIS) PURE;
  291. STDMETHOD(KsQualityNotify) (THIS_
  292. ULONG Proportion,
  293. REFERENCE_TIME TimeDelta
  294. ) PURE;
  295. };
  296. struct IKsPinEx;
  297. #ifdef __CRT_UUID_DECL
  298. __CRT_UUID_DECL(IKsPinEx,0x7bb38260,0xd19c,0x11d2,0xb3,0x8a,0x00,0xa0,0xc9,0x5e,0xc2,0x2e);
  299. #endif
  300. #undef INTERFACE
  301. #define INTERFACE IKsPinEx
  302. DECLARE_INTERFACE_(IKsPinEx,IKsPin)
  303. {
  304. STDMETHOD_(VOID,KsNotifyError) (THIS_
  305. IMediaSample *Sample,
  306. HRESULT hr
  307. ) PURE;
  308. };
  309. struct IKsPinPipe;
  310. #ifdef __CRT_UUID_DECL
  311. __CRT_UUID_DECL(IKsPinPipe,0xe539cd90,0xa8b4,0x11d1,0x81,0x89,0x00,0xa0,0xc9,0x06,0x28,0x02);
  312. #endif
  313. #undef INTERFACE
  314. #define INTERFACE IKsPinPipe
  315. DECLARE_INTERFACE_(IKsPinPipe,IUnknown)
  316. {
  317. STDMETHOD(KsGetPinFramingCache) (THIS_
  318. PKSALLOCATOR_FRAMING_EX *FramingEx,
  319. PFRAMING_PROP FramingProp,
  320. FRAMING_CACHE_OPS Option
  321. ) PURE;
  322. STDMETHOD(KsSetPinFramingCache) (THIS_
  323. PKSALLOCATOR_FRAMING_EX FramingEx,
  324. PFRAMING_PROP FramingProp,
  325. FRAMING_CACHE_OPS Option
  326. ) PURE;
  327. STDMETHOD_(IPin*,KsGetConnectedPin) (THIS) PURE;
  328. STDMETHOD_(IKsAllocatorEx*,KsGetPipe) (THIS_
  329. KSPEEKOPERATION Operation
  330. ) PURE;
  331. STDMETHOD(KsSetPipe) (THIS_
  332. IKsAllocatorEx *KsAllocator
  333. ) PURE;
  334. STDMETHOD_(ULONG,KsGetPipeAllocatorFlag)(THIS) PURE;
  335. STDMETHOD(KsSetPipeAllocatorFlag) (THIS_
  336. ULONG Flag
  337. ) PURE;
  338. STDMETHOD_(GUID,KsGetPinBusCache) (THIS) PURE;
  339. STDMETHOD(KsSetPinBusCache) (THIS_
  340. GUID Bus
  341. ) PURE;
  342. STDMETHOD_(PWCHAR,KsGetPinName) (THIS) PURE;
  343. STDMETHOD_(PWCHAR,KsGetFilterName) (THIS) PURE;
  344. };
  345. struct IKsPinFactory;
  346. #ifdef __CRT_UUID_DECL
  347. __CRT_UUID_DECL(IKsPinFactory,0xcd5ebe6b,0x8b6e,0x11d1,0x8a,0xe0,0x00,0xa0,0xc9,0x22,0x31,0x96);
  348. #endif
  349. #undef INTERFACE
  350. #define INTERFACE IKsPinFactory
  351. DECLARE_INTERFACE_(IKsPinFactory,IUnknown)
  352. {
  353. STDMETHOD(KsPinFactory) (THIS_
  354. ULONG *PinFactory
  355. ) PURE;
  356. };
  357. typedef enum {
  358. KsIoOperation_Write,
  359. KsIoOperation_Read
  360. } KSIOOPERATION;
  361. struct IKsDataTypeHandler;
  362. #ifdef __CRT_UUID_DECL
  363. __CRT_UUID_DECL(IKsDataTypeHandler,0x5ffbaa02,0x49a3,0x11d0,0x9f,0x36,0x00,0xaa,0x00,0xa2,0x16,0xa1);
  364. #endif
  365. #undef INTERFACE
  366. #define INTERFACE IKsDataTypeHandler
  367. DECLARE_INTERFACE_(IKsDataTypeHandler,IUnknown)
  368. {
  369. STDMETHOD(KsCompleteIoOperation) (THIS_
  370. IMediaSample *Sample,
  371. PVOID StreamHeader,
  372. KSIOOPERATION IoOperation,
  373. WINBOOL Cancelled
  374. ) PURE;
  375. STDMETHOD(KsIsMediaTypeInRanges) (THIS_
  376. PVOID DataRanges
  377. ) PURE;
  378. STDMETHOD(KsPrepareIoOperation) (THIS_
  379. IMediaSample *Sample,
  380. PVOID StreamHeader,
  381. KSIOOPERATION IoOperation
  382. ) PURE;
  383. STDMETHOD(KsQueryExtendedSize) (THIS_
  384. ULONG *ExtendedSize
  385. ) PURE;
  386. STDMETHOD(KsSetMediaType) (THIS_
  387. const AM_MEDIA_TYPE *AmMediaType
  388. ) PURE;
  389. };
  390. struct IKsDataTypeCompletion;
  391. #ifdef __CRT_UUID_DECL
  392. __CRT_UUID_DECL(IKsDataTypeCompletion,0x827d1a0e,0x0f73,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
  393. #endif
  394. #undef INTERFACE
  395. #define INTERFACE IKsDataTypeCompletion
  396. DECLARE_INTERFACE_(IKsDataTypeCompletion,IUnknown)
  397. {
  398. STDMETHOD(KsCompleteMediaType) (THIS_
  399. HANDLE FilterHandle,
  400. ULONG PinFactoryId,
  401. AM_MEDIA_TYPE *AmMediaType
  402. ) PURE;
  403. };
  404. struct IKsInterfaceHandler;
  405. #ifdef __CRT_UUID_DECL
  406. __CRT_UUID_DECL(IKsInterfaceHandler,0xd3abc7e0,0x9a61,0x11d0,0xa4,0x0d,0x00,0xa0,0xc9,0x22,0x31,0x96);
  407. #endif
  408. #undef INTERFACE
  409. #define INTERFACE IKsInterfaceHandler
  410. DECLARE_INTERFACE_(IKsInterfaceHandler,IUnknown)
  411. {
  412. STDMETHOD(KsSetPin) (THIS_
  413. IKsPin *KsPin
  414. ) PURE;
  415. STDMETHOD(KsProcessMediaSamples) (THIS_
  416. IKsDataTypeHandler *KsDataTypeHandler,
  417. IMediaSample **SampleList,
  418. PLONG SampleCount,
  419. KSIOOPERATION IoOperation,
  420. PKSSTREAM_SEGMENT *StreamSegment
  421. ) PURE;
  422. STDMETHOD(KsCompleteIo) (THIS_
  423. PKSSTREAM_SEGMENT StreamSegment
  424. ) PURE;
  425. };
  426. typedef struct _KSSTREAM_SEGMENT {
  427. IKsInterfaceHandler *KsInterfaceHandler;
  428. IKsDataTypeHandler *KsDataTypeHandler;
  429. KSIOOPERATION IoOperation;
  430. HANDLE CompletionEvent;
  431. } KSSTREAM_SEGMENT;
  432. struct IKsObject;
  433. #ifdef __CRT_UUID_DECL
  434. __CRT_UUID_DECL(IKsObject,0x423c13a2,0x2070,0x11d0,0x9e,0xf7,0x00,0xaa,0x00,0xa2,0x16,0xa1);
  435. #endif
  436. #undef INTERFACE
  437. #define INTERFACE IKsObject
  438. DECLARE_INTERFACE_(IKsObject,IUnknown)
  439. {
  440. STDMETHOD_(HANDLE,KsGetObjectHandle) (THIS) PURE;
  441. };
  442. struct IKsQualityForwarder;
  443. #ifdef __CRT_UUID_DECL
  444. __CRT_UUID_DECL(IKsQualityForwarder,0x97ebaacb,0x95bd,0x11d0,0xa3,0xea,0x00,0xa0,0xc9,0x22,0x31,0x96);
  445. #endif
  446. #undef INTERFACE
  447. #define INTERFACE IKsQualityForwarder
  448. DECLARE_INTERFACE_(IKsQualityForwarder,IKsObject)
  449. {
  450. STDMETHOD_(VOID,KsFlushClient) (THIS_
  451. IKsPin *Pin
  452. ) PURE;
  453. };
  454. struct IKsNotifyEvent;
  455. #ifdef __CRT_UUID_DECL
  456. __CRT_UUID_DECL(IKsNotifyEvent,0x412bd695,0xf84b,0x46c1,0xac,0x73,0x54,0x19,0x6d,0xbc,0x8f,0xa7);
  457. #endif
  458. #undef INTERFACE
  459. #define INTERFACE IKsNotifyEvent
  460. DECLARE_INTERFACE_(IKsNotifyEvent,IUnknown)
  461. {
  462. STDMETHOD(KsNotifyEvent) (THIS_
  463. ULONG Event,
  464. ULONG_PTR lParam1,
  465. ULONG_PTR lParam2
  466. ) PURE;
  467. };
  468. KSDDKAPI HRESULT WINAPI KsResolveRequiredAttributes(PKSDATARANGE DataRange,PKSMULTIPLE_ITEM Attributes);
  469. KSDDKAPI HRESULT WINAPI KsOpenDefaultDevice(REFGUID Category,ACCESS_MASK Access,PHANDLE DeviceHandle);
  470. KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle,ULONG IoControl,PVOID InBuffer,ULONG InLength,PVOID OutBuffer,ULONG OutLength,PULONG BytesReturned);
  471. KSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(HANDLE FilterHandle,ULONG PinFactoryId,ULONG PropertyId,PVOID *Items);
  472. KSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(HANDLE FilterHandle,ULONG PinFactoryId,ULONG *MediaTypeCount);
  473. KSDDKAPI HRESULT WINAPI KsGetMediaType(int Position,AM_MEDIA_TYPE *AmMediaType,HANDLE FilterHandle,ULONG PinFactoryId);
  474. #endif /* __STREAMS__ */
  475. #ifndef _IKsPropertySet_
  476. DEFINE_GUIDEX(IID_IKsPropertySet);
  477. #endif
  478. #ifndef _IKsControl_
  479. DEFINE_GUIDEX(IID_IKsControl);
  480. #endif
  481. DEFINE_GUIDEX(IID_IKsAggregateControl);
  482. #ifndef _IKsTopology_
  483. DEFINE_GUIDEX(IID_IKsTopology);
  484. #endif
  485. DEFINE_GUIDSTRUCT("17CCA71B-ECD7-11D0-B908-00A0C9223196",CLSID_Proxy);
  486. #define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy)
  487. #else /* _KS_ */
  488. #ifndef _IKsPropertySet_
  489. DEFINE_GUID(IID_IKsPropertySet,STATIC_IID_IKsPropertySet);
  490. #endif
  491. DEFINE_GUID(CLSID_Proxy,STATIC_CLSID_Proxy);
  492. #endif /* _KS_ */
  493. #ifndef _IKsPropertySet_
  494. #define _IKsPropertySet_
  495. #define KSPROPERTY_SUPPORT_GET 1
  496. #define KSPROPERTY_SUPPORT_SET 2
  497. #ifdef DECLARE_INTERFACE_
  498. struct IKsPropertySet;
  499. #undef INTERFACE
  500. #define INTERFACE IKsPropertySet
  501. DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
  502. {
  503. STDMETHOD(Set) (THIS_
  504. REFGUID PropSet,
  505. ULONG Id,
  506. LPVOID InstanceData,
  507. ULONG InstanceLength,
  508. LPVOID PropertyData,
  509. ULONG DataLength
  510. ) PURE;
  511. STDMETHOD(Get) (THIS_
  512. REFGUID PropSet,
  513. ULONG Id,
  514. LPVOID InstanceData,
  515. ULONG InstanceLength,
  516. LPVOID PropertyData,
  517. ULONG DataLength,
  518. ULONG *BytesReturned
  519. ) PURE;
  520. STDMETHOD(QuerySupported) (THIS_
  521. REFGUID PropSet,
  522. ULONG Id,
  523. ULONG *TypeSupport
  524. ) PURE;
  525. };
  526. #endif /* DECLARE_INTERFACE_ */
  527. #endif /* _IKsPropertySet_ */
  528. #ifndef _IKsControl_
  529. #define _IKsControl_
  530. #ifdef DECLARE_INTERFACE_
  531. struct IKsControl;
  532. #undef INTERFACE
  533. #define INTERFACE IKsControl
  534. DECLARE_INTERFACE_(IKsControl,IUnknown)
  535. {
  536. STDMETHOD(KsProperty) (THIS_
  537. PKSPROPERTY Property,
  538. ULONG PropertyLength,
  539. LPVOID PropertyData,
  540. ULONG DataLength,
  541. ULONG *BytesReturned
  542. ) PURE;
  543. STDMETHOD(KsMethod) (THIS_
  544. PKSMETHOD Method,
  545. ULONG MethodLength,
  546. LPVOID MethodData,
  547. ULONG DataLength,
  548. ULONG *BytesReturned
  549. ) PURE;
  550. STDMETHOD(KsEvent) (THIS_
  551. PKSEVENT Event,
  552. ULONG EventLength,
  553. LPVOID EventData,
  554. ULONG DataLength,
  555. ULONG *BytesReturned
  556. ) PURE;
  557. };
  558. #endif /* DECLARE_INTERFACE_ */
  559. #endif /* _IKsControl_ */
  560. #ifdef DECLARE_INTERFACE_
  561. struct IKsAggregateControl;
  562. #undef INTERFACE
  563. #define INTERFACE IKsAggregateControl
  564. DECLARE_INTERFACE_(IKsAggregateControl,IUnknown)
  565. {
  566. STDMETHOD(KsAddAggregate) (THIS_
  567. REFGUID AggregateClass
  568. ) PURE;
  569. STDMETHOD(KsRemoveAggregate) (THIS_
  570. REFGUID AggregateClass
  571. ) PURE;
  572. };
  573. #endif /* DECLARE_INTERFACE_ */
  574. #ifndef _IKsTopology_
  575. #define _IKsTopology_
  576. #ifdef DECLARE_INTERFACE_
  577. struct IKsTopology;
  578. #undef INTERFACE
  579. #define INTERFACE IKsTopology
  580. DECLARE_INTERFACE_(IKsTopology,IUnknown)
  581. {
  582. STDMETHOD(CreateNodeInstance) (THIS_
  583. ULONG NodeId,
  584. ULONG Flags,
  585. ACCESS_MASK DesiredAccess,
  586. IUnknown *UnkOuter,
  587. REFGUID InterfaceId,
  588. LPVOID *Interface
  589. ) PURE;
  590. };
  591. #endif /* DECLARE_INTERFACE_ */
  592. #endif /* _IKsTopology_ */
  593. #ifdef __cplusplus
  594. }
  595. #endif
  596. #endif /* __KSPROXY__ */