📄 bda_descriptors.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 "BdaTunerFilter.h"
#include "BdaTunerProp.h"
#include "pinDataRanges.h"
#include "commonGuid.h"
#include "debug.h"
/////////////////////////////////////////////////////////////////////////////////////////
//BDA tuner filter descriptor
/////////////////////////////////////////////////////////////////////////////////////////
//This file has all the descriptors needed to register the BDA tuner filter.
//Here is a list of the descriptors included:
//
// (1) g_bda_tuner_filter_dispatch - Dispatch functions for the filter object.
// (2) g_bda_changes_methods - Method set for the filter object
// (3) g_bda_config_methods - Method set for the filter object.
// (4) g_bda_tuner_methods - table of method sets for the filter object
// (5) g_bda_tuner_filter_automation - automation table for the filter object
// (6) g_bda_frequency_properties - Property set for getting and setting the tuner frequency
// (7) g_signal_stats_properties - Property set for retrieving the signal status
// (8) g_demod_node_properties - property sets handled by the filter's demod node
// (9) g_demod_node_automation - automation table for the filter's demod node
// (10) g_tuner_node_properties - property sets handled by the filter's tuner node
// (11) g_tuner_node_automation - automation table for the filter's tuner node
// (12) g_atsc_bda_node_descriptors - node descriptors for the ATSC filter
// (13) g_bda_filter_topology - topology for the filter
// (14) g_bda_pin_descriptors - pin descriptors for the filter
// (15) g_atsc_bda_filter_descriptor - filter descriptor
// (16) g_bda_node_joints - Needed for the pin pairings
// (17) g_bda_filter_pin_pairings - Needed for the filter template
// (18) g_atsc_bda_filter_template - filter template
//Filter dispatch structure for the BDA tuner
const KSFILTER_DISPATCH g_bda_tuner_filter_dispatch =
{
BdaTunerFilter::static_Create, // Create
BdaTunerFilter::static_Close, // Close
NULL, // Process
NULL // Reset
};
//
// BDA Change Sync Method Set
//
// The Change Sync Method Set is required on BDA filters. Setting a
// node property should not become effective on the underlying device
// until commitChanges is called.
//
// The BDA Support Library provides routines that handle committing
// changes to topology. The BDA Support Library routines should be
// called from the driver's implementation before the driver implementation
// returns.
//
DEFINE_KSMETHOD_TABLE(g_bda_changes_methods)
{
DEFINE_KSMETHOD_ITEM_BDA_START_CHANGES(
BdaTunerFilter::static_BdaStartChanges, // Calls BdaStartChanges
NULL ),
DEFINE_KSMETHOD_ITEM_BDA_CHECK_CHANGES(
BdaTunerFilter::static_BdaCheckChanges, // Calls BdaCheckChanges,
NULL),
DEFINE_KSMETHOD_ITEM_BDA_COMMIT_CHANGES(
BdaTunerFilter::static_BdaCommitChanges, // Calls BdaCommitChanges
NULL ),
DEFINE_KSMETHOD_ITEM_BDA_GET_CHANGE_STATE(
BdaTunerFilter::static_BdaGetChangeState, // Calls BdaGetChangeState
NULL )
};
//
// BDA Device Configuration Method Set
//
// The BDA Support Library provides a default implementation of
// the BDA Device Configuration Method Set. In this example, the
// driver overrides the createTopology method. Note that the
// support libraries createTopology method is called before the
// driver's implementation returns.
//
DEFINE_KSMETHOD_TABLE(g_bda_config_methods)
{
DEFINE_KSMETHOD_ITEM_BDA_CREATE_TOPOLOGY(
BdaMethodCreateTopology,
NULL )
};
//Filter Methods for the BDA tuner filter
DEFINE_KSMETHOD_SET_TABLE(g_bda_tuner_methods)
{
DEFINE_KSMETHOD_SET(
&KSMETHODSETID_BdaChangeSync, // Method set GUID
SIZEOF_ARRAY(g_bda_changes_methods), // Number of methods
g_bda_changes_methods, // Array of KSMETHOD_ITEM structures
0, // FastIoCount
NULL ), // FastIoTable
DEFINE_KSMETHOD_SET(
&KSMETHODSETID_BdaDeviceConfiguration, // Method set GUID
SIZEOF_ARRAY(g_bda_config_methods), // Number of methods
g_bda_config_methods, // Array of KSMETHOD_ITEM
// structures
0, // FastIoCount
NULL ) // FastIoTable
};
//Automation
DEFINE_KSAUTOMATION_TABLE(g_bda_tuner_filter_automation)
{
DEFINE_KSAUTOMATION_PROPERTIES_NULL,
DEFINE_KSAUTOMATION_METHODS(g_bda_tuner_methods),
DEFINE_KSAUTOMATION_EVENTS_NULL
};
/////////////////////////////////////////////////////////////////////////////////
//BDA frequency filter property set (KSPROPSETID_BdaFrequencyFilter)
//
// Allows setting and retrieving the tuner frequency
//
DEFINE_KSPROPERTY_TABLE(g_bda_frequency_properties)
{
//Get and set frequency
// ULONG
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY(
BdaTunerProp::static_GetFrequency,
BdaTunerProp::static_SetFrequency
),
//Get and set the frequency multiplier
// ULONG
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY_MULTIPLIER(
BdaTunerProp::static_GetFrequencyMultiplier,
BdaTunerProp::static_SetFrequencyMultiplier
),
//Get and set the channel bandwidth. (N/A for ATSC tuners)
// ULONG
DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_BANDWIDTH(
BdaTunerProp::static_GetChannelBandwidth,
BdaTunerProp::static_SetChannelBandwidth
),
};
/////////////////////////////////////////////////////////////////////////////////////////
//BDA signal stats property set. (KSPROPSETID_BdaSignalStats)
//
// Allows retriving information about rather a signal is present or not on the tuner
//
DEFINE_KSPROPERTY_TABLE(g_signal_stats_properties)
{
// LONG
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_STRENGTH(
BdaTunerProp::static_GetSignalStrength, // GetSupported or Handler
NULL // SetSupported or Handler
),
// BOOL
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_PRESENT(
BdaTunerProp::static_GetSignalPresent, // GetSupported or Handler
NULL // SetSupported or Handler
),
// LONG
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_QUALITY(
BdaTunerProp::static_GetSignalQuality, // GetSupported or Handler
NULL // SetSupported or Handler
),
// BOOL
DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_LOCKED(
BdaTunerProp::static_GetSignalLocked, // GetSupported or Handler
NULL // SetSupported or Handler
),
};
DEFINE_KSPROPERTY_TABLE(g_digital_demod_properties)
{
// ModulationType
DEFINE_KSPROPERTY_ITEM_BDA_MODULATION_TYPE(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
// FECMethod
DEFINE_KSPROPERTY_ITEM_BDA_INNER_FEC_TYPE(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
// BinaryConvolutionCodeRate
DEFINE_KSPROPERTY_ITEM_BDA_INNER_FEC_RATE(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
// FECMethod
DEFINE_KSPROPERTY_ITEM_BDA_OUTER_FEC_TYPE(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
// BinaryConvolutionCodeRate
DEFINE_KSPROPERTY_ITEM_BDA_OUTER_FEC_RATE(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
// ULONG
DEFINE_KSPROPERTY_ITEM_BDA_SYMBOL_RATE(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
// GuardInterval
DEFINE_KSPROPERTY_ITEM_BDA_GUARD_INTERVAL(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
// TransmissionMode
DEFINE_KSPROPERTY_ITEM_BDA_TRANSMISSION_MODE(
NULL, // GetSupported or Handler
NULL // SetSupported or Handler
),
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -