ReactOS 0.4.15-dev-5669-g09dde2c
bdasup.c
Go to the documentation of this file.
1
2#include "precomp.h"
3
4const GUID KSPROPSETID_BdaPinControl = {0xded49d5, 0xa8b7, 0x4d5d, {0x97, 0xa1, 0x12, 0xb0, 0xc1, 0x95, 0x87, 0x4d}};
5const GUID KSMETHODSETID_BdaDeviceConfiguration = {0x71985f45, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
6const GUID KSPROPSETID_BdaTopology = {0xa14ee835, 0x0a23, 0x11d3, {0x9c, 0xc7, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
7
9{
10 0,
11 0,
12 {NULL, NULL}
13};
14
15KSPROPERTY_ITEM FilterPropertyItem[] =
16{
25};
26
27
28KSPROPERTY_SET FilterPropertySet =
29{
31 8,
33 0,
34 NULL
35};
36
37KSMETHOD_ITEM FilterMethodItem[] =
38{
39 //DEFINE_KSMETHOD_ITEM_BDA_CREATE_PIN_FACTORY(BdaMethodCreatePin, NULL),
41};
42
43KSMETHOD_SET FilterMethodSet =
44{
46 2,
48 0,
49 NULL
50};
51
52KSAUTOMATION_TABLE FilterAutomationTable =
53{
54 1,
55 sizeof(KSPROPERTY_ITEM),
57 1,
58 sizeof(KSMETHOD_ITEM),
60 0,
61 sizeof(KSEVENT_ITEM),
62 NULL
63};
64
65KSPROPERTY_ITEM PinPropertyItem[] =
66{
69};
70
71KSPROPERTY_SET PinPropertySet =
72{
74 2,
76 0,
77 NULL
78};
79
80KSAUTOMATION_TABLE PinAutomationTable =
81{
82 1,
83 sizeof(KSPROPERTY_ITEM),
85 0,
86 sizeof(KSMETHOD_ITEM),
87 NULL,
88 0,
89 sizeof(KSEVENT_ITEM),
90 NULL
91};
92
93
98{
100 if (!Item)
101 return Item;
102
104 return Item;
105}
106
107VOID
109 IN PVOID Item)
110{
112}
113
114
117 IN PKSFILTERFACTORY FilterFactory)
118{
119 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry = NULL;
121 KIRQL OldLevel;
122
123 /* acquire list lock */
125
126 /* point to first entry */
128
130 {
131 /* get instance entry from list entry offset */
133
134 /* is the instance entry the requested one */
135 if (InstanceEntry->FilterFactoryInstance == FilterFactory)
136 break;
137
138 /* move to next entry */
139 Entry = Entry->Flink;
140 /* set to null as it has not been found */
141 InstanceEntry = NULL;
142 }
143
144
145 /* release spin lock */
147
148 /* return result */
149 return InstanceEntry;
150}
151
152/*
153 @implemented
154*/
156NTAPI
159{
160 DPRINT("BDASUP::DllInitialize\n");
161
165
166 return STATUS_SUCCESS;
167}
168
169/*
170 @implemented
171*/
173NTAPI
175{
176 DPRINT("BdaCheckChanges\n");
177
178 if (!Irp)
180
181 return STATUS_SUCCESS;
182}
183
184/*
185 @implemented
186*/
188NTAPI
190{
191 DPRINT("BdaCommitChanges\n");
192
193 if (!Irp)
195
196 return STATUS_SUCCESS;
197}
198
199/*
200 @implemented
201*/
203NTAPI
205 IN PKSDEVICE pKSDevice,
206 IN const KSFILTER_DESCRIPTOR *pFilterDescriptor,
208{
210}
211
212VOID
213NTAPI
216{
217 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry = NULL;
219 KIRQL OldLevel;
220
221 /* acquire list lock */
223
224 /* point to first entry */
226
228 {
229 /* get instance entry from list entry offset */
231
232 /* is the instance entry the requested one */
233 if (InstanceEntry == (PBDA_FILTER_INSTANCE_ENTRY)Context)
234 {
235 RemoveEntryList(&InstanceEntry->Entry);
236 FreeItem(InstanceEntry);
237 break;
238 }
239
240 /* move to next entry */
241 Entry = Entry->Flink;
242 }
243
244 /* release spin lock */
246}
247
248
249/*
250 @implemented
251*/
253NTAPI
255 IN PKSDEVICE pKSDevice,
256 IN const KSFILTER_DESCRIPTOR *pFilterDescriptor,
257 IN const BDA_FILTER_TEMPLATE *BdaFilterTemplate,
258 OUT PKSFILTERFACTORY *ppKSFilterFactory)
259{
260 PKSFILTERFACTORY FilterFactory;
261 PBDA_FILTER_INSTANCE_ENTRY FilterInstance;
262 KIRQL OldLevel;
264 PKSFILTER_DESCRIPTOR FilterDescriptor;
265
266 DPRINT("BdaCreateFilterFactoryEx\n");
267
268 FilterDescriptor = AllocateItem(NonPagedPool, sizeof(KSFILTER_DESCRIPTOR));
269 if (!FilterDescriptor)
270 {
271 /* no memory */
273 }
274
275 /* copy filter descriptor template */
276 RtlMoveMemory(FilterDescriptor, pFilterDescriptor, sizeof(KSFILTER_DESCRIPTOR));
277
278 /* erase pin / nodes / connections from filter descriptor */
279 FilterDescriptor->PinDescriptorsCount = 0;
280 FilterDescriptor->PinDescriptors = NULL;
281 FilterDescriptor->NodeDescriptorsCount = 0;
282 FilterDescriptor->NodeDescriptors = NULL;
283 FilterDescriptor->ConnectionsCount = 0;
284 FilterDescriptor->Connections = NULL;
285
286 /* merge the automation tables */
287 Status = KsMergeAutomationTables((PKSAUTOMATION_TABLE*)&FilterDescriptor->AutomationTable, (PKSAUTOMATION_TABLE)pFilterDescriptor->AutomationTable, &FilterAutomationTable, NULL);
288
289 /* check for success */
290 if (!NT_SUCCESS(Status))
291 {
292 DPRINT1("KsMergeAutomationTables failed with %lx\n", Status);
294 return Status;
295 }
296
297 /* allocate filter instance */
298 FilterInstance = AllocateItem(NonPagedPool, sizeof(BDA_FILTER_INSTANCE_ENTRY));
299 if (!FilterInstance)
300 {
301 /* not enough memory */
304 }
305
306 /* create the filter factory */
307 Status = KsCreateFilterFactory(pKSDevice->FunctionalDeviceObject, FilterDescriptor, NULL, NULL, 0, NULL, NULL, &FilterFactory);
308
309 /* check for success */
310 if (NT_SUCCESS(Status))
311 {
312 if (FilterDescriptor->AutomationTable != &FilterAutomationTable)
313 {
314 /* add the item to filter object bag */
315 KsAddItemToObjectBag(FilterFactory->Bag, (PVOID)FilterDescriptor->AutomationTable, FreeFilterInstance);
316 }
317 else
318 {
319 /* make sure the automation table is not-read only */
320 Status = _KsEdit(FilterFactory->Bag, (PVOID*)&FilterDescriptor->AutomationTable, sizeof(KSAUTOMATION_TABLE), sizeof(KSAUTOMATION_TABLE), 0);
321
322 /* sanity check */
324
325 /* add to object bag */
326 KsAddItemToObjectBag(FilterFactory->Bag, (PVOID)FilterDescriptor->AutomationTable, FreeFilterInstance);
327 }
328
329 /* initialize filter instance entry */
330 FilterInstance->FilterFactoryInstance = FilterFactory;
331 FilterInstance->FilterTemplate = (BDA_FILTER_TEMPLATE *)BdaFilterTemplate;
332
333 /* acquire list lock */
335
336 /* insert factory at the end */
338
339 /* release spin lock */
341
342
344 {
345 /* store result */
346 *ppKSFilterFactory = FilterFactory;
347 }
348 }
349 else
350 {
351 /* failed to create filter factory */
352 FreeItem(FilterInstance);
354 }
355
356 /* done */
357 DPRINT("BdaCreateFilterFactoryEx Status %x\n", Status);
358 return Status;
359}
360
361/*
362 @implemented
363*/
365NTAPI
367 IN PKSFILTER pKSFilter,
370{
371 PKSPIN_DESCRIPTOR_EX PinDescriptor;
372 PKSFILTERFACTORY FilterFactory;
373 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
375 ULONG PinId;
376 PKSPIN_DESCRIPTOR_EX NewPinDescriptor;
377
378 DPRINT("BdaCreatePin\n");
379
380 if (!pulPinId || !pKSFilter)
382
383 /* get parent filter factory */
384 FilterFactory = KsFilterGetParentFilterFactory(pKSFilter);
385
386 /* sanity check */
387 ASSERT(FilterFactory);
388
389 /* find instance entry */
390 InstanceEntry = GetFilterInstanceEntry(FilterFactory);
391
392 if (!InstanceEntry)
393 {
394 /* the filter was not initialized with BDA */
395 return STATUS_NOT_FOUND;
396 }
397
398 /* sanity checks */
399 ASSERT(InstanceEntry->FilterTemplate);
400 ASSERT(InstanceEntry->FilterTemplate->pFilterDescriptor);
401
402 /* does the filter support any pins */
403 if (!InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount)
404 {
405 /* no pins supported */
406 DPRINT("BdaCreatePin NoPins supported\n");
407 return STATUS_UNSUCCESSFUL;
408 }
409
410 /* is pin factory still existing */
411 if (InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount <= ulPinType)
412 {
413 /* pin request is out of bounds */
414 DPRINT("BdaCreatePin ulPinType %lu >= PinDescriptorCount %lu\n", ulPinType, InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount);
416 }
417
418 /* FIXME custom pin descriptors */
419 ASSERT(InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorSize == sizeof(KSPIN_DESCRIPTOR_EX));
420
421 /* get pin descriptor */
422 PinDescriptor = (PKSPIN_DESCRIPTOR_EX)&InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptors[ulPinType];
423
424 /* allocate pin descriptor */
425 NewPinDescriptor = AllocateItem(NonPagedPool, sizeof(KSPIN_DESCRIPTOR_EX));
426 if (!NewPinDescriptor)
427 {
428 /* no memory */
429 DPRINT("BdaCreatePin OutOfMemory\n");
431 }
432
433 /* make a copy of the pin descriptor */
434 RtlMoveMemory(NewPinDescriptor, PinDescriptor, sizeof(KSPIN_DESCRIPTOR_EX));
435
436 /* merge the automation tables */
437 Status = KsMergeAutomationTables((PKSAUTOMATION_TABLE*)&NewPinDescriptor->AutomationTable, (PKSAUTOMATION_TABLE)PinDescriptor->AutomationTable, &PinAutomationTable, pKSFilter->Bag);
438
439 /* check for success */
440 if (NT_SUCCESS(Status))
441 {
442 /* create the pin factory */
443 Status = KsFilterCreatePinFactory(pKSFilter, NewPinDescriptor, &PinId);
444
445 /* check for success */
446 if (NT_SUCCESS(Status))
447 {
448 /* store result */
449 *pulPinId = PinId;
450 }
451 }
452
453
454 DPRINT("BdaCreatePin Result %x PinId %u\n", Status, PinId);
455 return Status;
456}
457
458/*
459 @implemented
460*/
462NTAPI
464 IN PIRP Irp,
467{
469 PKSFILTER Filter;
470
471 DPRINT("BdaMethodCreatePin\n");
472
473 if (!Irp)
474 {
475 /* invalid parameter */
477 }
478
479 /* get filter from irp */
481
482 /* sanity check */
483 ASSERT(Filter);
485
486 /* get method request */
488
489 /* create the pin */
490 return BdaCreatePin(Filter, Pin->PinId, pulPinFactoryID);
491}
492
493/*
494 @implemented
495*/
497NTAPI
499 IN PKSFILTER pKSFilter,
501{
502 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
503 PKSFILTERFACTORY FilterFactory;
504 ULONG Index, PinId;
506
507 DPRINT("BdaInitFilter %p\n", pBdaFilterTemplate);
508
509 /* check input parameters */
510 if (!pKSFilter)
512
513 /* get parent filter factory */
514 FilterFactory = KsFilterGetParentFilterFactory(pKSFilter);
515
516 /* sanity check */
517 ASSERT(FilterFactory);
518
519 /* find instance entry */
520 InstanceEntry = GetFilterInstanceEntry(FilterFactory);
521
522 /* sanity check */
523 ASSERT(InstanceEntry);
524
526 {
527 /* use template from BdaCreateFilterFactoryEx */
528 pBdaFilterTemplate = InstanceEntry->FilterTemplate;
529 }
530
531 /* now create the pins */
532 for(Index = 0; Index < pBdaFilterTemplate->pFilterDescriptor->PinDescriptorsCount; Index++)
533 {
534 /* create the pin */
535 Status = BdaCreatePin(pKSFilter, Index, &PinId);
536
537 /* check for success */
538 if (!NT_SUCCESS(Status))
539 break;
540 }
541
542 /* done */
543 return Status;
544}
545
546
547
548/*
549 @implemented
550*/
552NTAPI
554 IN PKSFILTER pKSFilter,
557{
558 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
559 PKSFILTERFACTORY FilterFactory;
560 KSTOPOLOGY_CONNECTION Connection;
561
562 DPRINT("BdaCreateTopology\n");
563
564 /* check input parameters */
565 if (!pKSFilter)
567
568 /* get parent filter factory */
569 FilterFactory = KsFilterGetParentFilterFactory(pKSFilter);
570
571 /* sanity check */
572 ASSERT(FilterFactory);
573
574 /* find instance entry */
575 InstanceEntry = GetFilterInstanceEntry(FilterFactory);
576
577 if (!InstanceEntry)
578 {
579 /* the filter was not initialized with BDA */
580 return STATUS_NOT_FOUND;
581 }
582
583 if (InputPinId >= InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount ||
584 OutputPinId >= InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount)
585 {
586 /* invalid pin id */
588 }
589
590 /* initialize topology connection */
591 Connection.FromNode = KSFILTER_NODE;
592 Connection.ToNode = KSFILTER_NODE;
593 Connection.FromNodePin = InputPinId;
594 Connection.ToNodePin = OutputPinId;
595
596 /* add the connection */
597 return KsFilterAddTopologyConnections(pKSFilter, 1, &Connection);
598}
599
600/*
601 @unimplemented
602*/
604NTAPI
606 IN PKSFILTER pKSFilter,
608{
610 DPRINT("BdaDeletePin\n");
612}
613
614/*
615 @implemented
616*/
618NTAPI
620 IN PKSFILTERFACTORY FilterFactory,
621 IN const KSFILTER_DESCRIPTOR *FilterDescriptor OPTIONAL)
622{
623 DPRINT("BdaFilterFactoryUpdateCacheData\n");
625}
626
627/*
628 @implemented
629*/
631NTAPI
633 IN PIRP Irp,
634 OUT BDA_CHANGE_STATE *ChangeState)
635{
636 DPRINT("BdaGetChangeState\n");
637
638 if (Irp && ChangeState)
639 {
640 *ChangeState = BDA_CHANGES_COMPLETE;
641 return STATUS_SUCCESS;
642 }
643
644 /* invalid parameters supplied */
646
647}
648
649/*
650 @implemented
651*/
653NTAPI
655 IN PIRP Irp,
658{
659 PKSFILTER Filter;
661
662 DPRINT("BdaMethodCreateTopology\n");
663
664 /* check input parameters */
665 if (!Irp || !pKSMethod)
667
668 /* get filter */
670
671 /* sanity check */
672 ASSERT(Filter);
673
674 /* get method request */
676
677 /* create the topology */
678 return BdaCreateTopology(Filter, Node->ulInputPinId, Node->ulOutputPinId);
679}
680
681/*
682 @implemented
683*/
685NTAPI
687 IN PIRP Irp,
690{
691 DPRINT("BdaMethodDeletePin\n");
692
693 if (!Irp)
695
696 return STATUS_SUCCESS;
697}
698
699/*
700 @unimplemented
701*/
703NTAPI
705 IN PIRP Irp,
708{
710 DPRINT("BdaPropertyGetControllingPinId\n");
712}
713
714/*
715 @implemented
716*/
718NTAPI
720 IN PIRP Irp,
723{
724 PKSPIN Pin;
725 PKSFILTER Filter;
726 PKSFILTERFACTORY FilterFactory;
727 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
728
729 DPRINT("BdaPropertyGetPinControl\n");
730
731 /* first get the pin */
733 ASSERT(Pin);
734
735 /* now get the parent filter */
737 ASSERT(Filter);
738
739 /* get parent filter factory */
740 FilterFactory = KsFilterGetParentFilterFactory(Filter);
741 ASSERT(FilterFactory);
742
743 /* find instance entry */
744 InstanceEntry = GetFilterInstanceEntry(FilterFactory);
745 ASSERT(InstanceEntry);
746
747 /* sanity check */
748 pKSProperty++;
750
751 /* store pin id */
752 *pulProperty = Pin->Id;
753
754 return STATUS_SUCCESS;
755}
756
757/*
758 @unimplemented
759*/
761NTAPI
763 IN PIRP Irp,
766{
768 DPRINT("BdaPropertyNodeDescriptors\n");
770}
771
772/*
773 @unimplemented
774*/
776NTAPI
778 IN PIRP Irp,
781{
783 DPRINT("BdaPropertyNodeEvents\n");
785}
786
787/*
788 @unimplemented
789*/
791NTAPI
793 IN PIRP Irp,
796{
798 DPRINT("BdaPropertyNodeMethods\n");
800}
801
802/*
803 @unimplemented
804*/
806NTAPI
808 IN PIRP Irp,
811{
813 DPRINT("BdaPropertyNodeProperties\n");
815}
816
817/*
818 @implemented
819*/
821NTAPI
823 IN PIRP Irp,
826{
827 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
828 PKSFILTERFACTORY FilterFactory;
829 PKSFILTER pKSFilter;
830 PIO_STACK_LOCATION IoStack;
831 ULONG Index;
832
833 DPRINT("BdaPropertyNodeTypes\n");
834
835 /* check input parameter */
836 if (!Irp || !pKSProperty)
838
839 /* first get the filter */
840 pKSFilter = KsGetFilterFromIrp(Irp);
841
842 /* sanity check */
843 ASSERT(pKSFilter);
844
845 /* get parent filter factory */
846 FilterFactory = KsFilterGetParentFilterFactory(pKSFilter);
847
848 /* sanity check */
849 ASSERT(FilterFactory);
850
851 /* find instance entry */
852 InstanceEntry = GetFilterInstanceEntry(FilterFactory);
853 ASSERT(InstanceEntry);
854
855 /* get current irp stack */
857
858 /* are there node types provided */
859 if (!pulProperty)
860 {
861 /* no node entry array provided */
862 Irp->IoStatus.Information = InstanceEntry->FilterTemplate->pFilterDescriptor->NodeDescriptorsCount * sizeof(ULONG);
863 Irp->IoStatus.Status = STATUS_MORE_ENTRIES;
864 return STATUS_MORE_ENTRIES;
865 }
866
867 if (InstanceEntry->FilterTemplate->pFilterDescriptor->NodeDescriptorsCount * sizeof(ULONG) > IoStack->Parameters.DeviceIoControl.OutputBufferLength)
868 {
869 /* buffer too small */
870 Irp->IoStatus.Information = InstanceEntry->FilterTemplate->pFilterDescriptor->NodeDescriptorsCount * sizeof(ULONG);
871 Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
873 }
874
875 /* now copy all descriptors */
876 for(Index = 0; Index < InstanceEntry->FilterTemplate->pFilterDescriptor->NodeDescriptorsCount; Index++)
877 {
878 /* use the index as the type */
880 }
881
882 return STATUS_SUCCESS;
883}
884
885/*
886 @implemented
887*/
889NTAPI
891 IN PIRP Irp,
894{
895 PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
896 PKSFILTERFACTORY FilterFactory;
897 PKSFILTER pKSFilter;
898 PIO_STACK_LOCATION IoStack;
899 ULONG Index;
900
901 DPRINT("BdaPropertyPinTypes\n");
902
903 /* check input parameter */
904 if (!Irp || !pKSProperty)
906
907 /* first get the filter */
908 pKSFilter = KsGetFilterFromIrp(Irp);
909
910 /* sanity check */
911 ASSERT(pKSFilter);
912
913 /* get parent filter factory */
914 FilterFactory = KsFilterGetParentFilterFactory(pKSFilter);
915
916 /* sanity check */
917 ASSERT(FilterFactory);
918
919 /* find instance entry */
920 InstanceEntry = GetFilterInstanceEntry(FilterFactory);
921 ASSERT(InstanceEntry);
922
923 /* get current irp stack */
925
926 /* are there node types provided */
927 if (!pKSProperty)
928 {
929 /* no node entry array provided */
930 Irp->IoStatus.Information = InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount * sizeof(ULONG);
931 Irp->IoStatus.Status = STATUS_MORE_ENTRIES;
932 return STATUS_MORE_ENTRIES;
933 }
934
935 if (InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount * sizeof(ULONG) > IoStack->Parameters.DeviceIoControl.OutputBufferLength)
936 {
937 /* buffer too small */
938 Irp->IoStatus.Information = InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount * sizeof(ULONG);
939 Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
941 }
942
943 /* now copy all descriptors */
944 for(Index = 0; Index < InstanceEntry->FilterTemplate->pFilterDescriptor->PinDescriptorsCount; Index++)
945 {
946 /* use the index as the type */
948 }
949
950 return STATUS_SUCCESS;
951}
952
953/*
954 @implemented
955*/
957NTAPI
959 IN PIRP Irp,
962{
963 PBDA_FILTER_INSTANCE_ENTRY FilterInstance;
964 PKSFILTER Filter;
965 PIO_STACK_LOCATION IoStack;
966 ULONG Index;
967
968 DPRINT("BdaPropertyTemplateConnections\n");
969
970 /* validate parameters */
971 if (!Irp || !pKSProperty)
973
974 /* first get the filter */
976
977 /* sanity check */
978 ASSERT(Filter);
979
980 /* verify filter has been registered with BDA */
981 FilterInstance = GetFilterInstanceEntry(KsFilterGetParentFilterFactory(Filter));
982
983 if (!FilterInstance)
985
986 /* get current irp stack */
988
990 {
991 /* caller needs the size first */
992 Irp->IoStatus.Information = FilterInstance->FilterTemplate->pFilterDescriptor->ConnectionsCount * sizeof(KSTOPOLOGY_CONNECTION);
993 Irp->IoStatus.Status = STATUS_BUFFER_OVERFLOW;
995 }
996
997 /* sanity check */
998 ASSERT(FilterInstance->FilterTemplate->pFilterDescriptor->ConnectionsCount * sizeof(KSTOPOLOGY_CONNECTION) <= IoStack->Parameters.DeviceIoControl.OutputBufferLength);
999
1000 for(Index = 0; Index < FilterInstance->FilterTemplate->pFilterDescriptor->ConnectionsCount; Index++)
1001 {
1002 /* sanity check */
1003 ASSERT(FilterInstance->FilterTemplate->pFilterDescriptor->Connections);
1004
1005 /* copy connection */
1007 }
1008
1009 /* store result */
1010 Irp->IoStatus.Information = FilterInstance->FilterTemplate->pFilterDescriptor->ConnectionsCount * sizeof(KSTOPOLOGY_CONNECTION);
1011 Irp->IoStatus.Status = STATUS_SUCCESS;
1012
1013 /* done */
1014 return STATUS_SUCCESS;
1015
1016}
1017
1018/*
1019 @implemented
1020*/
1022NTAPI
1024{
1025 DPRINT("BdaStartChanges\n");
1026
1027 if (Irp)
1028 return STATUS_SUCCESS;
1029 else
1031
1032}
1033
1034/*
1035 @implemented
1036*/
1038NTAPI
1039BdaUninitFilter(IN PKSFILTER pKSFilter)
1040{
1041 DPRINT("BdaUninitFilter\n");
1042 return STATUS_SUCCESS;
1043}
1044
1045/*
1046 @implemented
1047*/
1049NTAPI
1051 IN PIRP Irp,
1052 IN KSPROPERTY *KSProperty)
1053{
1054 DPRINT("BdaValidateNodeProperty\n");
1055
1056 /* check for valid parameter */
1057 if (Irp && KSProperty)
1058 return STATUS_SUCCESS;
1059
1061}
NTSTATUS NTAPI KsAddItemToObjectBag(IN KSOBJECT_BAG ObjectBag, IN PVOID Item, IN PFNKSFREE Free OPTIONAL)
Definition: bag.c:86
KSDDKAPI NTSTATUS NTAPI _KsEdit(IN KSOBJECT_BAG ObjectBag, IN OUT PVOID *PointerToPointerToItem, IN ULONG NewSize, IN ULONG OldSize, IN ULONG Tag)
Definition: bag.c:358
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_EVENTS(GetHandler, SetHandler)
Definition: bdamedia.h:115
#define DEFINE_KSPROPERTY_ITEM_BDA_PIN_ID(GetHandler, SetHandler)
Definition: bdamedia.h:198
#define DEFINE_KSPROPERTY_ITEM_BDA_TEMPLATE_CONNECTIONS(GetHandler, SetHandler)
Definition: bdamedia.h:91
#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_TYPES(GetHandler, SetHandler)
Definition: bdamedia.h:75
#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_DESCRIPTORS(GetHandler, SetHandler)
Definition: bdamedia.h:131
#define DEFINE_KSMETHOD_ITEM_BDA_CREATE_TOPOLOGY(MethodHandler, SupportHandler)
Definition: bdamedia.h:173
#define DEFINE_KSPROPERTY_ITEM_BDA_PIN_TYPE(GetHandler, SetHandler)
Definition: bdamedia.h:206
#define DEFINE_KSPROPERTY_ITEM_BDA_PIN_TYPES(GetHandler, SetHandler)
Definition: bdamedia.h:83
#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_PROPERTIES(GetHandler, SetHandler)
Definition: bdamedia.h:107
#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_METHODS(GetHandler, SetHandler)
Definition: bdamedia.h:99
#define DEFINE_KSPROPERTY_ITEM_BDA_CONTROLLING_PIN_ID(GetHandler, SetHandler)
Definition: bdamedia.h:123
@ KSPROPERTY_BDA_PIN_TYPE
Definition: bdamedia.h:195
struct _KSP_BDA_NODE_PIN * PKSP_BDA_NODE_PIN
KSMETHOD_SET FilterMethodSet
Definition: bdasup.c:43
NTSTATUS NTAPI BdaUninitFilter(IN PKSFILTER pKSFilter)
Definition: bdasup.c:1039
NTSTATUS NTAPI BdaPropertyNodeMethods(IN PIRP Irp, IN KSP_NODE *pKSProperty, OUT GUID *pguidProperty)
Definition: bdasup.c:792
KSPROPERTY_SET PinPropertySet
Definition: bdasup.c:71
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: bdasup.c:95
NTSTATUS NTAPI BdaPropertyNodeTypes(IN PIRP Irp, IN KSPROPERTY *pKSProperty, OUT ULONG *pulProperty)
Definition: bdasup.c:822
const GUID KSPROPSETID_BdaPinControl
Definition: bdasup.c:4
NTSTATUS NTAPI BdaFilterFactoryUpdateCacheData(IN PKSFILTERFACTORY FilterFactory, IN const KSFILTER_DESCRIPTOR *FilterDescriptor OPTIONAL)
Definition: bdasup.c:619
KSAUTOMATION_TABLE PinAutomationTable
Definition: bdasup.c:80
VOID NTAPI FreeFilterInstance(IN PVOID Context)
Definition: bdasup.c:214
NTSTATUS NTAPI BdaInitFilter(IN PKSFILTER pKSFilter, IN const BDA_FILTER_TEMPLATE *pBdaFilterTemplate)
Definition: bdasup.c:498
NTSTATUS NTAPI BdaValidateNodeProperty(IN PIRP Irp, IN KSPROPERTY *KSProperty)
Definition: bdasup.c:1050
NTSTATUS NTAPI BdaPropertyNodeDescriptors(IN PIRP Irp, IN KSPROPERTY *pKSProperty, OUT BDANODE_DESCRIPTOR *pNodeDescriptorProperty)
Definition: bdasup.c:762
NTSTATUS NTAPI DllInitialize(PUNICODE_STRING RegistryPath)
Definition: bdasup.c:157
NTSTATUS NTAPI BdaCreateTopology(IN PKSFILTER pKSFilter, IN ULONG InputPinId, IN ULONG OutputPinId)
Definition: bdasup.c:553
NTSTATUS NTAPI BdaCheckChanges(IN PIRP Irp)
Definition: bdasup.c:174
KSPROPERTY_ITEM FilterPropertyItem[]
Definition: bdasup.c:15
NTSTATUS NTAPI BdaPropertyNodeEvents(IN PIRP Irp, IN KSP_NODE *pKSProperty, OUT GUID *pguidProperty)
Definition: bdasup.c:777
NTSTATUS NTAPI BdaCreateFilterFactoryEx(IN PKSDEVICE pKSDevice, IN const KSFILTER_DESCRIPTOR *pFilterDescriptor, IN const BDA_FILTER_TEMPLATE *BdaFilterTemplate, OUT PKSFILTERFACTORY *ppKSFilterFactory)
Definition: bdasup.c:254
NTSTATUS NTAPI BdaPropertyPinTypes(IN PIRP Irp, IN KSPROPERTY *pKSProperty, OUT ULONG *pulProperty)
Definition: bdasup.c:890
const GUID KSMETHODSETID_BdaDeviceConfiguration
Definition: bdasup.c:5
PBDA_FILTER_INSTANCE_ENTRY GetFilterInstanceEntry(IN PKSFILTERFACTORY FilterFactory)
Definition: bdasup.c:116
const GUID KSPROPSETID_BdaTopology
Definition: bdasup.c:6
KSPROPERTY_ITEM PinPropertyItem[]
Definition: bdasup.c:65
NTSTATUS NTAPI BdaPropertyGetPinControl(IN PIRP Irp, IN KSPROPERTY *pKSProperty, OUT ULONG *pulProperty)
Definition: bdasup.c:719
KSMETHOD_ITEM FilterMethodItem[]
Definition: bdasup.c:37
NTSTATUS NTAPI BdaPropertyGetControllingPinId(IN PIRP Irp, IN KSP_BDA_NODE_PIN *pProperty, OUT ULONG *pulControllingPinId)
Definition: bdasup.c:704
KSAUTOMATION_TABLE FilterAutomationTable
Definition: bdasup.c:52
NTSTATUS NTAPI BdaCreatePin(IN PKSFILTER pKSFilter, IN ULONG ulPinType, OUT ULONG *pulPinId)
Definition: bdasup.c:366
NTSTATUS NTAPI BdaMethodCreateTopology(IN PIRP Irp, IN KSMETHOD *pKSMethod, OPTIONAL PVOID pvIgnored)
Definition: bdasup.c:654
NTSTATUS NTAPI BdaGetChangeState(IN PIRP Irp, OUT BDA_CHANGE_STATE *ChangeState)
Definition: bdasup.c:632
NTSTATUS NTAPI BdaDeletePin(IN PKSFILTER pKSFilter, IN ULONG *pulPinId)
Definition: bdasup.c:605
NTSTATUS NTAPI BdaStartChanges(IN PIRP Irp)
Definition: bdasup.c:1023
NTSTATUS NTAPI BdaCreateFilterFactory(IN PKSDEVICE pKSDevice, IN const KSFILTER_DESCRIPTOR *pFilterDescriptor, IN const BDA_FILTER_TEMPLATE *pBdaFilterTemplate)
Definition: bdasup.c:204
KSPROPERTY_SET FilterPropertySet
Definition: bdasup.c:28
NTSTATUS NTAPI BdaPropertyNodeProperties(IN PIRP Irp, IN KSP_NODE *pKSProperty, OUT GUID *pguidProperty)
Definition: bdasup.c:807
VOID FreeItem(IN PVOID Item)
Definition: bdasup.c:108
NTSTATUS NTAPI BdaCommitChanges(IN PIRP Irp)
Definition: bdasup.c:189
NTSTATUS NTAPI BdaPropertyTemplateConnections(IN PIRP Irp, IN KSPROPERTY *pKSProperty, OUT KSTOPOLOGY_CONNECTION *pConnectionProperty)
Definition: bdasup.c:958
NTSTATUS NTAPI BdaMethodDeletePin(IN PIRP Irp, IN KSMETHOD *pKSMethod, OPTIONAL PVOID pvIgnored)
Definition: bdasup.c:686
NTSTATUS NTAPI BdaMethodCreatePin(IN PIRP Irp, IN KSMETHOD *pKSMethod, OUT ULONG *pulPinFactoryID)
Definition: bdasup.c:463
BDA_GLOBAL g_Settings
Definition: bdasup.c:8
_Must_inspect_result_ _In_ const KSFILTER_DESCRIPTOR _In_ const BDA_FILTER_TEMPLATE _Out_opt_ PKSFILTERFACTORY * ppKSFilterFactory
Definition: bdasup.h:81
struct _KSM_PIN * PKSM_PIN
_Must_inspect_result_ _In_ KSMETHOD _Out_opt_ ULONG * pulPinFactoryID
Definition: bdasup.h:133
_Must_inspect_result_ _In_ KSP_BDA_NODE_PIN * pProperty
Definition: bdasup.h:156
_Must_inspect_result_ _In_ KSMETHOD PVOID pvIgnored
Definition: bdasup.h:141
_Must_inspect_result_ _In_ KSPROPERTY _Out_opt_ KSTOPOLOGY_CONNECTION * pConnectionProperty
Definition: bdasup.h:221
_Must_inspect_result_ _In_ ULONG ulPinType
Definition: bdasup.h:88
_Must_inspect_result_ _In_ const KSFILTER_DESCRIPTOR * pFilterDescriptor
Definition: bdasup.h:71
_Must_inspect_result_ _In_ KSPROPERTY _Out_opt_ ULONG * pulProperty
Definition: bdasup.h:165
_Must_inspect_result_ _In_ ULONG _Out_opt_ ULONG * pulPinId
Definition: bdasup.h:89
_Must_inspect_result_ _In_ KSPROPERTY _Out_opt_ BDANODE_DESCRIPTOR * pNodeDescriptorProperty
Definition: bdasup.h:173
_Must_inspect_result_ _In_ KSP_BDA_NODE_PIN _Out_opt_ ULONG * pulControllingPinId
Definition: bdasup.h:157
_Must_inspect_result_ _In_ const KSFILTER_DESCRIPTOR _In_ const BDA_FILTER_TEMPLATE * pBdaFilterTemplate
Definition: bdasup.h:72
_Must_inspect_result_ _In_ KSP_NODE _Out_opt_ GUID * pguidProperty
Definition: bdasup.h:181
_Must_inspect_result_ _In_ KSMETHOD * pKSMethod
Definition: bdasup.h:132
_Must_inspect_result_ _In_ ULONG InputPinId
Definition: bdasup.h:96
_Must_inspect_result_ _In_ KSPROPERTY * pKSProperty
Definition: bdasup.h:164
_Must_inspect_result_ _In_ ULONG _In_ ULONG OutputPinId
Definition: bdasup.h:97
BDA_CHANGE_STATE
Definition: bdatypes.h:115
@ BDA_CHANGES_COMPLETE
Definition: bdatypes.h:116
#define UNIMPLEMENTED
Definition: debug.h:115
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
union node Node
Definition: types.h:1255
NTSTATUS NTAPI KsMergeAutomationTables(OUT PKSAUTOMATION_TABLE *AutomationTableAB, IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL, IN KSOBJECT_BAG Bag OPTIONAL)
Definition: api.c:2303
KSDDKAPI NTSTATUS NTAPI KsFilterCreatePinFactory(IN PKSFILTER Filter, IN const KSPIN_DESCRIPTOR_EX *const InPinDescriptor, OUT PULONG PinID)
Definition: filter.c:1956
KSDDKAPI NTSTATUS NTAPI KsFilterAddTopologyConnections(IN PKSFILTER Filter, IN ULONG NewConnectionsCount, IN const KSTOPOLOGY_CONNECTION *const NewTopologyConnections)
Definition: filter.c:1865
KSDDKAPI PKSFILTER NTAPI KsGetFilterFromIrp(IN PIRP Irp)
Definition: filter.c:2106
PKSFILTER NTAPI KsPinGetParentFilter(IN PKSPIN Pin)
Definition: pin.c:1097
KSDDKAPI PKSPIN NTAPI KsGetPinFromIrp(IN PIRP Irp)
Definition: pin.c:1211
struct BDA_FILTER_INSTANCE_ENTRY * PBDA_FILTER_INSTANCE_ENTRY
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
#define InsertTailList(ListHead, Entry)
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
Definition: fatprocs.h:427
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
KSDDKAPI NTSTATUS NTAPI KsCreateFilterFactory(IN PDEVICE_OBJECT DeviceObject, IN const KSFILTER_DESCRIPTOR *Descriptor, IN PWSTR RefString OPTIONAL, IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL, IN ULONG CreateItemFlags, IN PFNKSFILTERFACTORYPOWER SleepCallback OPTIONAL, IN PFNKSFILTERFACTORYPOWER WakeCallback OPTIONAL, OUT PKSFILTERFACTORY *FilterFactory OPTIONAL)
KSDDKAPI NTSTATUS NTAPI KsFilterFactoryUpdateCacheData(IN PKSFILTERFACTORY FilterFactory, IN const KSFILTER_DESCRIPTOR *FilterDescriptor OPTIONAL)
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
Status
Definition: gdiplustypes.h:25
#define KSFILTER_NODE
Definition: ks.h:44
#define ASSERT(a)
Definition: mode.c:44
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_NOT_FOUND
Definition: shellext.h:72
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define DPRINT
Definition: sndvol32.h:71
const KSFILTER_DESCRIPTOR FilterDescriptor
Definition: splitter.c:229
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: precomp.h:18
PKSFILTERFACTORY FilterFactoryInstance
Definition: precomp.h:20
LIST_ENTRY Entry
Definition: precomp.h:19
PBDA_FILTER_TEMPLATE FilterTemplate
Definition: precomp.h:21
LIST_ENTRY FilterFactoryInstanceList
Definition: precomp.h:28
BOOLEAN Initialized
Definition: precomp.h:26
KSPIN_LOCK FilterFactoryInstanceListLock
Definition: precomp.h:27
base of all file and directory entries
Definition: entries.h:83
ULONG Id
Definition: dmksctrl.h:77
Definition: ks.h:2074
const KSFILTER_DESCRIPTOR * pFilterDescriptor
Definition: bdasup.h:31
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define STATUS_MORE_ENTRIES
Definition: udferr_usr.h:124
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
Definition: dlist.c:348
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036