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

📄 objdesc.cpp

📁 winddk src目录下的WDM源码压缩!
💻 CPP
📖 第 1 页 / 共 3 页
字号:
    //  Additional property sets for the node can be added here.
    //
};


//
//  Demodulator Node Automation Table
//
//  This structure defines the Properties, Methods, and Events
//  available on the BDA Demodulator Node.
//  These are used to set the symbol rate, and Viterbi rate,
//  as well as to report signal lock and signal quality.
//
DEFINE_KSAUTOMATION_TABLE(SampleDemodulatorNodeAutomation) {
    DEFINE_KSAUTOMATION_PROPERTIES( SampleDemodNodePropertySets),
    DEFINE_KSAUTOMATION_METHODS_NULL,
    DEFINE_KSAUTOMATION_EVENTS_NULL
};


//===========================================================================
//
//  Antenna Pin Definitions
//
//===========================================================================

//
//  The BDA Support Library automatically merges the RF tuner node properties,
//  methods, and events onto the antenna pin's automation table. It also
//  merges properties, methods, and events the that are require and
//  supplied by the BDA Support Library.
//

//  
//  The hardware vendor may want to provide driver specific properties,
//  methods, or events on the antenna pin or override those provided by
//  the BDA Support Library.  Such roperties, methods, and events will
//  be defined here.
//

//
//  Define the Automation Table for the antenna pin.
//
//
DEFINE_KSAUTOMATION_TABLE(AntennaAutomation) {
    DEFINE_KSAUTOMATION_PROPERTIES_NULL,
    DEFINE_KSAUTOMATION_METHODS_NULL,
    DEFINE_KSAUTOMATION_EVENTS_NULL
};


//
//  Dispatch Table for the antenna pin.
//
const
KSPIN_DISPATCH
AntennaPinDispatch =
{
    CAntennaPin::PinCreate,  // Create
    CAntennaPin::PinClose,  // Close
    NULL,  // Process siganl data
    NULL,  // Reset
    NULL,  // SetDataFormat
    CAntennaPin::PinSetDeviceState,  // SetDeviceState
    NULL,  // Connect
    NULL,  // Disconnect
    NULL,  // Clock
    NULL   // Allocator
};


//
//  Format the input antenna stream connection.
//
//  Used to connect the input antenna pin to a specific upstream filter,
//  such as the network provider.
//
const KS_DATARANGE_BDA_ANTENNA AntennaPinRange =
{
   // insert the KSDATARANGE and KSDATAFORMAT here
    {
        sizeof( KS_DATARANGE_BDA_ANTENNA), // FormatSize
        0,                                 // Flags - (N/A)
        0,                                 // SampleSize - (N/A)
        0,                                 // Reserved
        { STATIC_KSDATAFORMAT_TYPE_BDA_ANTENNA },  // MajorFormat
        { STATIC_KSDATAFORMAT_SUBTYPE_NONE },  // SubFormat
        { STATIC_KSDATAFORMAT_SPECIFIER_NONE } // Specifier
    }
};

//  Format Ranges of Antenna Input Pin.
//
static PKSDATAFORMAT AntennaPinRanges[] =
{
    (PKSDATAFORMAT) &AntennaPinRange,

    // Add more formats here if additional antenna signal formats are supported.
    //
};


//===========================================================================
//
//  Transport Output Pin Definitions
//
//===========================================================================

//
//  The BDA Support Library automatically merges the RF tuner node properties,
//  methods, and events onto the antenna pin's automation table. It also
//  merges properties, methods, and events the that are require and
//  supplied by the BDA Support Library.
//

//  
//  The hardware vendor may want to provide driver specific properties,
//  methods, or events on the antenna pin or override those provided by
//  the BDA Support Library.  Such roperties, methods, and events will
//  be defined here.
//

//
//  Define the Automation Table for the transport pin.
//
//
DEFINE_KSAUTOMATION_TABLE(TransportAutomation) {
    DEFINE_KSAUTOMATION_PROPERTIES_NULL,
    DEFINE_KSAUTOMATION_METHODS_NULL,
    DEFINE_KSAUTOMATION_EVENTS_NULL
};

//
//  Dispatch Table for the transport Output pin.
//
//  Since data on the transport is actually delivered to the
//  PCI bridge in hardware, this pin does not process data.
//
//  Connection of, and state transitions on, this pin help the
//  driver to determine when to allocate hardware resources for
//  each node.
//
const
KSPIN_DISPATCH
TransportPinDispatch =
{
    CTransportPin::PinCreate,     // Create
    CTransportPin::PinClose,      // Close
    NULL,                               // Process
    NULL,                               // Reset
    NULL,                               // SetDataFormat
    NULL,                               //SetDeviceState
    NULL,                               // Connect
    NULL,                               // Disconnect
    NULL,                               // Clock
    NULL                                // Allocator
};


//
//  Format the output Transport Stream Connection
//
//  Used to connect the output pin to a specific downstream filter
//
const KS_DATARANGE_BDA_TRANSPORT TransportPinRange =
{
   // insert the KSDATARANGE and KSDATAFORMAT here
    {
        sizeof( KS_DATARANGE_BDA_TRANSPORT),               // FormatSize
        0,                                                 // Flags - (N/A)
        0,                                                 // SampleSize - (N/A)
        0,                                                 // Reserved
        { STATIC_KSDATAFORMAT_TYPE_STREAM },               // MajorFormat
        { STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT },      // SubFormat
        { STATIC_KSDATAFORMAT_SPECIFIER_BDA_TRANSPORT }    // Specifier
    },
    // insert the BDA_TRANSPORT_INFO here
    {
        188,        //  ulcbPhyiscalPacket
        312 * 188,  //  ulcbPhyiscalFrame
        0,          //  ulcbPhyiscalFrameAlignment (no requirement)
        0           //  AvgTimePerFrame (not known)
    }
};

//  Format Ranges of Transport Output Pin.
//
static PKSDATAFORMAT TransportPinRanges[] =
{
    (PKSDATAFORMAT) &TransportPinRange,

    // Add more formats here if additional transport formats are supported.
    //
};


//  Medium GUIDs for the Transport Output Pin.
//
//  This insures contection to the correct Capture Filter pin.
//
// {F102C41F-7FA1-4842-A0C8-DC41176EC844}
#define GUID_BdaSWRcv   0xf102c41f, 0x7fa1, 0x4842, 0xa0, 0xc8, 0xdc, 0x41, 0x17, 0x6e, 0xc8, 0x44
const KSPIN_MEDIUM TransportPinMedium =
{
    GUID_BdaSWRcv, 0, 0
};


//===========================================================================
//
//  Filter  definitions
//
//  Define arrays here that contain the types of nodes and pins that are possible for the filter 
//  Define structures here that describe Properties, Methods, and Events available on the filter
//
//  Properties can be used to set and retrieve information for the filter.
//  Methods can be used to perform operations on the filter. 
//
//===========================================================================

//
//  Template Node Descriptors
//
//  Define an array that contains all the node types that are available in the template
//  topology of the filter.
//  These node types must be supported by BDA and 
//  defined elsewhere (for example, in Bdamedia.h).
//
const
KSNODE_DESCRIPTOR
NodeDescriptors[] =
{
    {
        &SampleTunerNodeAutomation, // Point to KSAUTOMATION_TABLE structure for the node's automation table
        &KSNODE_BDA_RF_TUNER, // Point to the guid that defines function of the node
        NULL // Point to the guid that represents the name of the topology node
    },
#if ATSC_RECEIVER
    {
        &SampleDemodulatorNodeAutomation, // Point to KSAUTOMATION_TABLE 
        &KSNODE_BDA_8VSB_DEMODULATOR, // Point to the guid that defines the topology node
        NULL // Point to the guid that represents the name of the topology node
    }
#elif DVBS_RECEIVER
    {
        &SampleDemodulatorNodeAutomation, // Point to KSAUTOMATION_TABLE 
        &KSNODE_BDA_QPSK_DEMODULATOR, // Point to the guid that defines the topology node
        NULL // Point to the guid that represents the name of the topology node
    }
#elif DVBT_RECEIVER
    {
        &SampleDemodulatorNodeAutomation, // Point to KSAUTOMATION_TABLE 
        &KSNODE_BDA_COFDM_DEMODULATOR, // Point to the guid that defines the topology node
        NULL // Point to the guid that represents the name of the topology node
    }
#elif CABLE_RECEIVER
    {
        &SampleDemodulatorNodeAutomation, // Point to KSAUTOMATION_TABLE 
        &KSNODE_BDA_QAM_DEMODULATOR, // Point to the guid that defines the topology node
        NULL // Point to the guid that represents the name of the topology node
    }
#endif
};


//
//  Initial Pin Descriptors
//
//  This data structure defines the pins that will appear on the filer
//  when it is first created.
//
//  All BDA filters should expose at lease one input pin to insure that
//  the filter can be properly inserted in a BDA receiver graph.  The
//  initial pins can be created in a number of ways.
//
//  The initial filters descriptor passed in to BdaInitFilter can include
//  a list of n pin descriptors that correspond to the first n of m pin
//  descriptors in the template filter descriptor.  This list of pin
//  descriptors will usually only include those input pins that are
//  ALWAYS exposed by the filter in question.
//
//  Alternatively, the driver may call BdaCreatePin from its filter Create
//  dispatch function for each pin that it ALWAYS wants exposed.
//
//  This filter uses an initial filter descriptor to force the Antenna
//  input pin to always be exposed.
//
const
KSPIN_DESCRIPTOR_EX
InitialPinDescriptors[] =
{
    //  Antenna Input Pin
    //
    {
        &AntennaPinDispatch,   // Point to the dispatch table for the input pin
        &AntennaAutomation,   // Point to the automation table for the input pin
        {  // Specify members of a KSPIN_DESCRIPTOR structure for the input pin
            0,  // Interfaces
            NULL,
            0,  // Mediums
            NULL,
            SIZEOF_ARRAY(AntennaPinRanges),
            AntennaPinRanges,  
            KSPIN_DATAFLOW_IN,  // specifies that data flow is into the pin
            KSPIN_COMMUNICATION_BOTH, // specifies that the pin factory instantiates pins 
                                                                               // that are both IRP sinks and IRP sources
            NULL,   //  Category GUID
            NULL,   // GUID of the localized Unicode string name for the pin type
            0
        },  // Specify flags
        KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT | 
            KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | 
            KSPIN_FLAG_FIXED_FORMAT,
        1,  // Specify the maximum number of possible instances of the input pin
        1,      // Specify the number of instances of this pin type that are necessary for proper functioning of this filter
        NULL,   // Point to KSALLOCATOR_FRAMING_EX structure for allocator framing
        CAntennaPin::IntersectDataFormat    // Point to the data intersection handler function
    }
};


//
//  Template Pin Descriptors
//
//  This data structure defines the pin types available in the filters
//  template topology.  These structures will be used to create a
//  KDPinFactory for a pin type when BdaCreatePin or BdaMethodCreatePin
//  are called.
//
//  This structure defines ALL pins the filter is capable of supporting,
//  including those pins which may only be created dynamically by a ring
//  3 component such as a Network Provider.
//
//
const
KSPIN_DESCRIPTOR_EX
TemplatePinDescriptors[] =
{
    //  Antenna Input Pin
    //
    {
        &AntennaPinDispatch,   // Point to the dispatch table for the input pin
        &AntennaAutomation,   // Point to the automation table for the input pin
        {  // Specify members of a KSPIN_DESCRIPTOR structure for the input pin
            0,  // Interfaces
            NULL,
            0,  // Mediums
            NULL,
            SIZEOF_ARRAY(AntennaPinRanges),
            AntennaPinRanges,  
            KSPIN_DATAFLOW_IN,  // specifies that data flow is into the pin
            KSPIN_COMMUNICATION_BOTH, // specifies that the pin factory instantiates pins 
                                                                               // that are both IRP sinks and IRP sources
            NULL,   //  Category GUID
            NULL,   // GUID of the localized Unicode string name for the pin type
            0
        },  // Specify flags
        KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT | 
            KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | 
            KSPIN_FLAG_FIXED_FORMAT,
        1,  // Specify the maximum number of possible instances of the input pin
        1,  // Specify the number of instances of this pin type that are necessary for proper functioning of this filter
        NULL,   // Point to KSALLOCATOR_FRAMING_EX structure for allocator framing
        CAntennaPin::IntersectDataFormat    // Point to the data intersection handler function
    },

    //  Tranport Output Pin
    //
    {
        &TransportPinDispatch,   // Point to the dispatch table for the output pin
        &TransportAutomation,   // Point to the automation table for the output pin
        {  // Specify members of a KSPIN_DESCRIPTOR structure for the output pin
            0,  // Interfaces
            NULL,
            1,  // Mediums
            &TransportPinMedium,
            SIZEOF_ARRAY(TransportPinRanges),
            TransportPinRanges,
//            0,
//            NULL,
            KSPIN_DATAFLOW_OUT, // specifies that data flow is out of the pin
            KSPIN_COMMUNICATION_BOTH, // specifies that the pin factory instantiates pins 
                                                                               // that are both IRP sinks and IRP sources
//            NULL,//Name
//            NULL,//Category
            (GUID *) &PINNAME_BDA_TRANSPORT,   //  Category GUID
            (GUID *) &PINNAME_BDA_TRANSPORT,   // GUID of the localized Unicode string 
                                                                                              // name for the pin type
            0
        },  // Specify flags
        KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT | 
            KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | 
            KSPIN_FLAG_FIXED_FORMAT,
        1,  // Specify the maximum number of possible instances of the output pin

⌨️ 快捷键说明

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