17 #define KSDDKAPI DECLSPEC_IMPORT
20 #define STATIC_IID_IKsObject \
21 0x423c13a2L,0x2070,0x11d0,0x9e,0xf7,0x00,0xaa,0x00,0xa2,0x16,0xa1
23 #define STATIC_IID_IKsPinEx \
24 0x7bb38260L,0xd19c,0x11d2,0xb3,0x8a,0x00,0xa0,0xc9,0x5e,0xc2,0x2e
26 #define STATIC_IID_IKsPin \
27 0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1
29 #define STATIC_IID_IKsPinPipe \
30 0xe539cd90L,0xa8b4,0x11d1,0x81,0x89,0x00,0xa0,0xc9,0x06,0x28,0x02
32 #define STATIC_IID_IKsDataTypeHandler \
33 0x5ffbaa02L,0x49a3,0x11d0,0x9f,0x36,0x00,0xaa,0x00,0xa2,0x16,0xa1
35 #define STATIC_IID_IKsDataTypeCompletion \
36 0x827D1A0EL,0x0F73,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
38 #define STATIC_IID_IKsInterfaceHandler \
39 0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96
41 #define STATIC_IID_IKsClockPropertySet \
42 0x5C5CBD84L,0xE755,0x11D0,0xAC,0x18,0x00,0xA0,0xC9,0x22,0x31,0x96
44 #define STATIC_IID_IKsAllocator \
45 0x8da64899L,0xc0d9,0x11d0,0x84,0x13,0x00,0x00,0xf8,0x22,0xfe,0x8a
47 #define STATIC_IID_IKsAllocatorEx \
48 0x091bb63aL,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02
50 #ifndef STATIC_IID_IKsPropertySet
51 #define STATIC_IID_IKsPropertySet \
52 0x31EFAC30L,0x515C,0x11d0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93
55 #define STATIC_IID_IKsTopology \
56 0x28F54683L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
58 #ifndef STATIC_IID_IKsControl
59 #define STATIC_IID_IKsControl \
60 0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
63 #define STATIC_IID_IKsAggregateControl \
64 0x7F40EAC0L,0x3947,0x11D2,0x87,0x4E,0x00,0xA0,0xC9,0x22,0x31,0x96
66 #define STATIC_CLSID_Proxy \
67 0x17CCA71BL,0xECD7,0x11D0,0xB9,0x08,0x00,0xA0,0xC9,0x22,0x31,0x96
91 #define IID_IKsQualityForwarder KSCATEGORY_QUALITY
92 #define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY
96 KsAllocatorMode_Kernel
100 FramingProp_Uninitialized,
106 typedef FRAMING_PROP *PFRAMING_PROP;
109 Framing_Cache_Update,
110 Framing_Cache_ReadLast,
111 Framing_Cache_ReadOrig,
116 LONGLONG MinTotalNominator;
117 LONGLONG MaxTotalNominator;
118 LONGLONG TotalDenominator;
119 } OPTIMAL_WEIGHT_TOTALS;
121 typedef struct IPin IPin;
122 typedef struct IKsPin IKsPin;
123 typedef struct IKsAllocator IKsAllocator;
124 typedef struct IKsAllocatorEx IKsAllocatorEx;
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
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
142 #define PipeFactor_Buffers 0x00000100
143 #define PipeFactor_Align 0x00000200
144 #define PipeFactor_PhysicalEnd 0x00000400
145 #define PipeFactor_LogicalEnd 0x00000800
149 PipeState_RangeNotFixed,
150 PipeState_RangeFixed,
151 PipeState_CompressionUnknown,
155 typedef struct _PIPE_DIMENSIONS {
159 } PIPE_DIMENSIONS,*PPIPE_DIMENSIONS;
163 Pipe_Allocator_FirstPin,
164 Pipe_Allocator_LastPin,
165 Pipe_Allocator_MiddlePin
166 } PIPE_ALLOCATOR_PLACE;
168 typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE;
171 KS_MemoryTypeDontCare = 0,
172 KS_MemoryTypeKernelPaged,
173 KS_MemoryTypeKernelNonPaged,
174 KS_MemoryTypeDeviceHostMapped,
175 KS_MemoryTypeDeviceSpecific,
178 } KS_LogicalMemoryType;
180 typedef KS_LogicalMemoryType *PKS_LogicalMemoryType;
182 typedef struct _PIPE_TERMINATION {
184 ULONG OutsideFactors;
191 typedef struct _ALLOCATOR_PROPERTIES_EX
201 PIPE_TERMINATION Input;
202 PIPE_TERMINATION Output;
206 KS_LogicalMemoryType LogicalMemoryType;
207 PIPE_ALLOCATOR_PLACE AllocatorPlace;
208 PIPE_DIMENSIONS Dimensions;
210 IKsAllocatorEx *PrevSegment;
211 ULONG CountNextSegments;
212 IKsAllocatorEx **NextSegments;
215 } ALLOCATOR_PROPERTIES_EX;
217 typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX;
221 struct IKsClockPropertySet;
223 #define INTERFACE IKsClockPropertySet
224 DECLARE_INTERFACE_(IKsClockPropertySet,IUnknown)
226 STDMETHOD(KsGetTime) (THIS_
229 STDMETHOD(KsSetTime) (THIS_
232 STDMETHOD(KsGetPhysicalTime) (THIS_
235 STDMETHOD(KsSetPhysicalTime) (THIS_
238 STDMETHOD(KsGetCorrelatedTime) (THIS_
241 STDMETHOD(KsSetCorrelatedTime) (THIS_
244 STDMETHOD(KsGetCorrelatedPhysicalTime)(THIS_
247 STDMETHOD(KsSetCorrelatedPhysicalTime)(THIS_
250 STDMETHOD(KsGetResolution) (THIS_
253 STDMETHOD(KsGetState) (THIS_
260 #define INTERFACE IKsAllocator
261 DECLARE_INTERFACE_(IKsAllocator,IUnknown)
263 STDMETHOD_(
HANDLE,KsGetAllocatorHandle)(THIS) PURE;
264 STDMETHOD_(KSALLOCATORMODE,KsGetAllocatorMode)(THIS) PURE;
265 STDMETHOD(KsGetAllocatorStatus) (THIS_
268 STDMETHOD_(VOID,KsSetAllocatorMode) (THIS_
273 struct IKsAllocatorEx;
275 #define INTERFACE IKsAllocatorEx
276 DECLARE_INTERFACE_(IKsAllocatorEx,IKsAllocator)
278 STDMETHOD_(PALLOCATOR_PROPERTIES_EX,KsGetProperties)(THIS) PURE;
279 STDMETHOD_(VOID,KsSetProperties) (THIS_
280 PALLOCATOR_PROPERTIES_EX
282 STDMETHOD_(VOID,KsSetAllocatorHandle) (THIS_
285 STDMETHOD_(
HANDLE,KsCreateAllocatorAndGetHandle)(THIS_
291 KsPeekOperation_PeekOnly,
292 KsPeekOperation_AddRef
295 typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT;
299 #define INTERFACE IKsPin
300 DECLARE_INTERFACE_(IKsPin,IUnknown)
302 STDMETHOD(KsQueryMediums) (THIS_
305 STDMETHOD(KsQueryInterfaces) (THIS_
308 STDMETHOD(KsCreateSinkPinHandle) (THIS_
312 STDMETHOD(KsGetCurrentCommunication) (THIS_
317 STDMETHOD(KsPropagateAcquire) (THIS) PURE;
318 STDMETHOD(KsDeliver) (THIS_
319 IMediaSample *Sample,
322 STDMETHOD(KsMediaSamplesCompleted) (THIS_
323 PKSSTREAM_SEGMENT StreamSegment
325 STDMETHOD_(IMemAllocator *,KsPeekAllocator)(THIS_
326 KSPEEKOPERATION Operation
328 STDMETHOD(KsReceiveAllocator) (THIS_
329 IMemAllocator *MemAllocator
331 STDMETHOD(KsRenegotiateAllocator) (THIS) PURE;
332 STDMETHOD_(LONG,KsIncrementPendingIoCount)(THIS) PURE;
333 STDMETHOD_(LONG,KsDecrementPendingIoCount)(THIS) PURE;
334 STDMETHOD(KsQualityNotify) (THIS_
342 #define INTERFACE IKsPinEx
343 DECLARE_INTERFACE_(IKsPinEx,IKsPin)
345 STDMETHOD_(VOID,KsNotifyError) (THIS_
346 IMediaSample *Sample,
353 #define INTERFACE IKsPinPipe
354 DECLARE_INTERFACE_(IKsPinPipe,IUnknown)
356 STDMETHOD(KsGetPinFramingCache) (THIS_
358 PFRAMING_PROP FramingProp,
359 FRAMING_CACHE_OPS Option
361 STDMETHOD(KsSetPinFramingCache) (THIS_
363 PFRAMING_PROP FramingProp,
364 FRAMING_CACHE_OPS Option
366 STDMETHOD_(IPin*,KsGetConnectedPin) (THIS) PURE;
367 STDMETHOD_(IKsAllocatorEx*,KsGetPipe) (THIS_
368 KSPEEKOPERATION Operation
370 STDMETHOD(KsSetPipe) (THIS_
371 IKsAllocatorEx *KsAllocator
373 STDMETHOD_(ULONG,KsGetPipeAllocatorFlag)(THIS) PURE;
374 STDMETHOD(KsSetPipeAllocatorFlag) (THIS_
377 STDMETHOD_(GUID,KsGetPinBusCache) (THIS) PURE;
378 STDMETHOD(KsSetPinBusCache) (THIS_
381 STDMETHOD_(PWCHAR,KsGetPinName) (THIS) PURE;
382 STDMETHOD_(PWCHAR,KsGetFilterName) (THIS) PURE;
385 struct IKsPinFactory;
387 #define INTERFACE IKsPinFactory
388 DECLARE_INTERFACE_(IKsPinFactory,IUnknown)
390 STDMETHOD(KsPinFactory) (THIS_
400 struct IKsDataTypeHandler;
402 #define INTERFACE IKsDataTypeHandler
403 DECLARE_INTERFACE_(IKsDataTypeHandler,IUnknown)
405 STDMETHOD(KsCompleteIoOperation) (THIS_
406 IMediaSample *Sample,
408 KSIOOPERATION IoOperation,
411 STDMETHOD(KsIsMediaTypeInRanges) (THIS_
414 STDMETHOD(KsPrepareIoOperation) (THIS_
415 IMediaSample *Sample,
417 KSIOOPERATION IoOperation
419 STDMETHOD(KsQueryExtendedSize) (THIS_
422 STDMETHOD(KsSetMediaType) (THIS_
423 const AM_MEDIA_TYPE *AmMediaType
427 struct IKsDataTypeCompletion;
429 #define INTERFACE IKsDataTypeCompletion
430 DECLARE_INTERFACE_(IKsDataTypeCompletion,IUnknown)
432 STDMETHOD(KsCompleteMediaType) (THIS_
435 AM_MEDIA_TYPE *AmMediaType
439 struct IKsInterfaceHandler;
441 #define INTERFACE IKsInterfaceHandler
442 DECLARE_INTERFACE_(IKsInterfaceHandler,IUnknown)
444 STDMETHOD(KsSetPin) (THIS_
447 STDMETHOD(KsProcessMediaSamples) (THIS_
448 IKsDataTypeHandler *KsDataTypeHandler,
449 IMediaSample **SampleList,
451 KSIOOPERATION IoOperation,
452 PKSSTREAM_SEGMENT *StreamSegment
454 STDMETHOD(KsCompleteIo) (THIS_
455 PKSSTREAM_SEGMENT StreamSegment
459 typedef struct _KSSTREAM_SEGMENT {
460 IKsInterfaceHandler *KsInterfaceHandler;
461 IKsDataTypeHandler *KsDataTypeHandler;
462 KSIOOPERATION IoOperation;
468 #define INTERFACE IKsObject
469 DECLARE_INTERFACE_(IKsObject,IUnknown)
471 STDMETHOD_(
HANDLE,KsGetObjectHandle) (THIS) PURE;
474 struct IKsQualityForwarder;
476 #define INTERFACE IKsQualityForwarder
477 DECLARE_INTERFACE_(IKsQualityForwarder,IKsObject)
479 STDMETHOD_(VOID,KsFlushClient) (THIS_
484 struct IKsNotifyEvent;
486 #define INTERFACE IKsNotifyEvent
487 DECLARE_INTERFACE_(IKsNotifyEvent,IUnknown)
489 STDMETHOD(KsNotifyEvent) (THIS_
497 KSDDKAPI HRESULT WINAPI KsOpenDefaultDevice(REFGUID Category,ACCESS_MASK Access,PHANDLE DeviceHandle);
498 KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(
HANDLE Handle,ULONG IoControl,PVOID InBuffer,ULONG InLength,PVOID OutBuffer,ULONG OutLength,PULONG BytesReturned);
499 KSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(
HANDLE FilterHandle,ULONG PinFactoryId,ULONG PropertyId,PVOID *Items);
500 KSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(
HANDLE FilterHandle,ULONG PinFactoryId,ULONG *MediaTypeCount);
501 KSDDKAPI HRESULT WINAPI KsGetMediaType(
int Position,AM_MEDIA_TYPE *AmMediaType,
HANDLE FilterHandle,ULONG PinFactoryId);
504 #ifndef _IKsPropertySet_
513 #ifndef _IKsTopology_
517 #define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy)
521 #ifndef _IKsPropertySet_
529 #ifndef _IKsPropertySet_
530 #define _IKsPropertySet_
531 #define KSPROPERTY_SUPPORT_GET 1
532 #define KSPROPERTY_SUPPORT_SET 2
534 #ifdef DECLARE_INTERFACE_
535 struct IKsPropertySet;
537 #define INTERFACE IKsPropertySet
538 DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
540 STDMETHOD(Set) (THIS_
544 ULONG InstanceLength,
548 STDMETHOD(Get) (THIS_
552 ULONG InstanceLength,
557 STDMETHOD(QuerySupported) (THIS_
568 #ifdef DECLARE_INTERFACE_
571 #define INTERFACE IKsControl
574 STDMETHOD(KsProperty) (THIS_
576 ULONG PropertyLength,
581 STDMETHOD(KsMethod) (THIS_
588 STDMETHOD(KsEvent) (THIS_
599 #ifdef DECLARE_INTERFACE_
600 struct IKsAggregateControl;
602 #define INTERFACE IKsAggregateControl
603 DECLARE_INTERFACE_(IKsAggregateControl,IUnknown)
605 STDMETHOD(KsAddAggregate) (THIS_
606 REFGUID AggregateClass
608 STDMETHOD(KsRemoveAggregate) (THIS_
609 REFGUID AggregateClass
614 #ifndef _IKsTopology_
615 #define _IKsTopology_
616 #ifdef DECLARE_INTERFACE_
619 #define INTERFACE IKsTopology
620 DECLARE_INTERFACE_(IKsTopology,IUnknown)
622 STDMETHOD(CreateNodeInstance) (THIS_
625 ACCESS_MASK DesiredAccess,