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