- fix build on dbg=0. Thanks to Andrew
[reactos.git] / reactos / drivers / multimedia / avtest / entry.c
1 #include <debug.h>
2 #include <ks.h>
3
4 /* Where do we go? */
5 #ifndef SIZEOF_ARRAY
6 #define SIZEOF_ARRAY(array) \
7 (sizeof(array) / sizeof(array[0]))
8 #endif
9
10 /* Not in the DDK but hey! */
11 #define DEFINE_KSFILTER_DISPATCH(name) \
12 const KSFILTER_DISPATCH name =
13
14 /* To be put in KS.H */
15 #define DEFINE_KSFILTER_DESCRIPTOR(name) \
16 const KSFILTER_DESCRIPTOR name =
17
18 #define DEFINE_KSFILTER_DESCRIPTOR_TABLE(name) \
19 const KSFILTER_DESCRIPTOR* const name[] =
20
21
22
23 NTSTATUS FilterCreate(
24 IN OUT PKSFILTER Filter,
25 IN PIRP Irp)
26 {
27 return STATUS_SUCCESS;
28 }
29
30 NTSTATUS FilterClose(
31 IN OUT PKSFILTER Filter,
32 IN PIRP Irp)
33 {
34 return STATUS_SUCCESS;
35 }
36
37 NTSTATUS Process(
38 IN PKSFILTER Filter,
39 IN PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex)
40 {
41 return STATUS_SUCCESS;
42 }
43
44
45 DEFINE_KSFILTER_DISPATCH(FilterDispatch)
46 {
47 FilterCreate,
48 FilterClose,
49 Process,
50 NULL // Reset
51 };
52
53 DEFINE_KSFILTER_DESCRIPTOR(FilterDesc)
54 {
55 };
56
57 DEFINE_KSFILTER_DESCRIPTOR_TABLE(FilterDescs)
58 {
59 &FilterDesc
60 };
61
62
63
64 const KSDEVICE_DESCRIPTOR DeviceDescriptor =
65 {
66 NULL,
67 SIZEOF_ARRAY(FilterDescs),
68 FilterDescs
69 };
70
71
72 /* Funcs */
73
74 NTSTATUS STDCALL
75 DriverEntry(
76 IN PDRIVER_OBJECT DriverObject,
77 IN PUNICODE_STRING RegistryPathName)
78 {
79 DPRINT1("AVStream test component loaded!\n");
80
81 return KsInitializeDriver(DriverObject, RegistryPathName,
82 &DeviceDescriptor);
83 }