ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

splitter.c
Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT:       See COPYING in the top level directory
00003  * PROJECT:         ReactOS Kernel Streaming
00004  * FILE:            drivers/wdm/audio/filters/splitter/splitter.c
00005  * PURPOSE:         Splitter entry point
00006  * PROGRAMMER:      Johannes Anderwald
00007  */
00008 
00009 #include "precomp.h"
00010 
00011 const GUID PIN_VIDEO_CAPTURE = {0xfb6c4281, 0x0353, 0x11d1, {0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba}};
00012 const GUID KSPROPSETID_Audio = {0x45FFAAA0, 0x6E1B, 0x11D0, {0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}};
00013 const GUID KSCATEGORY_AUDIO_SPLITTER = {0x9EA331FA, 0xB91B, 0x45F8, {0x92, 0x85, 0xBD, 0x2B, 0xC7, 0x7A, 0xFC, 0xDE}};
00014 const GUID KSNAME_Filter     = {0x9b365890, 0x165f, 0x11d0, {0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4}};
00015 const GUID GUID_NULL = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
00016 
00017 
00018 KSPROPERTY_ITEM
00019 PinPropertyTable[] =
00020 {
00021     {
00022         KSPROPERTY_AUDIO_POSITION,
00023         {AudioPositionPropertyHandler},
00024         sizeof(KSPROPERTY),
00025         sizeof(KSAUDIO_POSITION),
00026         {AudioPositionPropertyHandler},
00027         NULL,
00028         0,
00029         NULL,
00030         NULL,
00031         0
00032     }
00033 };
00034 
00035 const
00036 KSPROPERTY_SET
00037 PinPropertySet[] =
00038 {
00039     {
00040         &KSPROPSETID_Audio,
00041         1,
00042         PinPropertyTable,
00043         0,
00044         NULL
00045     }
00046 };
00047 
00048 
00049 const
00050 KSAUTOMATION_TABLE
00051 PinAutomation =
00052 {
00053     1,
00054     sizeof(PinPropertySet) / sizeof(KSPROPERTY_SET),
00055     (const KSPROPERTY_SET*)&PinPropertySet,
00056     0,
00057     sizeof(KSMETHOD_SET),
00058     NULL,
00059     0,
00060     sizeof(KSEVENT_SET),
00061     NULL
00062 };
00063 
00064 const
00065 KSPIN_DISPATCH
00066 PinDispatch =
00067 {
00068     PinCreate,
00069     PinClose,
00070     NULL, /* filter centric processing */
00071     PinReset,
00072     NULL,
00073     PinState,
00074     NULL,
00075     NULL,
00076     NULL,
00077     NULL
00078 };
00079 
00080 
00081 const
00082 KSFILTER_DISPATCH
00083 FilterDispatch =
00084 {
00085     NULL,
00086     NULL,
00087     FilterProcess,
00088     NULL
00089 };
00090 
00091 KSDATARANGE
00092 PinDataFormatRange =
00093 {
00094     {
00095         sizeof(KSDATARANGE),
00096         0,
00097         0,
00098         0,
00099         {STATIC_KSDATAFORMAT_TYPE_AUDIO},
00100         {STATIC_GUID_NULL},
00101         {STATIC_GUID_NULL}
00102     }
00103 };
00104 
00105 const
00106 PKSDATARANGE
00107 PinDataFormatRanges[] =
00108 {
00109     &PinDataFormatRange
00110 };
00111 
00112 #if 0
00113 const
00114 KSALLOCATOR_FRAMING_EX
00115 AllocatorFraming = 
00116 {
00117     1,
00118     0,
00119     {
00120         1,
00121         1,
00122         0
00123     },
00124     0,
00125     {
00126         {STATIC_KSMEMORY_TYPE_KERNEL_PAGED},
00127         {STATIC_GUID_NULL},
00128         KSALLOCATOR_REQUIREMENTF_MUST_ALLOCATE,
00129         0,
00130         0, //KSALLOCATOR_REQUIREMENTF_PREFERENCES_ONLY | KSALLOCATOR_FLAG_INSIST_ON_FRAMESIZE_RATIO | KSALLOCATOR_OPTIONF_VALID
00131         8,
00132         FILE_64_BYTE_ALIGNMENT,
00133         0,
00134         {
00135             0,
00136             MAXULONG,
00137             1
00138         },
00139         {
00140             {
00141                 1536, // (48000khz * 2 channels * 16bit / 1000 ) * 8 frames
00142                 1536,
00143                 1
00144             },
00145             0,
00146             0
00147         }
00148     }
00149 };
00150 #endif
00151 
00152 const
00153 KSPIN_DESCRIPTOR_EX
00154 PinDescriptors[] =
00155 {
00156     {
00157         &PinDispatch,
00158         &PinAutomation,
00159         {
00160             0, //no interfaces
00161             NULL,
00162             0, // no mediums
00163             NULL,
00164             sizeof(PinDataFormatRange) / sizeof(PKSDATARANGE),
00165             (const PKSDATARANGE*)&PinDataFormatRange,
00166             KSPIN_DATAFLOW_OUT,
00167             KSPIN_COMMUNICATION_BOTH,
00168             NULL,
00169             (const GUID*)&PIN_VIDEO_CAPTURE,
00170             {
00171                 0,
00172             }
00173         },
00174         KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING | KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL |
00175         KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | KSPIN_FLAG_PROCESS_IF_ANY_IN_RUN_STATE,
00176         MAXULONG,
00177         1,
00178         NULL, //&AllocatorFraming,
00179         PinIntersectHandler
00180     },
00181     {
00182         &PinDispatch,
00183         &PinAutomation,
00184         {
00185             0, //no interfaces
00186             NULL,
00187             0, // no mediums
00188             NULL,
00189             1,
00190             (const PKSDATARANGE*)&PinDataFormatRange,
00191             KSPIN_DATAFLOW_IN,
00192             KSPIN_COMMUNICATION_BOTH,
00193             NULL,
00194             NULL,
00195             {
00196                 0
00197             }
00198         },
00199         KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING | KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL | KSPIN_FLAG_PROCESS_IF_ANY_IN_RUN_STATE,
00200         1,
00201         1,
00202         NULL, //&AllocatorFraming,
00203         PinIntersectHandler
00204     }
00205 };
00206 const
00207 GUID
00208 Categories[] =
00209 {
00210     {STATIC_KSCATEGORY_AUDIO},
00211     {STATIC_KSCATEGORY_AUDIO_SPLITTER}
00212 };
00213 
00214 
00215 const
00216 KSNODE_DESCRIPTOR
00217 NodeDescriptor[] = 
00218 {
00219     {
00220         NULL, //automation table
00221         &KSCATEGORY_AUDIO_SPLITTER, //type
00222         NULL // name
00223     }
00224 };
00225 
00226 
00227 const
00228 KSFILTER_DESCRIPTOR
00229 FilterDescriptor =
00230 {
00231     &FilterDispatch,
00232     NULL,
00233     KSFILTER_DESCRIPTOR_VERSION,
00234     KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING,
00235     &KSNAME_Filter,
00236     2,
00237     sizeof(KSPIN_DESCRIPTOR_EX),
00238     (const KSPIN_DESCRIPTOR_EX*)&PinDescriptors,
00239     sizeof(Categories) / sizeof(GUID),
00240     (const GUID* )&Categories,
00241     sizeof(NodeDescriptor) / sizeof(KSNODE_DESCRIPTOR),
00242     sizeof(KSNODE_DESCRIPTOR),
00243     (const KSNODE_DESCRIPTOR*)&NodeDescriptor,
00244     DEFINE_KSFILTER_DEFAULT_CONNECTIONS,
00245     NULL
00246 };
00247 
00248 const
00249 KSFILTER_DESCRIPTOR *
00250 FilterDescriptors =
00251 {
00252     (const KSFILTER_DESCRIPTOR *)&FilterDescriptor
00253 };
00254 
00255 const
00256 KSDEVICE_DESCRIPTOR
00257 DeviceDescriptor =
00258 {
00259     NULL, //no pnp notifications needed
00260     1, // filter descriptor count
00261     (const KSFILTER_DESCRIPTOR * const *)&FilterDescriptors,
00262     0, // pre KSDEVICE_DESCRIPTOR_VERSION
00263     0
00264 };
00265 
00266 
00267 NTSTATUS
00268 NTAPI
00269 DriverEntry(
00270     PDRIVER_OBJECT DriverObject,
00271     PUNICODE_STRING RegistryPathName)
00272 {
00273     return KsInitializeDriver(DriverObject, RegistryPathName, &DeviceDescriptor);
00274 }

Generated on Sun May 27 2012 04:17:23 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.