44const GUID IID_IKsControl = {0x28F54685L, 0x06FD, 0x11D2, {0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}};
45const GUID IID_IKsFilter = {0x3ef6ee44L, 0x0D41, 0x11d2, {0xbe, 0xDA, 0x00, 0xc0, 0x4f, 0x8e, 0xF4, 0x57}};
46const GUID KSPROPSETID_Topology = {0x720D4AC0L, 0x7533, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
47const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}};
48const GUID KSPROPSETID_General = {0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}};
53 PKSFILTERFACTORY FilterFactory);
67 sizeof(IKsFilterTopologySet) /
sizeof(KSPROPERTY_ITEM),
68 (
const KSPROPERTY_ITEM*)&IKsFilterTopologySet,
74 sizeof(IKsFilterPinSet) /
sizeof(KSPROPERTY_ITEM),
75 (
const KSPROPERTY_ITEM*)&IKsFilterPinSet,
81 sizeof(IKsFilterGeneralSet) /
sizeof(KSPROPERTY_ITEM),
82 (
const KSPROPERTY_ITEM*)&IKsFilterGeneralSet,
91 IKsProcessingObject * iface,
109 IKsProcessingObject * iface)
119 IKsProcessingObject * iface)
132 IKsProcessingObject * iface)
138 DPRINT1(
"processing object\n");
148 if (KeReadStateMutex(&
This->ControlMutex) == 0)
151 DPRINT1(
"processing object too slow\n");
162 DPRINT1(
"processing object too slow\n");
171 if (
This->Gate.Count != 0)
174 DPRINT1(
"processing object gate open\n");
178 DPRINT1(
"IKsProcessingObject_fnProcessingObjectWork not implemented\n");
190 IKsProcessingObject * iface)
201 IKsProcessingObject * iface,
217 if ((
This->Filter.Descriptor->Flags & (KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING | KSFILTER_FLAG_CRITICAL_PROCESSING | KSFILTER_FLAG_HYPERCRITICAL_PROCESSING)) &&
228 iface->lpVtbl->ProcessingObjectWork(iface);
234 IKsProcessingObject * iface)
242 if (
This->Filter.Descriptor->Dispatch)
245 if (
This->Filter.Descriptor->Dispatch->Reset)
248 This->Filter.Descriptor->Dispatch->Reset(&
This->Filter);
259 IKsProcessingObject * iface)
409 if (
This->Header.ClientAggregate)
412 Status =
This->Header.ClientAggregate->lpVtbl->QueryInterface(
This->Header.ClientAggregate, refiid,
Output);
421 DPRINT(
"IKsFilter_fnQueryInterface no interface\n");
461 return &
This->Filter;
489 IN struct KSPROCESSPIPESECTION *Section,
493 OUT PKSGATE *OutGate)
503 IN struct KSPROCESSPIPESECTION *Section)
513 IN PKSPROCESSPIN ProcessPin)
522 ASSERT(
This->Filter.Descriptor->PinDescriptorsCount > ProcessPin->Pin->Id);
526 (
This->Filter.Descriptor->PinDescriptorsCount + 1) *
sizeof(
PVOID),
527 This->Filter.Descriptor->PinDescriptorsCount *
sizeof(
PVOID),
533 This->ProcessPinIndex[ProcessPin->Pin->Id].Pins[
This->ProcessPinIndex[ProcessPin->Pin->Id].Count] = ProcessPin;
534 This->ProcessPinIndex[ProcessPin->Pin->Id].Count++;
547 IN PKSPROCESSPIN ProcessPin)
551 PKSPROCESSPIN * Pins;
560 ASSERT(ProcessPin->Pin->Id);
562 Count =
This->ProcessPinIndex[ProcessPin->Pin->Id].Count;
563 Pins =
This->ProcessPinIndex[ProcessPin->Pin->Id].Pins;
568 if (Pins[
Index] == ProcessPin)
577 This->ProcessPinIndex[ProcessPin->Pin->Id].Count--;
579 if (!
This->ProcessPinIndex[ProcessPin->Pin->Id].Count)
582 This->ProcessPinIndex[ProcessPin->Pin->Id].Pins =
NULL;
596 IN struct KSPROCESSPIPESECTION *PipeSection,
607 IN struct KSPROCESSPIPESECTION *PipeSection,
639 return This->ProcessPinIndex;
719 if (
This->Filter.Descriptor &&
This->Filter.Descriptor->Dispatch &&
This->Filter.Descriptor->Dispatch->Close)
761 if (!
This->Filter.Descriptor || !
This->Filter.Descriptor->PinDescriptorsCount)
769 ASSERT(
This->Filter.Descriptor->PinDescriptorSize ==
sizeof(KSPIN_DESCRIPTOR_EX));
770 ASSERT(
This->Filter.Descriptor->PinDescriptorsCount >
Pin->PinId);
774 Instances->
PossibleCount =
This->Filter.Descriptor->PinDescriptors[
Pin->PinId].InstancesPossible;
793 if (!
This->Filter.Descriptor || !
This->Filter.Descriptor->PinDescriptorsCount)
801 ASSERT(
This->Filter.Descriptor->PinDescriptorSize ==
sizeof(KSPIN_DESCRIPTOR_EX));
802 ASSERT(
This->Filter.Descriptor->PinDescriptorsCount >
Pin->PinId);
805 *
Result =
This->Filter.Descriptor->PinDescriptors[
Pin->PinId].InstancesNecessary;
841 if (!
This->Filter.Descriptor || !
This->Filter.Descriptor->PinDescriptorsCount)
849 ASSERT(
This->Filter.Descriptor->PinDescriptorSize ==
sizeof(KSPIN_DESCRIPTOR_EX));
850 ASSERT(
This->Filter.Descriptor->PinDescriptorsCount >
Pin->PinId);
852 if (
This->Filter.Descriptor->PinDescriptors[
Pin->PinId].IntersectHandler ==
NULL ||
853 This->Filter.Descriptor->PinDescriptors[
Pin->PinId].PinDescriptor.DataRanges ==
NULL ||
854 This->Filter.Descriptor->PinDescriptors[
Pin->PinId].PinDescriptor.DataRangesCount == 0)
869 DPRINT(
"KspHandleDataIntersection Index %lu PinId %lu MajorFormat %S SubFormat %S Specifier %S FormatSize %lu SampleSize %lu Align %lu Flags %lx Reserved %lx DataLength %lu\n",
Index,
Pin->PinId, MajorFormat.
Buffer, SubFormat.
Buffer, Specifier.
Buffer,
874 Status =
This->Filter.Descriptor->PinDescriptors[
Pin->PinId].IntersectHandler(&
This->Filter,
878 This->Filter.Descriptor->PinDescriptors[
Pin->PinId].PinDescriptor.DataRanges[0],
882 DPRINT(
"KspHandleDataIntersection Status %lx\n",
Status);
938 if (
This->Filter.Descriptor->ComponentId !=
NULL)
1002 DPRINT(
"KspPinPropertyHandler Pins %lu Request->Id %lu Status %lx\n",
This->Filter.Descriptor->PinDescriptorsCount,
Request->Id,
Status);
1018 PKSFILTER FilterInstance;
1045 ASSERT(FilterInstance->Descriptor);
1046 ASSERT(FilterInstance->Descriptor->AutomationTable);
1053 const KSMETHOD_SET *MethodSet =
NULL;
1054 ULONG MethodItemSize = 0;
1057 if (FilterInstance->Descriptor->AutomationTable->MethodSetsCount)
1059 SetCount = FilterInstance->Descriptor->AutomationTable->MethodSetsCount;
1060 MethodSet = FilterInstance->Descriptor->AutomationTable->MethodSets;
1061 MethodItemSize = FilterInstance->Descriptor->AutomationTable->MethodItemSize;
1069 const KSPROPERTY_SET *PropertySet =
NULL;
1070 ULONG PropertyItemSize = 0;
1077 NodeDescriptor = (PKSNODE_DESCRIPTOR)((
ULONG_PTR)FilterInstance->Descriptor->NodeDescriptors + FilterInstance->Descriptor->NodeDescriptorSize * NodeProperty->
NodeId);
1082 PropertyItemSize = 0;
1085 else if (FilterInstance->Descriptor->AutomationTable->PropertySetsCount)
1087 SetCount = FilterInstance->Descriptor->AutomationTable->PropertySetsCount;
1088 PropertySet = FilterInstance->Descriptor->AutomationTable->PropertySets;
1089 PropertyItemSize = FilterInstance->Descriptor->AutomationTable->PropertyItemSize;
1091 ASSERT(PropertyItemSize ==
sizeof(KSPROPERTY_ITEM));
1092 PropertyItemSize = 0;
1096 KSPROPERTY_ITEM_IRP_STORAGE(
Irp) = (KSPROPERTY_ITEM*)
This;
1111 FilterInstance->Descriptor->AutomationTable->EventSetsCount,
1112 (PKSEVENT_SET)FilterInstance->Descriptor->AutomationTable->EventSets,
1113 &
This->Header.EventList,
1117 FilterInstance->Descriptor->AutomationTable->EventItemSize);
1127 DPRINT(
"IKsFilter_DispatchDeviceIoControl property PinCount %x\n", FilterInstance->Descriptor->PinDescriptorsCount);
1198 DPRINT(
"IKsFilter_CreateDescriptors _KsEdit failed %lx\n",
Status);
1208 DPRINT(
"IKsFilter_CreateDescriptors _KsEdit failed %lx\n",
Status);
1218 DPRINT(
"IKsFilter_CreateDescriptors _KsEdit failed %lx\n",
Status);
1231 DPRINT(
"IKsFilter_CreateDescriptors _KsEdit failed %lx\n",
Status);
1242 (
PVOID*)&
This->Filter.Descriptor->Connections,
1247 This->Topology.TopologyConnections =
This->Filter.Descriptor->Connections;
1248 This->Topology.TopologyConnectionsCount = ((PKSFILTER_DESCRIPTOR)
This->Filter.Descriptor)->ConnectionsCount =
FilterDescriptor->ConnectionsCount;
1261 if (!
This->Topology.TopologyNodes)
1263 DPRINT(
"IKsFilter_CreateDescriptors OutOfMemory TopologyNodesCount %lu\n",
FilterDescriptor->NodeDescriptorsCount);
1269 if (!
This->Topology.TopologyNodesNames)
1272 DPRINT(
"IKsFilter_CreateDescriptors OutOfMemory TopologyNodesCount %lu\n",
FilterDescriptor->NodeDescriptorsCount);
1278 for(
Index = 0; Index < FilterDescriptor->NodeDescriptorsCount;
Index++)
1304 KSAUTOMATION_TABLE AutomationTable;
1307 if (!
This->Filter.Descriptor)
1322 RtlZeroMemory(&AutomationTable,
sizeof(KSAUTOMATION_TABLE));
1325 AutomationTable.PropertyItemSize =
sizeof(KSPROPERTY_ITEM);
1326 AutomationTable.PropertySetsCount = 3;
1341 PKSPIN NextPin, CurPin;
1346 ASSERT(
Pin->Id <
This->Filter.Descriptor->PinDescriptorsCount);
1352 This->PinInstanceCount[
Pin->Id]++;
1357 CurPin =
This->FirstPin[
Pin->Id];
1368 }
while(NextPin !=
NULL);
1382 PKSPIN NextPin, CurPin, LastPin;
1387 ASSERT(
Pin->Id <
This->Filter.Descriptor->PinDescriptorsCount);
1390 CurPin =
This->FirstPin[
Pin->Id];
1405 BasicHeader->
Next.
Pin = NextPin;
1410 This->FirstPin[
Pin->Id] = NextPin;
1413 This->PinInstanceCount[
Pin->Id]--;
1423 }
while(NextPin !=
NULL);
1437 PKSOBJECT_CREATE_ITEM CreateItem;
1441 DPRINT(
"IKsFilter_DispatchCreatePin\n");
1444 CreateItem = KSCREATE_ITEM_IRP_STORAGE(
Irp);
1458 DPRINT(
"IKsFilter_DispatchCreatePin KsValidateConnectRequest %lx\n",
Status);
1465 DPRINT(
"IKsFilter_DispatchCreatePin KsValidateConnectRequest PinId %lu CurrentInstanceCount %lu MaxPossible %lu\n",
Connect->
PinId,
1467 This->Filter.Descriptor->PinDescriptors[
Connect->
PinId].InstancesPossible);
1474 DPRINT(
"IKsFilter_DispatchCreatePin KspCreatePin %lx\n",
Status);
1480 DPRINT(
"IKsFilter_DispatchCreatePin MaxInstance %lu CurInstance %lu %lx\n",
This->Filter.Descriptor->PinDescriptors[
Connect->
PinId].InstancesPossible,
This->PinInstanceCount[
Connect->
PinId]);
1495 DPRINT(
"IKsFilter_DispatchCreatePin Result %lx\n",
Status);
1515 PKSFILTERFACTORY FilterFactory)
1563 PKSFILTERFACTORY FilterFactory)
1566 PKSFILTER
Filter, LastFilter;
1625 IKsProcessingObject *
Object = (IKsProcessingObject*)Ctx;
1639 IN IKsFilterFactory *iface)
1642 IKsDevice *KsDevice;
1647 PKSOBJECT_CREATE_ITEM CreateItem;
1653 Factory = iface->lpVtbl->GetStruct(iface);
1661 if (
Factory->FilterDescriptor->Flags & KSFILTER_FLAG_DENY_USERMODE_ACCESS)
1675 DPRINT1(
"KspCreateFilter OutOfMemory\n");
1681 if (!
This->Filter.Bag)
1685 DPRINT1(
"KspCreateFilter OutOfMemory\n");
1688 KsDevice = (IKsDevice*)&DeviceExtension->DeviceHeader->BasicHeader.OuterUnknown;
1698 DPRINT(
"KspCreateFilter IKsFilter_CopyFilterDescriptor failed %lx\n",
Status);
1712 DPRINT1(
"KspCreateFilter OutOfMemory\n");
1719 CreateItem[0].Flags = KSCREATE_ITEM_FREEONSTOP;
1724 CreateItem[1].Flags = KSCREATE_ITEM_FREEONSTOP;
1735 This->FilterFactory = iface;
1740 This->Header.KsDevice = &DeviceExtension->DeviceHeader->KsDevice;
1741 This->Header.Parent.KsFilterFactory = iface->lpVtbl->GetStruct(iface);
1743 This->Header.ControlMutex = &
This->ControlMutex;
1749 KsGateInitializeAnd(&
This->Gate,
NULL);
1761 DPRINT1(
"KsRegisterCountedWorker failed with %lx\n",
Status);
1772 DPRINT1(
"IKsFilter_CreateDescriptors failed with %lx\n",
Status);
1782 if (
Factory->FilterDescriptor->Dispatch)
1785 if (
Factory->FilterDescriptor->Dispatch->Create)
1826 DPRINT1(
"KspCreateFilter done %lx KsDevice %p\n",
Status,
This->Header.KsDevice);
1874 DPRINT(
"KsFilterAddTopologyConnections\n");
1877 Count =
This->Filter.Descriptor->ConnectionsCount + NewConnectionsCount;
1882 (
PVOID*)&
This->Filter.Descriptor->Connections,
1890 DPRINT(
"KsFilterAddTopologyConnections KsEdit failed with %lx\n",
Status);
1898 NewTopologyConnections,
1902 This->Topology.TopologyConnectionsCount += NewConnectionsCount;
1903 ((PKSFILTER_DESCRIPTOR)
This->Filter.Descriptor)->ConnectionsCount += NewConnectionsCount;
1904 This->Topology.TopologyConnections =
This->Filter.Descriptor->Connections;
1923 Gate =
This->lpVtblKsProcessingObject->GetAndGate((IKsProcessingObject*)
This->lpVtblKsProcessingObject);
1925 if (!KsGateCaptureThreshold(Gate))
1932 This->lpVtblKsProcessingObject->Process((IKsProcessingObject*)
This->lpVtblKsProcessingObject,
Asynchronous);
1958 IN const KSPIN_DESCRIPTOR_EX *
const InPinDescriptor,
1965 DPRINT(
"KsFilterCreatePinFactory\n");
1968 Count =
This->Filter.Descriptor->PinDescriptorsCount + 1;
1971 ASSERT(
This->Filter.Descriptor->PinDescriptorSize ==
sizeof(KSPIN_DESCRIPTOR_EX));
1974 Status =
_KsEdit(
This->Filter.Bag, (
PVOID*)&
This->Filter.Descriptor->PinDescriptors,
Count *
This->Filter.Descriptor->PinDescriptorSize,
This->Filter.Descriptor->PinDescriptorsCount *
This->Filter.Descriptor->PinDescriptorSize, 0);
1978 DPRINT(
"KsFilterCreatePinFactory _KsEdit failed with %lx\n",
Status);
1987 DPRINT(
"KsFilterCreatePinFactory _KsEdit failed with %lx\n",
Status);
1996 DPRINT(
"KsFilterCreatePinFactory _KsEdit failed with %lx\n",
Status);
2001 RtlMoveMemory((
PVOID)&
This->Filter.Descriptor->PinDescriptors[
This->Filter.Descriptor->PinDescriptorsCount], InPinDescriptor,
sizeof(KSPIN_DESCRIPTOR_EX));
2009 DPRINT(
"KsFilterCreatePinFactory _KsEdit failed %lx\n",
Status);
2014 *PinID =
This->Filter.Descriptor->PinDescriptorsCount;
2017 ((PKSFILTER_DESCRIPTOR)
This->Filter.Descriptor)->PinDescriptorsCount++;
2020 DPRINT(
"KsFilterCreatePinFactory done\n");
2052 if (PinId >=
This->Filter.Descriptor->PinDescriptorsCount)
2058 return This->PinInstanceCount[PinId];
2073 if (PinId >=
This->Filter.Descriptor->PinDescriptorsCount)
2080 return This->FirstPin[PinId];
2112 DPRINT(
"KsGetFilterFromIrp\n");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
#define InterlockedDecrement
NTSTATUS NTAPI KsAddItemToObjectBag(IN KSOBJECT_BAG ObjectBag, IN PVOID Item, IN PFNKSFREE Free OPTIONAL)
KSDDKAPI NTSTATUS NTAPI _KsEdit(IN KSOBJECT_BAG ObjectBag, IN OUT PVOID *PointerToPointerToItem, IN ULONG NewSize, IN ULONG OldSize, IN ULONG Tag)
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
KSDDKAPI NTSTATUS NTAPI KspPinPropertyHandler(IN PIRP Irp, IN PKSPROPERTY Property, IN OUT PVOID Data, IN ULONG DescriptorsCount, IN const KSPIN_DESCRIPTOR *Descriptors, IN ULONG DescriptorSize)
NTSTATUS KspValidateConnectRequest(IN PIRP Irp, IN ULONG DescriptorsCount, IN PVOID Descriptors, IN ULONG DescriptorSize, OUT PKSPIN_CONNECT *Connect)
#define NT_SUCCESS(StatCode)
struct _BEEP_DEVICE_EXTENSION * PDEVICE_EXTENSION
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
static VOID Wake(_In_ UCHAR Csn)
NTSTATUS NTAPI KsMergeAutomationTables(OUT PKSAUTOMATION_TABLE *AutomationTableAB, IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL, IN KSOBJECT_BAG Bag OPTIONAL)
KSDDKAPI VOID NTAPI KsFreeObjectHeader(IN PVOID Header)
KSDDKAPI NTSTATUS NTAPI KsSynchronousIoControlDevice(IN PFILE_OBJECT FileObject, IN KPROCESSOR_MODE RequestorMode, IN ULONG IoControl, IN PVOID InBuffer, IN ULONG InSize, OUT PVOID OutBuffer, IN ULONG OutSize, OUT PULONG BytesReturned)
KSDDKAPI NTSTATUS NTAPI KsAllocateObjectHeader(OUT KSOBJECT_HEADER *Header, IN ULONG ItemsCount, IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL, IN PIRP Irp, IN KSDISPATCH_TABLE *Table)
KSDDKAPI NTSTATUS NTAPI KsDisableEvent(IN PIRP Irp, IN OUT PLIST_ENTRY EventsList, IN KSEVENTS_LOCKTYPE EventsFlags, IN PVOID EventsLock)
NTSTATUS KspEnableEvent(IN PIRP Irp, IN ULONG EventSetsCount, IN const KSEVENT_SET *EventSet, IN OUT PLIST_ENTRY EventsList OPTIONAL, IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL, IN PVOID EventsLock OPTIONAL, IN PFNKSALLOCATOR Allocator OPTIONAL, IN ULONG EventItemSize OPTIONAL)
KSDDKAPI NTSTATUS NTAPI KsFilterCreateNode(IN PKSFILTER Filter, IN const KSNODE_DESCRIPTOR *const NodeDescriptor, OUT PULONG NodeID)
NTSTATUS NTAPI IKsControl_fnQueryInterface(IKsControl *iface, IN REFIID refiid, OUT PVOID *Output)
const GUID KSPROPSETID_Pin
NTSTATUS NTAPI FilterTopologyPropertyHandler(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
NTSTATUS IKsFilter_CopyFilterDescriptor(IKsFilterImpl *This, const KSFILTER_DESCRIPTOR *FilterDescriptor)
static IKsFilterVtbl vt_IKsFilter
KSPROPERTY_SET FilterPropertySet[]
NTSTATUS NTAPI IKsFilter_fnBindProcessPinsToPipeSection(IKsFilter *iface, IN struct KSPROCESSPIPESECTION *Section, IN PVOID Create, IN PKSPIN KsPin, OUT IKsPin **Pin, OUT PKSGATE *OutGate)
ULONG NTAPI IKsProcessingObject_fnAddRef(IKsProcessingObject *iface)
NTSTATUS NTAPI IKsControl_fnKsMethod(IKsControl *iface, IN PKSMETHOD Method, IN ULONG MethodLength, IN OUT PVOID MethodData, IN ULONG DataLength, OUT ULONG *BytesReturned)
static IKsControlVtbl vt_IKsControl
KSDDKAPI NTSTATUS NTAPI KsFilterCreatePinFactory(IN PKSFILTER Filter, IN const KSPIN_DESCRIPTOR_EX *const InPinDescriptor, OUT PULONG PinID)
PKSGATE NTAPI IKsProcessingObject_fnGetAndGate(IKsProcessingObject *iface)
KSDDKAPI VOID NTAPI KsFilterAcquireProcessingMutex(IN PKSFILTER Filter)
KSDDKAPI ULONG NTAPI KsFilterGetChildPinCount(IN PKSFILTER Filter, IN ULONG PinId)
VOID IKsFilter_RemoveFilterFromFilterFactory(IKsFilterImpl *This, PKSFILTERFACTORY FilterFactory)
NTSTATUS KspHandlePropertyInstances(IN PIO_STATUS_BLOCK IoStatus, IN PKSIDENTIFIER Request, IN OUT PVOID Data, IN IKsFilterImpl *This, IN BOOL Global)
NTSTATUS NTAPI IKsFilter_fnAddProcessPin(IKsFilter *iface, IN PKSPROCESSPIN ProcessPin)
NTSTATUS NTAPI IKsControl_fnKsProperty(IKsControl *iface, IN PKSPROPERTY Property, IN ULONG PropertyLength, IN OUT PVOID PropertyData, IN ULONG DataLength, OUT ULONG *BytesReturned)
BOOL NTAPI IKsFilter_fnReprepareProcessPipeSection(IKsFilter *iface, IN struct KSPROCESSPIPESECTION *PipeSection, IN PULONG Data)
KSDDKAPI NTSTATUS NTAPI KsFilterAddTopologyConnections(IN PKSFILTER Filter, IN ULONG NewConnectionsCount, IN const KSTOPOLOGY_CONNECTION *const NewTopologyConnections)
PKSFILTER NTAPI IKsFilter_fnGetStruct(IKsFilter *iface)
NTSTATUS KspHandleDataIntersection(IN PIRP Irp, IN PIO_STATUS_BLOCK IoStatus, IN PKSIDENTIFIER Request, IN OUT PVOID Data, IN ULONG DataLength, IN IKsFilterImpl *This)
VOID NTAPI IKsFilter_fnRegisterForCopyCallbacks(IKsFilter *iface, IKsQueue *Queue, BOOL Register)
NTSTATUS NTAPI IKsFilter_fnUnbindProcessPinsFromPipeSection(IKsFilter *iface, IN struct KSPROCESSPIPESECTION *Section)
NTSTATUS NTAPI FilterPinPropertyHandler(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
NTSTATUS IKsFilter_GetFilterFromIrp(IN PIRP Irp, OUT IKsFilter **Filter)
NTSTATUS NTAPI IKsFilter_DispatchCreatePin(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID NTAPI IKsProcessingObject_fnProcessingObjectWork(IKsProcessingObject *iface)
VOID IKsFilter_AddPin(PKSFILTER Filter, PKSPIN Pin)
ULONG NTAPI IKsFilter_fnAddRef(IKsFilter *iface)
NTSTATUS KspHandleNecessaryPropertyInstances(IN PIO_STATUS_BLOCK IoStatus, IN PKSIDENTIFIER Request, IN OUT PVOID Data, IN IKsFilterImpl *This)
VOID NTAPI IKsProcessingObject_fnProcess(IKsProcessingObject *iface, IN BOOLEAN Asynchronous)
NTSTATUS NTAPI IKsFilter_fnCreateNode(IKsFilter *iface, IN PIRP Irp, IN IKsPin *Pin, IN PLIST_ENTRY ListEntry)
NTSTATUS NTAPI IKsFilter_fnRemoveProcessPin(IKsFilter *iface, IN PKSPROCESSPIN ProcessPin)
NTSTATUS NTAPI IKsFilter_fnQueryInterface(IKsFilter *iface, IN REFIID refiid, OUT PVOID *Output)
KSDDKAPI PKSGATE NTAPI KsFilterGetAndGate(IN PKSFILTER Filter)
VOID IKsFilter_AttachFilterToFilterFactory(IKsFilterImpl *This, PKSFILTERFACTORY FilterFactory)
static IKsProcessingObjectVtbl vt_IKsProcessingObject
NTSTATUS NTAPI IKsProcessingObject_fnQueryInterface(IKsProcessingObject *iface, IN REFIID refiid, OUT PVOID *Output)
KSDDKAPI VOID NTAPI KsFilterAttemptProcessing(IN PKSFILTER Filter, IN BOOLEAN Asynchronous)
VOID NTAPI IKsProcessingObject_fnReset(IKsProcessingObject *iface)
KSDDKAPI PKSPIN NTAPI KsFilterGetFirstChildPin(IN PKSFILTER Filter, IN ULONG PinId)
ULONG NTAPI IKsControl_fnRelease(IKsControl *iface)
VOID IKsFilter_RemovePin(PKSFILTER Filter, PKSPIN Pin)
VOID NTAPI IKsFilter_fnDeliverResetState(IKsFilter *iface, IN struct KSPROCESSPIPESECTION *PipeSection, IN KSRESET ResetState)
PKSPROCESSPIN_INDEXENTRY NTAPI IKsFilter_fnGetProcessDispatch(IKsFilter *iface)
ULONG NTAPI IKsProcessingObject_fnRelease(IKsProcessingObject *iface)
NTSTATUS NTAPI IKsControl_fnKsEvent(IKsControl *iface, IN PKSEVENT Event OPTIONAL, IN ULONG EventLength, IN OUT PVOID EventData, IN ULONG DataLength, OUT ULONG *BytesReturned)
NTSTATUS NTAPI IKsFilter_DispatchDeviceIoControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI IKsFilter_DispatchCreateNode(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI FilterGeneralComponentIdHandler(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
const GUID IID_IKsControl
KSDDKAPI VOID NTAPI KsFilterRegisterPowerCallbacks(IN PKSFILTER Filter, IN PFNKSFILTERPOWER Sleep OPTIONAL, IN PFNKSFILTERPOWER Wake OPTIONAL)
VOID NTAPI IKsFilter_FilterCentricWorker(IN PVOID Ctx)
const GUID KSPROPSETID_General
NTSTATUS NTAPI KspCreateFilter(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN IKsFilterFactory *iface)
const GUID KSPROPSETID_Topology
BOOL NTAPI IKsFilter_fnDoAllNecessaryPinsExist(IKsFilter *iface)
ULONG NTAPI IKsFilter_fnRelease(IKsFilter *iface)
KSDDKAPI PKSFILTER NTAPI KsGetFilterFromIrp(IN PIRP Irp)
NTSTATUS IKsFilter_CreateDescriptors(IKsFilterImpl *This, KSFILTER_DESCRIPTOR *FilterDescriptor)
ULONG NTAPI IKsControl_fnAddRef(IKsControl *iface)
VOID NTAPI IKsProcessingObject_fnTriggerNotification(IKsProcessingObject *iface)
BOOL NTAPI IKsFilter_fnIsFrameHolding(IKsFilter *iface)
KSDDKAPI VOID NTAPI KsFilterReleaseProcessingMutex(IN PKSFILTER Filter)
NTSTATUS NTAPI IKsFilter_DispatchClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsDispatchInvalidDeviceRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI BOOLEAN NTAPI KsDispatchFastReadFailure(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
KSDDKAPI NTSTATUS NTAPI KsDispatchSetSecurity(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsDispatchQuerySecurity(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI BOOLEAN NTAPI KsDispatchFastIoDeviceControlFailure(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, OUT PVOID OutputBuffer OPTIONAL, IN ULONG OutputBufferLength, IN ULONG IoControlCode, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
PKSFILTER NTAPI KsPinGetParentFilter(IN PKSPIN Pin)
PKSPIN NTAPI KsPinGetNextSiblingPin(IN PKSPIN Pin)
#define DEFINE_KSPROPERTY_PINPROPOSEDATAFORMAT(PinSet, PropGeneral, PropInstances, PropIntersection)
#define DEFINE_KSPROPERTY_GENEREAL_COMPONENTID(PinSet, PropGeneral)
KSDDKAPI NTSTATUS NTAPI KsTopologyPropertyHandler(IN PIRP Irp, IN PKSPROPERTY Property, IN OUT PVOID Data, IN const KSTOPOLOGY *Topology)
#define KSPROPERTY_TYPE_TOPOLOGY
struct KSIDENTIFIER * PKSPROPERTY
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeGetCurrentIrql()
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
_In_ WDFDEVICE _In_ PWDF_DEVICE_INTERFACE_PROPERTY_DATA PropertyData
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)
struct _KSPROCESSPIN_INDEXENTRY KSPROCESSPIN_INDEXENTRY
struct _KSPROCESSPIN_INDEXENTRY * PKSPROCESSPIN_INDEXENTRY
#define IOCTL_KS_PROPERTY
#define DEFINE_KSPROPERTY_TOPOLOGYSET(TopologySet, Handler)
#define KSSTRING_TopologyNode
@ KsObjectTypeFilterFactory
@ KSPROPERTY_PIN_COMMUNICATION
@ KSPROPERTY_PIN_CATEGORY
@ KSPROPERTY_PIN_DATAINTERSECTION
@ KSPROPERTY_PIN_NECESSARYINSTANCES
@ KSPROPERTY_PIN_GLOBALCINSTANCES
@ KSPROPERTY_PIN_CINSTANCES
@ KSPROPERTY_PIN_CONSTRAINEDDATARANGES
@ KSPROPERTY_PIN_DATARANGES
@ KSPROPERTY_PIN_DATAFLOW
@ KSPROPERTY_PIN_INTERFACES
_In_ PKSPIN_CONNECT Connect
struct KSP_NODE * PKSP_NODE
#define IOCTL_KS_ENABLE_EVENT
union KSDATAFORMAT * PKSDATARANGE
struct KSMULTIPLE_ITEM * PKSMULTIPLE_ITEM
#define IOCTL_KS_DISABLE_EVENT
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
NTSTATUS KspPropertyHandler(IN PIRP Irp, IN ULONG PropertySetsCount, IN const KSPROPERTY_SET *PropertySet, IN PFNKSALLOCATOR Allocator OPTIONAL, IN ULONG PropertyItemSize OPTIONAL)
NTSTATUS NTAPI KspMethodHandlerWithAllocator(IN PIRP Irp, IN ULONG MethodSetsCount, IN const KSMETHOD_SET *MethodSet, IN PFNKSALLOCATOR Allocator OPTIONAL, IN ULONG MethodItemSize OPTIONAL)
NTSTATUS KspCreatePin(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PKSDEVICE KsDevice, IN IKsFilterFactory *FilterFactory, IN IKsFilter *Filter, IN PKSPIN_CONNECT Connect, IN KSPIN_DESCRIPTOR_EX *Descriptor)
VOID FreeItem(IN PVOID Item)
struct KSBASIC_HEADER * PKSBASIC_HEADER
struct KSIOBJECT_HEADER * PKSIOBJECT_HEADER
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
VOID NTAPI KeInitializeMutex(IN PKMUTEX Mutex, IN ULONG Level)
LONG NTAPI KeReleaseMutex(IN PKMUTEX Mutex, IN BOOLEAN Wait)
_In_ SYSTEM_POWER_STATE _In_ ULONG _In_ BOOLEAN Asynchronous
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
const KSFILTER_DESCRIPTOR FilterDescriptor
const KSNODE_DESCRIPTOR NodeDescriptor[]
PULONG MinorVersion OPTIONAL
PKSIOBJECT_HEADER ObjectHeader
IKsFilterFactory * FilterFactory
PKSPROCESSPIN_INDEXENTRY ProcessPinIndex
IKsProcessingObjectVtbl * lpVtblKsProcessingObject
IKsControlVtbl * lpVtblKsControl
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
_In_ PWDFDEVICE_INIT _In_ PWDF_PDO_EVENT_CALLBACKS DispatchTable
#define IsEqualGUIDAligned(guid1, guid2)
KSDDKAPI NTSTATUS NTAPI KsQueueWorkItem(IN PKSWORKER Worker, IN PWORK_QUEUE_ITEM WorkItem)
KSDDKAPI VOID NTAPI KsUnregisterWorker(IN PKSWORKER Worker)
KSDDKAPI NTSTATUS NTAPI KsRegisterCountedWorker(IN WORK_QUEUE_TYPE WorkQueueType, IN PWORK_QUEUE_ITEM CountedWorkItem, OUT PKSWORKER *Worker)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
#define ExInitializeWorkItem(Item, Routine, Context)