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