⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crossbarfilter.cpp

📁 完整的基于Conxant平台的USB电视棒的WIN驱动程序。
💻 CPP
字号:
/*+++ *******************************************************************\ 
* 
*  Copyright and Disclaimer: 
*  
*     --------------------------------------------------------------- 
*     This software is provided "AS IS" without warranty of any kind, 
*     either expressed or implied, including but not limited to the 
*     implied warranties of noninfringement, merchantability and/or 
*     fitness for a particular purpose.
*     --------------------------------------------------------------- 
*   
*     Copyright (c) 2008 Conexant Systems, Inc. 
*     All rights reserved. 
*
\******************************************************************* ---*/ 

#include "crossbarfilter.h"
#include "device.h"
#include "commonguid.h"


/**************************************************************************

    DESCRIPTOR AND DISPATCH LAYOUT

**************************************************************************/

//
// g_crossbar_filter_pin_descriptors:
//
// The list of pin descriptors on the filter.  
//
// These pin descriptors are ignored by the system.  There is only one here, and it's a 
// dummy pin.  Crossbar pins are defined in the crossbar property set.  See 
// CrossbarProperties and it's child classes.
//
const KSPIN_DESCRIPTOR_EX g_crossbar_filter_pin_descriptors[] = 
{
    //Pin 0: dummy pin
    {
        NULL,                               //Pin dispatch
        NULL,             
        {
            NULL,                           // Interfaces (NULL, 0 == default)
            0,
            NULL,                           // Mediums (NULL, 0 == default)
            0,
            0,                              // Range Count
            NULL,                           // Ranges
            KSPIN_DATAFLOW_OUT,             // Dataflow
            KSPIN_COMMUNICATION_NONE,       // Communication (both source and sink)
            NULL,                           // Category 
            NULL,                           // Name
            0                               // Reserved
        },
        
        KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT |
        KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING, //Pin Flags
        1,                                  // Instances Possible
        0,                                  // Instances Necessary
        NULL,                               // Allocator Framing
        NULL                                // Intersect handler
    }
};


/////////////////////////////////////////////////////////////////////////////////////////
//Crossbar property sets and automation table.
//
//The following table defines the property sets supported by the crossbar.
//Note that the handlers for each property are defined in the table.  If a handler 
// is NULL, it means that that get or set property is not supported.
//
DEFINE_KSPROPERTY_TABLE(g_crossbar_properties)
{
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_CROSSBAR_CAPS,                       // 1
        CrossbarProperties::static_getCapabilities,     // Get property handler
        sizeof(KSPROPERTY_CROSSBAR_CAPS_S),             // MinProperty
        sizeof(KSPROPERTY_CROSSBAR_CAPS_S),             // MinData
        NULL,                                           // Set property handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        sizeof(ULONG)                                   // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_CROSSBAR_PININFO,                    // 1
        CrossbarProperties::static_getPinInfo,          // get property handler
        sizeof(KSPROPERTY_CROSSBAR_PININFO_S),          // MinProperty
        sizeof(KSPROPERTY_CROSSBAR_PININFO_S),          // MinData
        NULL,                                           // set property handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        sizeof(ULONG)                                   // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_CROSSBAR_CAN_ROUTE,                  // 1
        CrossbarProperties::static_canRoute,            // get property handler
        sizeof(KSPROPERTY_CROSSBAR_ROUTE_S),            // MinProperty
        sizeof(KSPROPERTY_CROSSBAR_ROUTE_S),            // MinData
        NULL,                                           // set property handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        sizeof(ULONG)                                   // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_CROSSBAR_ROUTE,                      // 1
        CrossbarProperties::static_getRoute,            // get property handler
        sizeof(KSPROPERTY_CROSSBAR_ROUTE_S),            // MinProperty
        sizeof(KSPROPERTY_CROSSBAR_ROUTE_S),            // MinData
        CrossbarProperties::static_setRoute,            // set property handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        sizeof(ULONG)                                   // SerializedSize
    )
};

/////////////////////////////////////////////////////////////////////////////////////////
//Crossbar property set table.
//
DEFINE_KSPROPERTY_SET_TABLE(g_crossbar_property_sets)
{
    DEFINE_KSPROPERTY_SET
    (
        &PROPSETID_VIDCAP_CROSSBAR,                 // Set
        SIZEOF_ARRAY(g_crossbar_properties),        // PropertiesCount
        g_crossbar_properties,                      // PropertyItems
        0,                                          // FastIoCount
        NULL                                        // FastIoTable
    )
};

/////////////////////////////////////////////////////////////////////////////////////////
//Crossbar automation table.
//

DEFINE_KSAUTOMATION_TABLE(g_automation_table)
{
    DEFINE_KSAUTOMATION_PROPERTIES(g_crossbar_property_sets),
    DEFINE_KSAUTOMATION_METHODS_NULL,
    DEFINE_KSAUTOMATION_EVENTS_NULL
};

//
// g_crossbar_filter_descriptor:
//
// The descriptor for the crossbar filter.  
//
//Note that the "Reference GUID" parameter must match the one in the INF file
// in the "Interfaces" section unless a different reference string is supplied 
// in KsCreateFilterFactory.
//


const KSFILTER_DESCRIPTOR g_crossbar_filter_descriptor = 
{
    NULL,                                   // Dispatch Table
    &g_automation_table,                    // Automation Table
    KSFILTER_DESCRIPTOR_VERSION,            // Version
    0,                                      // Flags
    &XBAR_REFERENCE_GUID,                   // Reference GUID
    DEFINE_KSFILTER_PIN_DESCRIPTORS(g_crossbar_filter_pin_descriptors),
    DEFINE_KSFILTER_CATEGORY(KSCATEGORY_CROSSBAR),
    DEFINE_KSFILTER_NODE_DESCRIPTORS_NULL,
    DEFINE_KSFILTER_DEFAULT_CONNECTIONS,
    NULL                                    // Component ID
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -