Author: janderwald
Date: Wed Mar 31 17:37:36 2010
New Revision: 46622
URL:
http://svn.reactos.org/svn/reactos?rev=46622&view=rev
Log:
[BDASUP]
- Fix initialization of filter / pin automation table
- Add debug traces
Modified:
trunk/reactos/drivers/multimedia/bdasup/bdasup.c
Modified: trunk/reactos/drivers/multimedia/bdasup/bdasup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/multimedia/bdasup/…
==============================================================================
--- trunk/reactos/drivers/multimedia/bdasup/bdasup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/multimedia/bdasup/bdasup.c [iso-8859-1] Wed Mar 31 17:37:36
2010
@@ -52,13 +52,13 @@
KSAUTOMATION_TABLE FilterAutomationTable =
{
1,
- sizeof(KSPROPERTY_SET),
+ sizeof(KSPROPERTY_ITEM),
&FilterPropertySet,
1,
- sizeof(KSMETHOD_SET),
+ sizeof(KSMETHOD_ITEM),
&FilterMethodSet,
0,
- sizeof(KSEVENT_SET),
+ sizeof(KSEVENT_ITEM),
NULL
};
@@ -80,13 +80,13 @@
KSAUTOMATION_TABLE PinAutomationTable =
{
1,
- sizeof(KSPROPERTY_SET),
+ sizeof(KSPROPERTY_ITEM),
&PinPropertySet,
0,
- sizeof(KSMETHOD_SET),
+ sizeof(KSMETHOD_ITEM),
NULL,
0,
- sizeof(KSEVENT_SET),
+ sizeof(KSEVENT_ITEM),
NULL
};
@@ -157,6 +157,8 @@
DllInitialize(
PUNICODE_STRING RegistryPath)
{
+ DPRINT("BDASUP::DllInitialize\n");
+
KeInitializeSpinLock(&g_Settings.FilterFactoryInstanceListLock);
InitializeListHead(&g_Settings.FilterFactoryInstanceList);
g_Settings.Initialized = TRUE;
@@ -171,6 +173,8 @@
NTAPI
BdaCheckChanges(IN PIRP Irp)
{
+ DPRINT("BdaCheckChanges\n");
+
if (!Irp)
return STATUS_INVALID_PARAMETER;
@@ -184,6 +188,8 @@
NTAPI
BdaCommitChanges(IN PIRP Irp)
{
+ DPRINT("BdaCommitChanges\n");
+
if (!Irp)
return STATUS_INVALID_PARAMETER;
@@ -257,6 +263,7 @@
NTSTATUS Status;
KSFILTER_DESCRIPTOR FilterDescriptor;
+ DPRINT("BdaCreateFilterFactoryEx\n");
/* backup filter descriptor */
RtlMoveMemory(&FilterDescriptor, pFilterDescriptor,
sizeof(KSFILTER_DESCRIPTOR));
@@ -265,7 +272,10 @@
/* check for success */
if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("KsMergeAutomationTables failed with %lx\n", Status);
return Status;
+ }
/* allocate filter instance */
FilterInstance = AllocateItem(NonPagedPool, sizeof(BDA_FILTER_INSTANCE_ENTRY));
@@ -287,6 +297,7 @@
if (!NT_SUCCESS(Status))
{
/* destroy filter instance */
+ DPRINT1("KsAddItemToObjectBag failed with %lx\n", Status);
FreeItem(FilterInstance);
KsDeleteFilterFactory(FilterFactory);
return Status;
@@ -316,9 +327,11 @@
{
/* failed to create filter factory */
FreeItem(FilterInstance);
+ DPRINT1("KsCreateFilterFactory failed with %lx\n", Status);
}
/* done */
+ DPRINT("BdaCreateFilterFactoryEx Status %x\n", Status);
return Status;
}
@@ -339,6 +352,8 @@
ULONG PinId;
KSPIN_DESCRIPTOR_EX NewPinDescriptor;
+ DPRINT("BdaCreatePin\n");
+
if (!pulPinId || !pKSFilter)
return STATUS_INVALID_PARAMETER;
@@ -419,6 +434,8 @@
PKSM_PIN Pin;
PKSFILTER Filter;
+ DPRINT("BdaMethodCreatePin\n");
+
if (!Irp)
{
/* invalid parameter */
@@ -453,6 +470,8 @@
ULONG Index, PinId;
NTSTATUS Status = STATUS_SUCCESS;
+ DPRINT("BdaInitFilter\n");
+
/* check input parameters */
if (!pKSFilter)
return STATUS_INVALID_PARAMETER;
@@ -500,6 +519,8 @@
PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
PKSFILTERFACTORY FilterFactory;
KSTOPOLOGY_CONNECTION Connection;
+
+ DPRINT("BdaCreateTopology\n");
/* check input parameters */
if (!pKSFilter)
@@ -547,6 +568,7 @@
IN ULONG *pulPinId)
{
UNIMPLEMENTED
+ DPRINT("BdaDeletePin\n");
return STATUS_NOT_IMPLEMENTED;
}
@@ -559,6 +581,7 @@
IN PKSFILTERFACTORY FilterFactory,
IN const KSFILTER_DESCRIPTOR *FilterDescriptor OPTIONAL)
{
+ DPRINT("BdaFilterFactoryUpdateCacheData\n");
return KsFilterFactoryUpdateCacheData(FilterFactory, FilterDescriptor);
}
@@ -571,6 +594,8 @@
IN PIRP Irp,
OUT BDA_CHANGE_STATE *ChangeState)
{
+ DPRINT("BdaGetChangeState\n");
+
if (Irp && ChangeState)
{
*ChangeState = BDA_CHANGES_COMPLETE;
@@ -595,6 +620,8 @@
PKSFILTER Filter;
PKSP_BDA_NODE_PIN Node;
+ DPRINT("BdaMethodCreateTopology\n");
+
/* check input parameters */
if (!Irp || !pKSMethod)
return STATUS_INVALID_PARAMETER;
@@ -622,6 +649,8 @@
IN KSMETHOD *pKSMethod,
OPTIONAL PVOID pvIgnored)
{
+ DPRINT("BdaMethodDeletePin\n");
+
if (!Irp)
return STATUS_INVALID_PARAMETER;
@@ -639,6 +668,7 @@
OUT ULONG *pulControllingPinId)
{
UNIMPLEMENTED
+ DPRINT("BdaPropertyGetControllingPinId\n");
return STATUS_NOT_IMPLEMENTED;
}
@@ -657,6 +687,8 @@
PKSFILTERFACTORY FilterFactory;
PBDA_FILTER_INSTANCE_ENTRY InstanceEntry;
+ DPRINT("BdaPropertyGetPinControl\n");
+
/* first get the pin */
Pin = KsGetPinFromIrp(Irp);
ASSERT(Pin);
@@ -694,6 +726,7 @@
OUT BDANODE_DESCRIPTOR *pNodeDescriptorProperty)
{
UNIMPLEMENTED
+ DPRINT("BdaPropertyNodeDescriptors\n");
return STATUS_NOT_IMPLEMENTED;
}
@@ -708,6 +741,7 @@
OUT GUID *pguidProperty)
{
UNIMPLEMENTED
+ DPRINT("BdaPropertyNodeEvents\n");
return STATUS_NOT_IMPLEMENTED;
}
@@ -722,6 +756,7 @@
OUT GUID *pguidProperty)
{
UNIMPLEMENTED
+ DPRINT("BdaPropertyNodeMethods\n");
return STATUS_NOT_IMPLEMENTED;
}
@@ -736,6 +771,7 @@
OUT GUID *pguidProperty)
{
UNIMPLEMENTED
+ DPRINT("BdaPropertyNodeProperties\n");
return STATUS_NOT_IMPLEMENTED;
}
@@ -755,6 +791,8 @@
PIO_STACK_LOCATION IoStack;
ULONG Index;
+ DPRINT("BdaPropertyNodeTypes\n");
+
/* check input parameter */
if (!Irp || !pKSProperty)
return STATUS_INVALID_PARAMETER;
@@ -821,6 +859,8 @@
PIO_STACK_LOCATION IoStack;
ULONG Index;
+ DPRINT("BdaPropertyPinTypes\n");
+
/* check input parameter */
if (!Irp || !pKSProperty)
return STATUS_INVALID_PARAMETER;
@@ -886,6 +926,8 @@
PIO_STACK_LOCATION IoStack;
ULONG Index;
+ DPRINT("BdaPropertyTemplateConnections\n");
+
/* validate parameters */
if (!Irp || !pKSProperty)
return STATUS_INVALID_PARAMETER;
@@ -941,6 +983,8 @@
NTAPI
BdaStartChanges(IN PIRP Irp)
{
+ DPRINT("BdaStartChanges\n");
+
if (Irp)
return STATUS_SUCCESS;
else
@@ -955,6 +999,7 @@
NTAPI
BdaUninitFilter(IN PKSFILTER pKSFilter)
{
+ DPRINT("BdaUninitFilter\n");
return STATUS_SUCCESS;
}
@@ -967,6 +1012,8 @@
IN PIRP Irp,
IN KSPROPERTY *KSProperty)
{
+ DPRINT("BdaValidateNodeProperty\n");
+
/* check for valid parameter */
if (Irp && KSProperty)
return STATUS_SUCCESS;