📄 objdesc.cpp
字号:
/*++
Copyright (c) 1999 Microsoft Corporation
Module Name:
ObjDesc.cpp
Abstract:
Static object description data structures.
This file includes initial descriptors for all filter, pin, and node
objects exposed by this driver. It also include descriptors for the
properties, methods, and events on those objects.
--*/
#include "BDATuner.h"
#ifdef ALLOC_DATA_PRAGMA
#pragma const_seg("PAGECONST")
#endif // ALLOC_DATA_PRAGMA
#ifdef ALLOC_PRAGMA
#pragma code_seg("PAGE")
#endif // ALLOC_PRAGMA
//
// Before defining structures for nodes, pins, and filters,
// it may be useful to show the filter's template topology here.
//
// The sample filter's topology:
//
// Node Type 0 Node Type 1
// | |
// v v
// --------------- --------------------
// Antenna | | | | Transport
// In Pin --------| Tuner Node |--X--| Demodulator Node |------------ Out Pin
// ^ ^ | | ^ | | ^ ^
// | | --------------- | -------------------- | |
// | | | | |
// | -- Connection 0 -- Connection 1 -- Connection 2 |
// | Topology Joint |
// ---- Pin Type 0 Pin Type 1 ----
//
//
//===========================================================================
//
// Node definitions
//
// Nodes are special in that, though they are defined at the filter level,
// they are actually associated with a pin type. The filter's node
// descriptor list is actually a list of node types.
//
// BDA allows a node type to appear only once in a template topology.
// This means that a node in an actual filter topology can be uniquely
// identified by specifying the node type along with the actual input and
// output pin IDs of the the path that the node appears in.
//
// Note that the dispatch routines for nodes actually point to
// pin-specific methods because the context data associated with
// a node is stored in the pin context.
//
// Node property begin with a KSP_NODE structure that contains the node type of the node to which
// that property applies. This begs the question:
//
// "How is a node uniquely identified by only the node type?"
//
// The BDA Support Library uses the concept of a topology joint to solve
// this problem. Nodes upstream of a topology joint have their properties
// dispatched to the input pin of the path. Properties for nodes
// downstream of the joint are dispatched to the output pin of the path
// containing the node.
//
// Node properties and methods should only be accessed from the
// appropriate pin. The BDA Support Library helps assure this by
// automatically merging a node type's automation table onto the automation
// table of the correct pin. This pin is called the controlling pin
// for that node type.
//
//===========================================================================
typedef enum {
BDA_SAMPLE_TUNER_NODE = 0,
BDA_SAMPLE_DEMODULATOR_NODE
}BDA_SAMPLE_NODES;
//===========================================================================
//
// BDA Sample Tuner Node (Node Type 0) definitions
//
// Define structures here for the Properties, Methods, and Events
// available on the BDA Sample Tuner Node.
//
// This node is associated with an antenna input pin, therefore, the node
// properties should be set/retrieved using the antenna input pin. The
// BDA Support Library will automatically merge the node's automation
// table into the automation table for the antenna input pin.
//
// Properties and methods are dispatched to the Antenna class.
//
//===========================================================================
//
// BDA Sample Tune Frequency Filter
//
// Define dispatch routines for specific properties.
//
// One property is used to get and set the tuner's center frequency.
// For this property, define dispatch routines to get and set the frequency.
//
// Other properties can be used to get and set the tuner's frequency range,
// as well as to report signal strength.
//
// These properties must be supported by BDA and
// defined elsewhere (for example, in Bdamedia.h).
//
DEFINE_KSPROPERTY_TABLE(SampleTunerNodeFrequencyProperties)
{
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY(
CAntennaPin::GetCenterFrequency,
CAntennaPin::PutCenterFrequency
),
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY_MULTIPLIER(
NULL, NULL
),
#ifdef SATELLITE_TUNER
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_POLARITY(
NULL, NULL
),
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_RANGE(
NULL, NULL
),
#endif // SATELLITE_TUNER
#ifdef CHANNEL_BASED_TUNER
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_TRANSPONDER(
NULL, NULL
),
#endif // CHANNEL_BASED_TUNER
#ifdef DVBT_TUNER
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_BANDWIDTH(
NULL, NULL
),
#endif // DVBT_TUNER
};
//
// BDA Signal Statistics Properties
//
// Defines the dispatch routines for the Signal Statistics Properties
// on the RF Tuner, Demodulator, and PID Filter Nodes
//
DEFINE_KSPROPERTY_TABLE(SampleRFSignalStatsProperties)
{
#ifdef OPTIONAL_SIGNAL_STATISTICS
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_STRENGTH(
NULL, NULL
),
#endif // OPTIONAL_SIGNAL_STATISTICS
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_PRESENT(
CAntennaPin::GetSignalStatus,
NULL
),
};
//
// Define the Property Sets for the sample tuner node from the
// previously defined node properties and from property sets
// that BDA supports.
// These supported property sets must be defined elsewhere
// (for example, in Bdamedia.h).
//
// Associate the sample tuner node with the antenna input pin.
//
DEFINE_KSPROPERTY_SET_TABLE(SampleTunerNodePropertySets)
{
DEFINE_KSPROPERTY_SET
(
&KSPROPSETID_BdaFrequencyFilter, // Property Set defined elsewhere
SIZEOF_ARRAY(SampleTunerNodeFrequencyProperties), // Number of properties in the array
SampleTunerNodeFrequencyProperties, // Property set array
0, // FastIoCount
NULL // FastIoTable
),
DEFINE_KSPROPERTY_SET
(
&KSPROPSETID_BdaSignalStats, // Property Set defined elsewhere
SIZEOF_ARRAY(SampleRFSignalStatsProperties), // Number of properties in the array
SampleRFSignalStatsProperties, // Property set array
0, // FastIoCount
NULL // FastIoTable
)
};
//
// Define the Automation Table for the BDA sample tuner node.
//
DEFINE_KSAUTOMATION_TABLE(SampleTunerNodeAutomation) {
DEFINE_KSAUTOMATION_PROPERTIES(SampleTunerNodePropertySets),
DEFINE_KSAUTOMATION_METHODS_NULL,
DEFINE_KSAUTOMATION_EVENTS_NULL
};
//===========================================================================
//
// Sample Demodulator Node definitions
//
// This structure defines the Properties, Methods, and Events
// available on the BDA Demodulator Node.
//
// This node is associated with a transport output pin and thus the node
// properties should be set/put using the transport output pin.
//
//===========================================================================
//
// BDA Signal Statistics Properties for Demodulator Node
//
// Defines the dispatch routines for the Signal Statistics Properties
// on the Demodulator Node.
//
DEFINE_KSPROPERTY_TABLE(SampleDemodSignalStatsProperties)
{
#ifdef OPTIONAL_SIGNAL_STATISTICS
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_QUALITY(
NULL, NULL
),
#endif // OPTIONAL_SIGNAL_STATISTICS
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_LOCKED(
CTransportPin::GetSignalStatus,
NULL
),
};
DEFINE_KSPROPERTY_TABLE(SampleAutoDemodProperties)
{
DEFINE_KSPROPERTY_ITEM_BDA_AUTODEMODULATE_START(
NULL,
CTransportPin::PutAutoDemodProperty
),
DEFINE_KSPROPERTY_ITEM_BDA_AUTODEMODULATE_STOP(
NULL,
CTransportPin::PutAutoDemodProperty
)
};
#if !ATSC_RECEIVER
//
// BDA Digital Demodulator Property Set for Demodulator Node
//
// Defines the dispatch routines for the Digital Demodulator Properties
// on the Demodulator Node.
//
DEFINE_KSPROPERTY_TABLE(SampleDigitalDemodProperties)
{
DEFINE_KSPROPERTY_ITEM_BDA_MODULATION_TYPE(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
DEFINE_KSPROPERTY_ITEM_BDA_INNER_FEC_TYPE(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
DEFINE_KSPROPERTY_ITEM_BDA_INNER_FEC_RATE(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
DEFINE_KSPROPERTY_ITEM_BDA_OUTER_FEC_TYPE(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
DEFINE_KSPROPERTY_ITEM_BDA_OUTER_FEC_RATE(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
DEFINE_KSPROPERTY_ITEM_BDA_SYMBOL_RATE(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
#if DVBS_RECEIVER
DEFINE_KSPROPERTY_ITEM_BDA_SPECTRAL_INVERSION(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
#endif // DVBS_RECEIVER
#if DVBT_RECEIVER
DEFINE_KSPROPERTY_ITEM_BDA_GUARD_INTERVAL(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
),
DEFINE_KSPROPERTY_ITEM_BDA_TRANSMISSION_MODE(
CTransportPin::GetDigitalDemodProperty,
CTransportPin::PutDigitalDemodProperty
)
#endif // DVBT_RECEIVER
};
#endif // !ATSC_RECEIVER
//
// Sample Demodulator Node Extension Properties
//
// Define dispatch routines for a set of driver specific
// demodulator node properties. This is how venders add support
// for properties that are specific to their hardware. They can
// access these properties through a KSProxy plugin.
//
DEFINE_KSPROPERTY_TABLE(BdaSampleDemodExtensionProperties)
{
DEFINE_KSPROPERTY_ITEM_BDA_SAMPLE_DEMOD_EXTENSION_PROPERTY1( // A read and write property
CTransportPin::GetExtensionProperties, // or NULL if not method to get the property
CTransportPin::PutExtensionProperties // or NULL if not method to put the property
),
DEFINE_KSPROPERTY_ITEM_BDA_SAMPLE_DEMOD_EXTENSION_PROPERTY2( //A read only property
CTransportPin::GetExtensionProperties, // or NULL if not method to get the property
NULL // or NULL if not method to put the property
),
DEFINE_KSPROPERTY_ITEM_BDA_SAMPLE_DEMOD_EXTENSION_PROPERTY3( //A write only property
NULL, // or NULL if not method to get the property
CTransportPin::PutExtensionProperties // or NULL if not method to put the property
),
};
//
// Demodulator Node Property Sets supported
//
// This table defines all property sets supported by the
// Demodulator Node associated with the transport output pin.
//
DEFINE_KSPROPERTY_SET_TABLE(SampleDemodNodePropertySets)
{
DEFINE_KSPROPERTY_SET
(
&KSPROPSETID_BdaAutodemodulate, // Set
SIZEOF_ARRAY(SampleAutoDemodProperties), // PropertiesCount
SampleAutoDemodProperties, // PropertyItems
0, // FastIoCount
NULL // FastIoTable
),
#if !ATSC_RECEIVER
DEFINE_KSPROPERTY_SET
(
&KSPROPSETID_BdaDigitalDemodulator, // Set
SIZEOF_ARRAY(SampleDigitalDemodProperties), // PropertiesCount
SampleDigitalDemodProperties, // PropertyItems
0, // FastIoCount
NULL // FastIoTable
),
#endif // !ATSC_RECEIVER
DEFINE_KSPROPERTY_SET
(
&KSPROPSETID_BdaSignalStats, // Set
SIZEOF_ARRAY(SampleDemodSignalStatsProperties), // PropertiesCount
SampleDemodSignalStatsProperties, // PropertyItems
0, // FastIoCount
NULL // FastIoTable
),
DEFINE_KSPROPERTY_SET
(
&KSPROPSETID_BdaSampleDemodExtensionProperties, // Set
SIZEOF_ARRAY(BdaSampleDemodExtensionProperties), // Number of properties in the array
BdaSampleDemodExtensionProperties, // Property set array
0, // FastIoCount
NULL // FastIoTable
),
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -