Example #1
0
    NULL,                                   // Filter Process
    NULL                                    // Filter Reset
};


//
// CaptureFilterDescription:
//
// The descriptor for the capture filter.  We don't specify any topology
// since there's only one pin on the filter.  Realistically, there would
// be some topological relationships here because there would be input 
// pins from crossbars and the like.
//
const 
KSFILTER_DESCRIPTOR 
CaptureFilterDescriptor = {
    &CaptureFilterDispatch,                 // Dispatch Table
    NULL,                                   // Automation Table
    KSFILTER_DESCRIPTOR_VERSION,            // Version
    0,                                      // Flags
    &KSNAME_Filter,                         // Reference GUID
    DEFINE_KSFILTER_PIN_DESCRIPTORS (CaptureFilterPinDescriptors),
    DEFINE_KSFILTER_CATEGORIES (CaptureFilterCategories),
    0,
    sizeof (KSNODE_DESCRIPTOR),
    NULL,
    0,
    NULL,
    NULL                                    // Component ID
};
//
// The descriptor for the capture filter.  We don't specify any topology
// since there's only one pin on the filter.  Realistically, there would
// be some topological relationships here because there would be input
// pins from crossbars and the like.
//
const
KSFILTER_DESCRIPTOR
AvsCameraFilterDescriptor =
{
    &AvsCameraFilterDispatch,               // Dispatch Table
    &AvsCameraFilterAutomationTable,        // Automation Table
    KSFILTER_DESCRIPTOR_VERSION,            // Version
    KSFILTER_FLAG_PRIORITIZE_REFERENCEGUID, // Flags
    &AvsCam_RearCamera_Filter,                 // Reference GUID
    DEFINE_KSFILTER_PIN_DESCRIPTORS(PinDescriptors),
    DEFINE_KSFILTER_CATEGORIES(FilterCategories),
    0,
    sizeof (KSNODE_DESCRIPTOR),
    NULL,
    0,
    NULL,
    NULL                                    // Component ID
};

const
KSFILTER_DESCRIPTOR
AvsCameraFilterDescriptorFFC =
{
    &AvsCameraFilterDispatch,               // Dispatch Table
    &AvsCameraFilterAutomationTableFFC,     // Automation Table
KSTOPOLOGY_CONNECTION gConnections[] = 
{
    { KSFILTER_NODE,  0,    0, 1},
    { 0, 0,   KSFILTER_NODE,   1}
};

// Filter描述符表。设备描述符中可以包含一组Filter描述符。
// 根据需要,描述符的个数可以是0个或者多个。下表仅包含唯一的Filter描述符。
const KSFILTER_DESCRIPTOR gSplitterFilter = 
{
    &gFilterDispatch,                        // Dispatch Table
    NULL,                                    // Automation Table
    KSFILTER_DESCRIPTOR_VERSION,            // Version
    KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING,// Flags
    &KSNAME_Filter,                            // Reference GUID
    DEFINE_KSFILTER_PIN_DESCRIPTORS (gPins),
    DEFINE_KSFILTER_CATEGORIES (gFilterCategories),
    DEFINE_KSFILTER_NODE_DESCRIPTORS(gNodes),
    DEFINE_KSFILTER_CONNECTIONS(gConnections),
    NULL                                    // Component ID
};

DEFINE_KSFILTER_DESCRIPTOR_TABLE (gKsFilters) 
{
    &gSplitterFilter
};

// ===============================设备描述符

const KSDEVICE_DESCRIPTOR gKsSplitterDevice = 
{