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.

845 lines
22 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ksproxy.h
  5. Abstract:
  6. Interface definitions for WDM-CSA proxy filters.
  7. --*/
  8. #ifndef __KSPROXY__
  9. #define __KSPROXY__
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #undef KSDDKAPI
  14. #ifdef _KSDDK_
  15. #define KSDDKAPI
  16. #else // !_KSDDK_
  17. #define KSDDKAPI DECLSPEC_IMPORT
  18. #endif // _KSDDK_
  19. #define STATIC_IID_IKsObject\
  20. 0x423c13a2L, 0x2070, 0x11d0, 0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
  21. #define STATIC_IID_IKsPinEx\
  22. 0x7bb38260L, 0xd19c, 0x11d2, 0xb3, 0x8a, 0x00, 0xa0, 0xc9, 0x5e, 0xc2, 0x2e
  23. #define STATIC_IID_IKsPin\
  24. 0xb61178d1L, 0xa2d9, 0x11cf, 0x9e, 0x53, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
  25. #define STATIC_IID_IKsPinPipe\
  26. 0xe539cd90L, 0xa8b4, 0x11d1, 0x81, 0x89, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
  27. #define STATIC_IID_IKsDataTypeHandler\
  28. 0x5ffbaa02L, 0x49a3, 0x11d0, 0x9f, 0x36, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
  29. #define STATIC_IID_IKsDataTypeCompletion\
  30. 0x827D1A0EL, 0x0F73, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  31. #define STATIC_IID_IKsInterfaceHandler\
  32. 0xD3ABC7E0L, 0x9A61, 0x11D0, 0xA4, 0x0D, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  33. #define STATIC_IID_IKsClockPropertySet\
  34. 0x5C5CBD84L, 0xE755, 0x11D0, 0xAC, 0x18, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  35. #define STATIC_IID_IKsAllocator\
  36. 0x8da64899L, 0xc0d9, 0x11d0, 0x84, 0x13, 0x00, 0x00, 0xf8, 0x22, 0xfe, 0x8a
  37. #define STATIC_IID_IKsAllocatorEx\
  38. 0x091bb63aL, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
  39. #ifndef STATIC_IID_IKsPropertySet
  40. #define STATIC_IID_IKsPropertySet\
  41. 0x31EFAC30L, 0x515C, 0x11d0, 0xA9, 0xAA, 0x00, 0xAA, 0x00, 0x61, 0xBE, 0x93
  42. #endif // STATIC_IID_IKsPropertySet
  43. #define STATIC_IID_IKsTopology\
  44. 0x28F54683L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  45. #ifndef STATIC_IID_IKsControl
  46. #define STATIC_IID_IKsControl\
  47. 0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  48. #endif // STATIC_IID_IKsControl
  49. #define STATIC_IID_IKsAggregateControl\
  50. 0x7F40EAC0L, 0x3947, 0x11D2, 0x87, 0x4E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  51. #define STATIC_CLSID_Proxy \
  52. 0x17CCA71BL, 0xECD7, 0x11D0, 0xB9, 0x08, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  53. #ifdef _KS_
  54. #if !defined(__cplusplus) || _MSC_VER < 1100
  55. DEFINE_GUIDEX(IID_IKsObject);
  56. DEFINE_GUIDEX(IID_IKsPin);
  57. DEFINE_GUIDEX(IID_IKsPinEx);
  58. DEFINE_GUIDEX(IID_IKsPinPipe);
  59. DEFINE_GUIDEX(IID_IKsDataTypeHandler);
  60. DEFINE_GUIDEX(IID_IKsDataTypeCompletion);
  61. DEFINE_GUIDEX(IID_IKsInterfaceHandler);
  62. DEFINE_GUIDEX(IID_IKsClockPropertySet);
  63. DEFINE_GUIDEX(IID_IKsAllocator);
  64. DEFINE_GUIDEX(IID_IKsAllocatorEx);
  65. #define IID_IKsQualityForwarder KSCATEGORY_QUALITY
  66. #endif // !defined(__cplusplus) || _MSC_VER < 1100
  67. #define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY
  68. typedef enum {
  69. KsAllocatorMode_User,
  70. KsAllocatorMode_Kernel
  71. } KSALLOCATORMODE;
  72. typedef enum {
  73. FramingProp_Uninitialized,
  74. FramingProp_None,
  75. FramingProp_Old,
  76. FramingProp_Ex
  77. } FRAMING_PROP;
  78. typedef FRAMING_PROP *PFRAMING_PROP;
  79. typedef enum {
  80. Framing_Cache_Update, // request to bypass cache when read/write
  81. Framing_Cache_ReadLast,
  82. Framing_Cache_ReadOrig,
  83. Framing_Cache_Write
  84. } FRAMING_CACHE_OPS;
  85. typedef struct {
  86. LONGLONG MinTotalNominator;
  87. LONGLONG MaxTotalNominator;
  88. LONGLONG TotalDenominator;
  89. } OPTIMAL_WEIGHT_TOTALS;
  90. // forward declaration
  91. typedef struct IPin IPin;
  92. typedef struct IKsPin IKsPin;
  93. typedef struct IKsAllocator IKsAllocator;
  94. typedef struct IKsAllocatorEx IKsAllocatorEx;
  95. //
  96. // allocators strategy is defined by graph manager
  97. //
  98. #define AllocatorStrategy_DontCare 0
  99. //
  100. // what to optimize
  101. //
  102. #define AllocatorStrategy_MinimizeNumberOfFrames 0x00000001
  103. #define AllocatorStrategy_MinimizeFrameSize 0x00000002
  104. #define AllocatorStrategy_MinimizeNumberOfAllocators 0x00000004
  105. #define AllocatorStrategy_MaximizeSpeed 0x00000008
  106. //
  107. // factors (flags) defining the Pipes properties
  108. //
  109. #define PipeFactor_None 0
  110. #define PipeFactor_UserModeUpstream 0x00000001
  111. #define PipeFactor_UserModeDownstream 0x00000002
  112. #define PipeFactor_MemoryTypes 0x00000004
  113. #define PipeFactor_Flags 0x00000008
  114. #define PipeFactor_PhysicalRanges 0x00000010
  115. #define PipeFactor_OptimalRanges 0x00000020
  116. #define PipeFactor_FixedCompression 0x00000040
  117. #define PipeFactor_UnknownCompression 0x00000080
  118. #define PipeFactor_Buffers 0x00000100
  119. #define PipeFactor_Align 0x00000200
  120. #define PipeFactor_PhysicalEnd 0x00000400
  121. #define PipeFactor_LogicalEnd 0x00000800
  122. typedef enum {
  123. PipeState_DontCare,
  124. PipeState_RangeNotFixed,
  125. PipeState_RangeFixed,
  126. PipeState_CompressionUnknown,
  127. PipeState_Finalized
  128. } PIPE_STATE;
  129. //
  130. // pipe dimensions relative to BeginPin.
  131. //
  132. typedef struct _PIPE_DIMENSIONS {
  133. KS_COMPRESSION AllocatorPin;
  134. KS_COMPRESSION MaxExpansionPin;
  135. KS_COMPRESSION EndPin;
  136. } PIPE_DIMENSIONS, *PPIPE_DIMENSIONS;
  137. typedef enum {
  138. Pipe_Allocator_None,
  139. Pipe_Allocator_FirstPin,
  140. Pipe_Allocator_LastPin,
  141. Pipe_Allocator_MiddlePin
  142. } PIPE_ALLOCATOR_PLACE;
  143. typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE;
  144. typedef enum {
  145. KS_MemoryTypeDontCare = 0,
  146. KS_MemoryTypeKernelPaged,
  147. KS_MemoryTypeKernelNonPaged,
  148. KS_MemoryTypeDeviceHostMapped,
  149. KS_MemoryTypeDeviceSpecific,
  150. KS_MemoryTypeUser,
  151. KS_MemoryTypeAnyHost
  152. } KS_LogicalMemoryType;
  153. typedef KS_LogicalMemoryType *PKS_LogicalMemoryType;
  154. typedef struct _PIPE_TERMINATION {
  155. ULONG Flags;
  156. ULONG OutsideFactors;
  157. ULONG Weigth; // outside weight
  158. KS_FRAMING_RANGE PhysicalRange;
  159. KS_FRAMING_RANGE_WEIGHTED OptimalRange;
  160. KS_COMPRESSION Compression; // relative to the connected pin on a neighboring filter.
  161. } PIPE_TERMINATION;
  162. //
  163. // extended allocator properties
  164. //
  165. typedef struct _ALLOCATOR_PROPERTIES_EX
  166. {
  167. long cBuffers;
  168. long cbBuffer;
  169. long cbAlign;
  170. long cbPrefix;
  171. // new part
  172. GUID MemoryType;
  173. GUID BusType; // one of the buses this pipe is using
  174. PIPE_STATE State;
  175. PIPE_TERMINATION Input;
  176. PIPE_TERMINATION Output;
  177. ULONG Strategy;
  178. ULONG Flags;
  179. ULONG Weight;
  180. KS_LogicalMemoryType LogicalMemoryType;
  181. PIPE_ALLOCATOR_PLACE AllocatorPlace;
  182. PIPE_DIMENSIONS Dimensions;
  183. KS_FRAMING_RANGE PhysicalRange; // on allocator pin
  184. IKsAllocatorEx* PrevSegment; // doubly-linked list of KS allocators
  185. ULONG CountNextSegments; // possible multiple dependent pipes
  186. IKsAllocatorEx** NextSegments;
  187. ULONG InsideFactors; // existing factors (different from "don't care")
  188. ULONG NumberPins;
  189. } ALLOCATOR_PROPERTIES_EX;
  190. typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX;
  191. #ifdef __STREAMS__
  192. struct DECLSPEC_UUID("5C5CBD84-E755-11D0-AC18-00A0C9223196") IKsClockPropertySet;
  193. #undef INTERFACE
  194. #define INTERFACE IKsClockPropertySet
  195. DECLARE_INTERFACE_(IKsClockPropertySet, IUnknown)
  196. {
  197. STDMETHOD(KsGetTime)(
  198. THIS_
  199. LONGLONG* Time
  200. ) PURE;
  201. STDMETHOD(KsSetTime)(
  202. THIS_
  203. LONGLONG Time
  204. ) PURE;
  205. STDMETHOD(KsGetPhysicalTime)(
  206. THIS_
  207. LONGLONG* Time
  208. ) PURE;
  209. STDMETHOD(KsSetPhysicalTime)(
  210. THIS_
  211. LONGLONG Time
  212. ) PURE;
  213. STDMETHOD(KsGetCorrelatedTime)(
  214. THIS_
  215. KSCORRELATED_TIME* CorrelatedTime
  216. ) PURE;
  217. STDMETHOD(KsSetCorrelatedTime)(
  218. THIS_
  219. KSCORRELATED_TIME* CorrelatedTime
  220. ) PURE;
  221. STDMETHOD(KsGetCorrelatedPhysicalTime)(
  222. THIS_
  223. KSCORRELATED_TIME* CorrelatedTime
  224. ) PURE;
  225. STDMETHOD(KsSetCorrelatedPhysicalTime)(
  226. THIS_
  227. KSCORRELATED_TIME* CorrelatedTime
  228. ) PURE;
  229. STDMETHOD(KsGetResolution)(
  230. THIS_
  231. KSRESOLUTION* Resolution
  232. ) PURE;
  233. STDMETHOD(KsGetState)(
  234. THIS_
  235. KSSTATE* State
  236. ) PURE;
  237. };
  238. interface DECLSPEC_UUID("8da64899-c0d9-11d0-8413-0000f822fe8a") IKsAllocator;
  239. #undef INTERFACE
  240. #define INTERFACE IKsAllocator
  241. DECLARE_INTERFACE_(IKsAllocator, IUnknown)
  242. {
  243. STDMETHOD_(HANDLE, KsGetAllocatorHandle)(
  244. THIS
  245. ) PURE;
  246. STDMETHOD_(KSALLOCATORMODE, KsGetAllocatorMode)(
  247. THIS
  248. ) PURE;
  249. STDMETHOD(KsGetAllocatorStatus)(
  250. THIS_
  251. PKSSTREAMALLOCATOR_STATUS AllocatorStatus
  252. ) PURE;
  253. STDMETHOD_(VOID, KsSetAllocatorMode)(
  254. THIS_
  255. KSALLOCATORMODE Mode
  256. ) PURE;
  257. };
  258. interface DECLSPEC_UUID("091bb63a-603f-11d1-b067-00a0c9062802") IKsAllocatorEx;
  259. #undef INTERFACE
  260. #define INTERFACE IKsAllocatorEx
  261. DECLARE_INTERFACE_(IKsAllocatorEx, IKsAllocator)
  262. {
  263. STDMETHOD_(PALLOCATOR_PROPERTIES_EX, KsGetProperties)(
  264. THIS
  265. ) PURE;
  266. STDMETHOD_(VOID, KsSetProperties)(
  267. THIS_
  268. PALLOCATOR_PROPERTIES_EX
  269. ) PURE;
  270. STDMETHOD_(VOID, KsSetAllocatorHandle)(
  271. THIS_
  272. HANDLE AllocatorHandle
  273. ) PURE;
  274. STDMETHOD_(HANDLE, KsCreateAllocatorAndGetHandle)(
  275. THIS_
  276. IKsPin* KsPin
  277. ) PURE;
  278. };
  279. typedef enum {
  280. KsPeekOperation_PeekOnly,
  281. KsPeekOperation_AddRef
  282. } KSPEEKOPERATION;
  283. typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT;
  284. interface DECLSPEC_UUID("b61178d1-a2d9-11cf-9e53-00aa00a216a1") IKsPin;
  285. #undef INTERFACE
  286. #define INTERFACE IKsPin
  287. DECLARE_INTERFACE_(IKsPin, IUnknown)
  288. {
  289. STDMETHOD(KsQueryMediums)(
  290. THIS_
  291. PKSMULTIPLE_ITEM* MediumList
  292. ) PURE;
  293. STDMETHOD(KsQueryInterfaces)(
  294. THIS_
  295. PKSMULTIPLE_ITEM* InterfaceList
  296. ) PURE;
  297. STDMETHOD(KsCreateSinkPinHandle)(
  298. THIS_
  299. KSPIN_INTERFACE& Interface,
  300. KSPIN_MEDIUM& Medium
  301. ) PURE;
  302. STDMETHOD(KsGetCurrentCommunication)(
  303. THIS_
  304. KSPIN_COMMUNICATION *Communication,
  305. KSPIN_INTERFACE *Interface,
  306. KSPIN_MEDIUM *Medium
  307. ) PURE;
  308. STDMETHOD(KsPropagateAcquire)(
  309. THIS
  310. ) PURE;
  311. STDMETHOD(KsDeliver)(
  312. THIS_
  313. IMediaSample* Sample,
  314. ULONG Flags
  315. ) PURE;
  316. STDMETHOD(KsMediaSamplesCompleted)(
  317. THIS_
  318. PKSSTREAM_SEGMENT StreamSegment
  319. ) PURE;
  320. STDMETHOD_(IMemAllocator *, KsPeekAllocator)(
  321. THIS_
  322. KSPEEKOPERATION Operation
  323. ) PURE;
  324. STDMETHOD(KsReceiveAllocator)(
  325. THIS_
  326. IMemAllocator *MemAllocator
  327. ) PURE;
  328. STDMETHOD(KsRenegotiateAllocator)(
  329. THIS
  330. ) PURE;
  331. STDMETHOD_(LONG, KsIncrementPendingIoCount)(
  332. THIS
  333. ) PURE;
  334. STDMETHOD_(LONG, KsDecrementPendingIoCount)(
  335. THIS
  336. ) PURE;
  337. STDMETHOD(KsQualityNotify)(
  338. THIS_
  339. ULONG Proportion,
  340. REFERENCE_TIME TimeDelta
  341. ) PURE;
  342. };
  343. interface DECLSPEC_UUID("7bb38260-d19c-11d2-b38a-00a0c95ec22e") IKsPinEx;
  344. #undef INTERFACE
  345. #define INTERFACE IKsPinEx
  346. DECLARE_INTERFACE_(IKsPinEx, IKsPin)
  347. {
  348. STDMETHOD_(VOID, KsNotifyError)(
  349. THIS_
  350. IMediaSample* Sample,
  351. HRESULT hr
  352. ) PURE;
  353. };
  354. interface DECLSPEC_UUID("e539cd90-a8b4-11d1-8189-00a0c9062802") IKsPinPipe;
  355. #undef INTERFACE
  356. #define INTERFACE IKsPinPipe
  357. DECLARE_INTERFACE_(IKsPinPipe, IUnknown)
  358. {
  359. STDMETHOD(KsGetPinFramingCache)(
  360. THIS_
  361. PKSALLOCATOR_FRAMING_EX *FramingEx,
  362. PFRAMING_PROP FramingProp,
  363. FRAMING_CACHE_OPS Option
  364. ) PURE;
  365. STDMETHOD(KsSetPinFramingCache)(
  366. THIS_
  367. PKSALLOCATOR_FRAMING_EX FramingEx,
  368. PFRAMING_PROP FramingProp,
  369. FRAMING_CACHE_OPS Option
  370. ) PURE;
  371. STDMETHOD_(IPin*, KsGetConnectedPin)(
  372. THIS
  373. ) PURE;
  374. STDMETHOD_(IKsAllocatorEx*, KsGetPipe)(
  375. THIS_
  376. KSPEEKOPERATION Operation
  377. ) PURE;
  378. STDMETHOD(KsSetPipe)(
  379. THIS_
  380. IKsAllocatorEx *KsAllocator
  381. ) PURE;
  382. STDMETHOD_(ULONG, KsGetPipeAllocatorFlag)(
  383. THIS
  384. ) PURE;
  385. STDMETHOD(KsSetPipeAllocatorFlag)(
  386. THIS_
  387. ULONG Flag
  388. ) PURE;
  389. STDMETHOD_(GUID, KsGetPinBusCache)(
  390. THIS
  391. ) PURE;
  392. STDMETHOD(KsSetPinBusCache)(
  393. THIS_
  394. GUID Bus
  395. ) PURE;
  396. //
  397. // very useful methods for tracing.
  398. //
  399. STDMETHOD_(PWCHAR, KsGetPinName)(
  400. THIS
  401. ) PURE;
  402. STDMETHOD_(PWCHAR, KsGetFilterName)(
  403. THIS
  404. ) PURE;
  405. };
  406. interface DECLSPEC_UUID("CD5EBE6B-8B6E-11D1-8AE0-00A0C9223196") IKsPinFactory;
  407. #undef INTERFACE
  408. #define INTERFACE IKsPinFactory
  409. DECLARE_INTERFACE_(IKsPinFactory, IUnknown)
  410. {
  411. STDMETHOD(KsPinFactory)(
  412. THIS_
  413. ULONG* PinFactory
  414. ) PURE;
  415. };
  416. typedef enum {
  417. KsIoOperation_Write,
  418. KsIoOperation_Read
  419. } KSIOOPERATION;
  420. interface DECLSPEC_UUID("5ffbaa02-49a3-11d0-9f36-00aa00a216a1") IKsDataTypeHandler;
  421. #undef INTERFACE
  422. #define INTERFACE IKsDataTypeHandler
  423. DECLARE_INTERFACE_(IKsDataTypeHandler, IUnknown)
  424. {
  425. STDMETHOD(KsCompleteIoOperation)(
  426. THIS_
  427. IMediaSample *Sample,
  428. PVOID StreamHeader,
  429. KSIOOPERATION IoOperation,
  430. BOOL Cancelled
  431. ) PURE;
  432. STDMETHOD(KsIsMediaTypeInRanges)(
  433. THIS_
  434. PVOID DataRanges
  435. ) PURE;
  436. STDMETHOD(KsPrepareIoOperation)(
  437. THIS_
  438. IMediaSample *Sample,
  439. PVOID StreamHeader,
  440. KSIOOPERATION IoOperation
  441. ) PURE;
  442. STDMETHOD(KsQueryExtendedSize)(
  443. THIS_
  444. ULONG* ExtendedSize
  445. ) PURE;
  446. STDMETHOD(KsSetMediaType)(
  447. THIS_
  448. const AM_MEDIA_TYPE* AmMediaType
  449. ) PURE;
  450. };
  451. interface DECLSPEC_UUID("827D1A0E-0F73-11D2-B27A-00A0C9223196") IKsDataTypeCompletion;
  452. #undef INTERFACE
  453. #define INTERFACE IKsDataTypeCompletion
  454. DECLARE_INTERFACE_(IKsDataTypeCompletion, IUnknown)
  455. {
  456. STDMETHOD(KsCompleteMediaType)(
  457. THIS_
  458. HANDLE FilterHandle,
  459. ULONG PinFactoryId,
  460. AM_MEDIA_TYPE* AmMediaType
  461. ) PURE;
  462. };
  463. interface DECLSPEC_UUID("D3ABC7E0-9A61-11d0-A40D-00A0C9223196") IKsInterfaceHandler;
  464. #undef INTERFACE
  465. #define INTERFACE IKsInterfaceHandler
  466. DECLARE_INTERFACE_(IKsInterfaceHandler, IUnknown)
  467. {
  468. STDMETHOD(KsSetPin)(
  469. THIS_
  470. IKsPin *KsPin
  471. ) PURE;
  472. STDMETHOD(KsProcessMediaSamples)(
  473. THIS_
  474. IKsDataTypeHandler *KsDataTypeHandler,
  475. IMediaSample** SampleList,
  476. PLONG SampleCount,
  477. KSIOOPERATION IoOperation,
  478. PKSSTREAM_SEGMENT *StreamSegment
  479. ) PURE;
  480. STDMETHOD(KsCompleteIo)(
  481. THIS_
  482. PKSSTREAM_SEGMENT StreamSegment
  483. ) PURE;
  484. };
  485. //
  486. // This structure definition is the common header required by the proxy to
  487. // dispatch the stream segment to the interface handler. Interface handlers
  488. // will create extended structures to include other information such as
  489. // media samples, extended header size and so on.
  490. //
  491. typedef struct _KSSTREAM_SEGMENT {
  492. IKsInterfaceHandler *KsInterfaceHandler;
  493. IKsDataTypeHandler *KsDataTypeHandler;
  494. KSIOOPERATION IoOperation;
  495. HANDLE CompletionEvent;
  496. } KSSTREAM_SEGMENT;
  497. interface DECLSPEC_UUID("423c13a2-2070-11d0-9ef7-00aa00a216a1") IKsObject;
  498. #undef INTERFACE
  499. #define INTERFACE IKsObject
  500. DECLARE_INTERFACE_(IKsObject, IUnknown)
  501. {
  502. STDMETHOD_(HANDLE, KsGetObjectHandle)(
  503. THIS
  504. ) PURE;
  505. };
  506. interface DECLSPEC_UUID("97ebaacb-95bd-11d0-a3ea-00a0c9223196") IKsQualityForwarder;
  507. #undef INTERFACE
  508. #define INTERFACE IKsQualityForwarder
  509. DECLARE_INTERFACE_(IKsQualityForwarder, IKsObject)
  510. {
  511. STDMETHOD_(VOID, KsFlushClient)(
  512. THIS_
  513. IKsPin* Pin
  514. ) PURE;
  515. };
  516. KSDDKAPI
  517. HRESULT
  518. WINAPI
  519. KsResolveRequiredAttributes(
  520. PKSDATARANGE DataRange,
  521. PKSMULTIPLE_ITEM Attributes OPTIONAL
  522. );
  523. KSDDKAPI
  524. HRESULT
  525. WINAPI
  526. KsOpenDefaultDevice(
  527. REFGUID Category,
  528. ACCESS_MASK Access,
  529. PHANDLE DeviceHandle
  530. );
  531. KSDDKAPI
  532. HRESULT
  533. WINAPI
  534. KsSynchronousDeviceControl(
  535. HANDLE Handle,
  536. ULONG IoControl,
  537. PVOID InBuffer,
  538. ULONG InLength,
  539. PVOID OutBuffer,
  540. ULONG OutLength,
  541. PULONG BytesReturned
  542. );
  543. KSDDKAPI
  544. HRESULT
  545. WINAPI
  546. KsGetMultiplePinFactoryItems(
  547. HANDLE FilterHandle,
  548. ULONG PinFactoryId,
  549. ULONG PropertyId,
  550. PVOID* Items
  551. );
  552. KSDDKAPI
  553. HRESULT
  554. WINAPI
  555. KsGetMediaTypeCount(
  556. HANDLE FilterHandle,
  557. ULONG PinFactoryId,
  558. ULONG* MediaTypeCount
  559. );
  560. KSDDKAPI
  561. HRESULT
  562. WINAPI
  563. KsGetMediaType(
  564. int Position,
  565. AM_MEDIA_TYPE* AmMediaType,
  566. HANDLE FilterHandle,
  567. ULONG PinFactoryId
  568. );
  569. #endif // __STREAMS__
  570. #ifndef _IKsPropertySet_
  571. #if !defined(__cplusplus) || _MSC_VER < 1100
  572. DEFINE_GUIDEX(IID_IKsPropertySet);
  573. #endif // !defined(__cplusplus) || _MSC_VER < 1100
  574. #endif // _IKsPropertySet_
  575. #ifndef _IKsControl_
  576. #if !defined(__cplusplus) || _MSC_VER < 1100
  577. DEFINE_GUIDEX(IID_IKsControl);
  578. #endif // !defined(__cplusplus) || _MSC_VER < 1100
  579. #endif // _IKsControl_
  580. #if !defined(__cplusplus) || _MSC_VER < 1100
  581. DEFINE_GUIDEX(IID_IKsAggregateControl);
  582. #endif // !defined(__cplusplus) || _MSC_VER < 1100
  583. #ifndef _IKsTopology_
  584. #if !defined(__cplusplus) || _MSC_VER < 1100
  585. DEFINE_GUIDEX(IID_IKsTopology);
  586. #endif // !defined(__cplusplus) || _MSC_VER < 1100
  587. #endif // _IKsTopology_
  588. DEFINE_GUIDSTRUCT("17CCA71B-ECD7-11D0-B908-00A0C9223196", CLSID_Proxy);
  589. #define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy)
  590. #else // !_KS_
  591. #ifndef _IKsPropertySet_
  592. #if !defined(__cplusplus) || _MSC_VER < 1100
  593. DEFINE_GUID(IID_IKsPropertySet, STATIC_IID_IKsPropertySet);
  594. #endif // !defined(__cplusplus) || _MSC_VER < 1100
  595. #endif // _IKsPropertySet_
  596. #if !defined(__cplusplus) || _MSC_VER < 1100
  597. DEFINE_GUID(CLSID_Proxy, STATIC_CLSID_Proxy);
  598. #else // defined(__cplusplus) && _MSC_VER >= 1100
  599. DECLSPEC_UUID("17CCA71B-ECD7-11D0-B908-00A0C9223196") CLSID_Proxy;
  600. #endif // defined(__cplusplus) && _MSC_VER >= 1100
  601. #endif // !_KS_
  602. #ifndef _IKsPropertySet_
  603. #define _IKsPropertySet_
  604. #define KSPROPERTY_SUPPORT_GET 1
  605. #define KSPROPERTY_SUPPORT_SET 2
  606. #ifdef DECLARE_INTERFACE_
  607. interface DECLSPEC_UUID("31EFAC30-515C-11d0-A9AA-00aa0061be93") IKsPropertySet;
  608. #undef INTERFACE
  609. #define INTERFACE IKsPropertySet
  610. DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
  611. {
  612. STDMETHOD(Set)(
  613. THIS_
  614. IN REFGUID PropSet,
  615. IN ULONG Id,
  616. IN LPVOID InstanceData,
  617. IN ULONG InstanceLength,
  618. IN LPVOID PropertyData,
  619. IN ULONG DataLength
  620. ) PURE;
  621. STDMETHOD(Get)(
  622. THIS_
  623. IN REFGUID PropSet,
  624. IN ULONG Id,
  625. IN LPVOID InstanceData,
  626. IN ULONG InstanceLength,
  627. OUT LPVOID PropertyData,
  628. IN ULONG DataLength,
  629. OUT ULONG* BytesReturned
  630. ) PURE;
  631. STDMETHOD(QuerySupported)(
  632. THIS_
  633. IN REFGUID PropSet,
  634. IN ULONG Id,
  635. OUT ULONG* TypeSupport
  636. ) PURE;
  637. };
  638. #endif // DECLARE_INTERFACE_
  639. #endif // _IKsPropertySet_
  640. #ifndef _IKsControl_
  641. #define _IKsControl_
  642. #ifdef DECLARE_INTERFACE_
  643. interface DECLSPEC_UUID("28F54685-06FD-11D2-B27A-00A0C9223196") IKsControl;
  644. #undef INTERFACE
  645. #define INTERFACE IKsControl
  646. DECLARE_INTERFACE_(IKsControl, IUnknown)
  647. {
  648. STDMETHOD(KsProperty)(
  649. THIS_
  650. IN PKSPROPERTY Property,
  651. IN ULONG PropertyLength,
  652. IN OUT LPVOID PropertyData,
  653. IN ULONG DataLength,
  654. OUT ULONG* BytesReturned
  655. ) PURE;
  656. STDMETHOD(KsMethod)(
  657. THIS_
  658. IN PKSMETHOD Method,
  659. IN ULONG MethodLength,
  660. IN OUT LPVOID MethodData,
  661. IN ULONG DataLength,
  662. OUT ULONG* BytesReturned
  663. ) PURE;
  664. STDMETHOD(KsEvent)(
  665. THIS_
  666. IN PKSEVENT Event OPTIONAL,
  667. IN ULONG EventLength,
  668. IN OUT LPVOID EventData,
  669. IN ULONG DataLength,
  670. OUT ULONG* BytesReturned
  671. ) PURE;
  672. };
  673. #endif // DECLARE_INTERFACE_
  674. #endif // _IKsControl_
  675. #ifdef DECLARE_INTERFACE_
  676. interface DECLSPEC_UUID("7F40EAC0-3947-11D2-874E-00A0C9223196") IKsAggregateControl;
  677. #undef INTERFACE
  678. #define INTERFACE IKsAggregateControl
  679. DECLARE_INTERFACE_(IKsAggregateControl, IUnknown)
  680. {
  681. STDMETHOD(KsAddAggregate)(
  682. THIS_
  683. IN REFGUID AggregateClass
  684. ) PURE;
  685. STDMETHOD(KsRemoveAggregate)(
  686. THIS_
  687. IN REFGUID AggregateClass
  688. ) PURE;
  689. };
  690. #endif // DECLARE_INTERFACE_
  691. #ifndef _IKsTopology_
  692. #define _IKsTopology_
  693. #ifdef DECLARE_INTERFACE_
  694. interface DECLSPEC_UUID("28F54683-06FD-11D2-B27A-00A0C9223196") IKsTopology;
  695. #undef INTERFACE
  696. #define INTERFACE IKsTopology
  697. DECLARE_INTERFACE_(IKsTopology, IUnknown)
  698. {
  699. STDMETHOD(CreateNodeInstance)(
  700. THIS_
  701. IN ULONG NodeId,
  702. IN ULONG Flags,
  703. IN ACCESS_MASK DesiredAccess,
  704. IN IUnknown* UnkOuter OPTIONAL,
  705. IN REFGUID InterfaceId,
  706. OUT LPVOID* Interface
  707. ) PURE;
  708. };
  709. #endif // DECLARE_INTERFACE_
  710. #endif // _IKsTopology_
  711. #ifdef __cplusplus
  712. }
  713. #endif // __cplusplus
  714. #endif // __KSPROXY__