Spaces:
Runtime error
Runtime error
/** | |
* This file has no copyright assigned and is placed in the Public Domain. | |
* This file is part of the w64 mingw-runtime package. | |
* No warranty is given; refer to the file DISCLAIMER.PD within this package. | |
*/ | |
extern "C" { | |
DEFINE_GUIDEX(IID_IKsObject); | |
DEFINE_GUIDEX(IID_IKsPin); | |
DEFINE_GUIDEX(IID_IKsPinEx); | |
DEFINE_GUIDEX(IID_IKsPinPipe); | |
DEFINE_GUIDEX(IID_IKsDataTypeHandler); | |
DEFINE_GUIDEX(IID_IKsDataTypeCompletion); | |
DEFINE_GUIDEX(IID_IKsInterfaceHandler); | |
DEFINE_GUIDEX(IID_IKsClockPropertySet); | |
DEFINE_GUIDEX(IID_IKsAllocator); | |
DEFINE_GUIDEX(IID_IKsAllocatorEx); | |
typedef enum { | |
KsAllocatorMode_User, | |
KsAllocatorMode_Kernel | |
} KSALLOCATORMODE; | |
typedef enum { | |
FramingProp_Uninitialized, | |
FramingProp_None, | |
FramingProp_Old, | |
FramingProp_Ex | |
} FRAMING_PROP; | |
typedef FRAMING_PROP *PFRAMING_PROP; | |
typedef enum { | |
Framing_Cache_Update, | |
Framing_Cache_ReadLast, | |
Framing_Cache_ReadOrig, | |
Framing_Cache_Write | |
} FRAMING_CACHE_OPS; | |
typedef struct { | |
LONGLONG MinTotalNominator; | |
LONGLONG MaxTotalNominator; | |
LONGLONG TotalDenominator; | |
} OPTIMAL_WEIGHT_TOTALS; | |
typedef struct IPin IPin; | |
typedef struct IKsPin IKsPin; | |
typedef struct IKsAllocator IKsAllocator; | |
typedef struct IKsAllocatorEx IKsAllocatorEx; | |
typedef enum { | |
PipeState_DontCare, | |
PipeState_RangeNotFixed, | |
PipeState_RangeFixed, | |
PipeState_CompressionUnknown, | |
PipeState_Finalized | |
} PIPE_STATE; | |
typedef struct _PIPE_DIMENSIONS { | |
KS_COMPRESSION AllocatorPin; | |
KS_COMPRESSION MaxExpansionPin; | |
KS_COMPRESSION EndPin; | |
} PIPE_DIMENSIONS,*PPIPE_DIMENSIONS; | |
typedef enum { | |
Pipe_Allocator_None, | |
Pipe_Allocator_FirstPin, | |
Pipe_Allocator_LastPin, | |
Pipe_Allocator_MiddlePin | |
} PIPE_ALLOCATOR_PLACE; | |
typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE; | |
typedef enum { | |
KS_MemoryTypeDontCare = 0, | |
KS_MemoryTypeKernelPaged, | |
KS_MemoryTypeKernelNonPaged, | |
KS_MemoryTypeDeviceHostMapped, | |
KS_MemoryTypeDeviceSpecific, | |
KS_MemoryTypeUser, | |
KS_MemoryTypeAnyHost | |
} KS_LogicalMemoryType; | |
typedef KS_LogicalMemoryType *PKS_LogicalMemoryType; | |
typedef struct _PIPE_TERMINATION { | |
ULONG Flags; | |
ULONG OutsideFactors; | |
ULONG Weigth; | |
KS_FRAMING_RANGE PhysicalRange; | |
KS_FRAMING_RANGE_WEIGHTED OptimalRange; | |
KS_COMPRESSION Compression; | |
} PIPE_TERMINATION; | |
typedef struct _ALLOCATOR_PROPERTIES_EX | |
{ | |
long cBuffers; | |
long cbBuffer; | |
long cbAlign; | |
long cbPrefix; | |
GUID MemoryType; | |
GUID BusType; | |
PIPE_STATE State; | |
PIPE_TERMINATION Input; | |
PIPE_TERMINATION Output; | |
ULONG Strategy; | |
ULONG Flags; | |
ULONG Weight; | |
KS_LogicalMemoryType LogicalMemoryType; | |
PIPE_ALLOCATOR_PLACE AllocatorPlace; | |
PIPE_DIMENSIONS Dimensions; | |
KS_FRAMING_RANGE PhysicalRange; | |
IKsAllocatorEx *PrevSegment; | |
ULONG CountNextSegments; | |
IKsAllocatorEx **NextSegments; | |
ULONG InsideFactors; | |
ULONG NumberPins; | |
} ALLOCATOR_PROPERTIES_EX; | |
typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX; | |
struct IKsClockPropertySet; | |
DECLARE_INTERFACE_(IKsClockPropertySet,IUnknown) | |
{ | |
STDMETHOD(KsGetTime) (THIS_ | |
LONGLONG *Time | |
) PURE; | |
STDMETHOD(KsSetTime) (THIS_ | |
LONGLONG Time | |
) PURE; | |
STDMETHOD(KsGetPhysicalTime) (THIS_ | |
LONGLONG *Time | |
) PURE; | |
STDMETHOD(KsSetPhysicalTime) (THIS_ | |
LONGLONG Time | |
) PURE; | |
STDMETHOD(KsGetCorrelatedTime) (THIS_ | |
KSCORRELATED_TIME *CorrelatedTime | |
) PURE; | |
STDMETHOD(KsSetCorrelatedTime) (THIS_ | |
KSCORRELATED_TIME *CorrelatedTime | |
) PURE; | |
STDMETHOD(KsGetCorrelatedPhysicalTime)(THIS_ | |
KSCORRELATED_TIME *CorrelatedTime | |
) PURE; | |
STDMETHOD(KsSetCorrelatedPhysicalTime)(THIS_ | |
KSCORRELATED_TIME *CorrelatedTime | |
) PURE; | |
STDMETHOD(KsGetResolution) (THIS_ | |
KSRESOLUTION *Resolution | |
) PURE; | |
STDMETHOD(KsGetState) (THIS_ | |
KSSTATE *State | |
) PURE; | |
}; | |
struct IKsAllocator; | |
DECLARE_INTERFACE_(IKsAllocator,IUnknown) | |
{ | |
STDMETHOD_(HANDLE,KsGetAllocatorHandle)(THIS) PURE; | |
STDMETHOD_(KSALLOCATORMODE,KsGetAllocatorMode)(THIS) PURE; | |
STDMETHOD(KsGetAllocatorStatus) (THIS_ | |
PKSSTREAMALLOCATOR_STATUS AllocatorStatus | |
) PURE; | |
STDMETHOD_(VOID,KsSetAllocatorMode) (THIS_ | |
KSALLOCATORMODE Mode | |
) PURE; | |
}; | |
struct IKsAllocatorEx; | |
DECLARE_INTERFACE_(IKsAllocatorEx,IKsAllocator) | |
{ | |
STDMETHOD_(PALLOCATOR_PROPERTIES_EX,KsGetProperties)(THIS) PURE; | |
STDMETHOD_(VOID,KsSetProperties) (THIS_ | |
PALLOCATOR_PROPERTIES_EX | |
) PURE; | |
STDMETHOD_(VOID,KsSetAllocatorHandle) (THIS_ | |
HANDLE AllocatorHandle | |
) PURE; | |
STDMETHOD_(HANDLE,KsCreateAllocatorAndGetHandle)(THIS_ | |
IKsPin *KsPin | |
) PURE; | |
}; | |
typedef enum { | |
KsPeekOperation_PeekOnly, | |
KsPeekOperation_AddRef | |
} KSPEEKOPERATION; | |
typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT; | |
struct IKsPin; | |
DECLARE_INTERFACE_(IKsPin,IUnknown) | |
{ | |
STDMETHOD(KsQueryMediums) (THIS_ | |
PKSMULTIPLE_ITEM *MediumList | |
) PURE; | |
STDMETHOD(KsQueryInterfaces) (THIS_ | |
PKSMULTIPLE_ITEM *InterfaceList | |
) PURE; | |
STDMETHOD(KsCreateSinkPinHandle) (THIS_ | |
KSPIN_INTERFACE& Interface, | |
KSPIN_MEDIUM& Medium | |
) PURE; | |
STDMETHOD(KsGetCurrentCommunication) (THIS_ | |
KSPIN_COMMUNICATION *Communication, | |
KSPIN_INTERFACE *Interface, | |
KSPIN_MEDIUM *Medium | |
) PURE; | |
STDMETHOD(KsPropagateAcquire) (THIS) PURE; | |
STDMETHOD(KsDeliver) (THIS_ | |
IMediaSample *Sample, | |
ULONG Flags | |
) PURE; | |
STDMETHOD(KsMediaSamplesCompleted) (THIS_ | |
PKSSTREAM_SEGMENT StreamSegment | |
) PURE; | |
STDMETHOD_(IMemAllocator *,KsPeekAllocator)(THIS_ | |
KSPEEKOPERATION Operation | |
) PURE; | |
STDMETHOD(KsReceiveAllocator) (THIS_ | |
IMemAllocator *MemAllocator | |
) PURE; | |
STDMETHOD(KsRenegotiateAllocator) (THIS) PURE; | |
STDMETHOD_(LONG,KsIncrementPendingIoCount)(THIS) PURE; | |
STDMETHOD_(LONG,KsDecrementPendingIoCount)(THIS) PURE; | |
STDMETHOD(KsQualityNotify) (THIS_ | |
ULONG Proportion, | |
REFERENCE_TIME TimeDelta | |
) PURE; | |
}; | |
struct IKsPinEx; | |
DECLARE_INTERFACE_(IKsPinEx,IKsPin) | |
{ | |
STDMETHOD_(VOID,KsNotifyError) (THIS_ | |
IMediaSample *Sample, | |
HRESULT hr | |
) PURE; | |
}; | |
struct IKsPinPipe; | |
DECLARE_INTERFACE_(IKsPinPipe,IUnknown) | |
{ | |
STDMETHOD(KsGetPinFramingCache) (THIS_ | |
PKSALLOCATOR_FRAMING_EX *FramingEx, | |
PFRAMING_PROP FramingProp, | |
FRAMING_CACHE_OPS Option | |
) PURE; | |
STDMETHOD(KsSetPinFramingCache) (THIS_ | |
PKSALLOCATOR_FRAMING_EX FramingEx, | |
PFRAMING_PROP FramingProp, | |
FRAMING_CACHE_OPS Option | |
) PURE; | |
STDMETHOD_(IPin*,KsGetConnectedPin) (THIS) PURE; | |
STDMETHOD_(IKsAllocatorEx*,KsGetPipe) (THIS_ | |
KSPEEKOPERATION Operation | |
) PURE; | |
STDMETHOD(KsSetPipe) (THIS_ | |
IKsAllocatorEx *KsAllocator | |
) PURE; | |
STDMETHOD_(ULONG,KsGetPipeAllocatorFlag)(THIS) PURE; | |
STDMETHOD(KsSetPipeAllocatorFlag) (THIS_ | |
ULONG Flag | |
) PURE; | |
STDMETHOD_(GUID,KsGetPinBusCache) (THIS) PURE; | |
STDMETHOD(KsSetPinBusCache) (THIS_ | |
GUID Bus | |
) PURE; | |
STDMETHOD_(PWCHAR,KsGetPinName) (THIS) PURE; | |
STDMETHOD_(PWCHAR,KsGetFilterName) (THIS) PURE; | |
}; | |
struct IKsPinFactory; | |
DECLARE_INTERFACE_(IKsPinFactory,IUnknown) | |
{ | |
STDMETHOD(KsPinFactory) (THIS_ | |
ULONG *PinFactory | |
) PURE; | |
}; | |
typedef enum { | |
KsIoOperation_Write, | |
KsIoOperation_Read | |
} KSIOOPERATION; | |
struct IKsDataTypeHandler; | |
DECLARE_INTERFACE_(IKsDataTypeHandler,IUnknown) | |
{ | |
STDMETHOD(KsCompleteIoOperation) (THIS_ | |
IMediaSample *Sample, | |
PVOID StreamHeader, | |
KSIOOPERATION IoOperation, | |
WINBOOL Cancelled | |
) PURE; | |
STDMETHOD(KsIsMediaTypeInRanges) (THIS_ | |
PVOID DataRanges | |
) PURE; | |
STDMETHOD(KsPrepareIoOperation) (THIS_ | |
IMediaSample *Sample, | |
PVOID StreamHeader, | |
KSIOOPERATION IoOperation | |
) PURE; | |
STDMETHOD(KsQueryExtendedSize) (THIS_ | |
ULONG *ExtendedSize | |
) PURE; | |
STDMETHOD(KsSetMediaType) (THIS_ | |
const AM_MEDIA_TYPE *AmMediaType | |
) PURE; | |
}; | |
struct IKsDataTypeCompletion; | |
DECLARE_INTERFACE_(IKsDataTypeCompletion,IUnknown) | |
{ | |
STDMETHOD(KsCompleteMediaType) (THIS_ | |
HANDLE FilterHandle, | |
ULONG PinFactoryId, | |
AM_MEDIA_TYPE *AmMediaType | |
) PURE; | |
}; | |
struct IKsInterfaceHandler; | |
DECLARE_INTERFACE_(IKsInterfaceHandler,IUnknown) | |
{ | |
STDMETHOD(KsSetPin) (THIS_ | |
IKsPin *KsPin | |
) PURE; | |
STDMETHOD(KsProcessMediaSamples) (THIS_ | |
IKsDataTypeHandler *KsDataTypeHandler, | |
IMediaSample **SampleList, | |
PLONG SampleCount, | |
KSIOOPERATION IoOperation, | |
PKSSTREAM_SEGMENT *StreamSegment | |
) PURE; | |
STDMETHOD(KsCompleteIo) (THIS_ | |
PKSSTREAM_SEGMENT StreamSegment | |
) PURE; | |
}; | |
typedef struct _KSSTREAM_SEGMENT { | |
IKsInterfaceHandler *KsInterfaceHandler; | |
IKsDataTypeHandler *KsDataTypeHandler; | |
KSIOOPERATION IoOperation; | |
HANDLE CompletionEvent; | |
} KSSTREAM_SEGMENT; | |
struct IKsObject; | |
DECLARE_INTERFACE_(IKsObject,IUnknown) | |
{ | |
STDMETHOD_(HANDLE,KsGetObjectHandle) (THIS) PURE; | |
}; | |
struct IKsQualityForwarder; | |
DECLARE_INTERFACE_(IKsQualityForwarder,IKsObject) | |
{ | |
STDMETHOD_(VOID,KsFlushClient) (THIS_ | |
IKsPin *Pin | |
) PURE; | |
}; | |
struct IKsNotifyEvent; | |
DECLARE_INTERFACE_(IKsNotifyEvent,IUnknown) | |
{ | |
STDMETHOD(KsNotifyEvent) (THIS_ | |
ULONG Event, | |
ULONG_PTR lParam1, | |
ULONG_PTR lParam2 | |
) PURE; | |
}; | |
KSDDKAPI HRESULT WINAPI KsResolveRequiredAttributes(PKSDATARANGE DataRange,PKSMULTIPLE_ITEM Attributes); | |
KSDDKAPI HRESULT WINAPI KsOpenDefaultDevice(REFGUID Category,ACCESS_MASK Access,PHANDLE DeviceHandle); | |
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle,ULONG IoControl,PVOID InBuffer,ULONG InLength,PVOID OutBuffer,ULONG OutLength,PULONG BytesReturned); | |
KSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(HANDLE FilterHandle,ULONG PinFactoryId,ULONG PropertyId,PVOID *Items); | |
KSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(HANDLE FilterHandle,ULONG PinFactoryId,ULONG *MediaTypeCount); | |
KSDDKAPI HRESULT WINAPI KsGetMediaType(int Position,AM_MEDIA_TYPE *AmMediaType,HANDLE FilterHandle,ULONG PinFactoryId); | |
DEFINE_GUIDEX(IID_IKsPropertySet); | |
DEFINE_GUIDEX(IID_IKsControl); | |
DEFINE_GUIDEX(IID_IKsAggregateControl); | |
DEFINE_GUIDEX(IID_IKsTopology); | |
DEFINE_GUIDSTRUCT("17CCA71B-ECD7-11D0-B908-00A0C9223196",CLSID_Proxy); | |
DEFINE_GUID(IID_IKsPropertySet,STATIC_IID_IKsPropertySet); | |
DEFINE_GUID(CLSID_Proxy,STATIC_CLSID_Proxy); | |
struct IKsPropertySet; | |
DECLARE_INTERFACE_(IKsPropertySet,IUnknown) | |
{ | |
STDMETHOD(Set) (THIS_ | |
REFGUID PropSet, | |
ULONG Id, | |
LPVOID InstanceData, | |
ULONG InstanceLength, | |
LPVOID PropertyData, | |
ULONG DataLength | |
) PURE; | |
STDMETHOD(Get) (THIS_ | |
REFGUID PropSet, | |
ULONG Id, | |
LPVOID InstanceData, | |
ULONG InstanceLength, | |
LPVOID PropertyData, | |
ULONG DataLength, | |
ULONG *BytesReturned | |
) PURE; | |
STDMETHOD(QuerySupported) (THIS_ | |
REFGUID PropSet, | |
ULONG Id, | |
ULONG *TypeSupport | |
) PURE; | |
}; | |
struct IKsControl; | |
DECLARE_INTERFACE_(IKsControl,IUnknown) | |
{ | |
STDMETHOD(KsProperty) (THIS_ | |
PKSPROPERTY Property, | |
ULONG PropertyLength, | |
LPVOID PropertyData, | |
ULONG DataLength, | |
ULONG *BytesReturned | |
) PURE; | |
STDMETHOD(KsMethod) (THIS_ | |
PKSMETHOD Method, | |
ULONG MethodLength, | |
LPVOID MethodData, | |
ULONG DataLength, | |
ULONG *BytesReturned | |
) PURE; | |
STDMETHOD(KsEvent) (THIS_ | |
PKSEVENT Event, | |
ULONG EventLength, | |
LPVOID EventData, | |
ULONG DataLength, | |
ULONG *BytesReturned | |
) PURE; | |
}; | |
struct IKsAggregateControl; | |
DECLARE_INTERFACE_(IKsAggregateControl,IUnknown) | |
{ | |
STDMETHOD(KsAddAggregate) (THIS_ | |
REFGUID AggregateClass | |
) PURE; | |
STDMETHOD(KsRemoveAggregate) (THIS_ | |
REFGUID AggregateClass | |
) PURE; | |
}; | |
struct IKsTopology; | |
DECLARE_INTERFACE_(IKsTopology,IUnknown) | |
{ | |
STDMETHOD(CreateNodeInstance) (THIS_ | |
ULONG NodeId, | |
ULONG Flags, | |
ACCESS_MASK DesiredAccess, | |
IUnknown *UnkOuter, | |
REFGUID InterfaceId, | |
LPVOID *Interface | |
) PURE; | |
}; | |
} | |