本文整理汇总了C++中DVBT_DEMOD_MODULE::GetBandwidthMode方法的典型用法代码示例。如果您正苦于以下问题:C++ DVBT_DEMOD_MODULE::GetBandwidthMode方法的具体用法?C++ DVBT_DEMOD_MODULE::GetBandwidthMode怎么用?C++ DVBT_DEMOD_MODULE::GetBandwidthMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DVBT_DEMOD_MODULE
的用法示例。
在下文中一共展示了DVBT_DEMOD_MODULE::GetBandwidthMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/**
@see DVBT_NIM_FP_GET_PARAMETERS
*/
s32
dvbt_nim_default_GetParameters(
DVBT_NIM_MODULE *pNim,
u64 *pRfFreqHz,
s32 *pBandwidthMode
)
{
TUNER_MODULE *pTuner;
DVBT_DEMOD_MODULE *pDemod;
// Get tuner module and demod module.
pTuner = pNim->pTuner;
pDemod = pNim->pDemod;
// Get tuner RF frequency in Hz.
if(pTuner->GetRfFreqHz(pTuner, pRfFreqHz) != FUNCTION_SUCCESS)
goto error_status_execute_function;
// Get demod bandwidth mode.
if(pDemod->GetBandwidthMode(pDemod, pBandwidthMode) != FUNCTION_SUCCESS)
goto error_status_execute_function;
return FUNCTION_SUCCESS;
error_status_execute_function:
return FUNCTION_ERROR;
}
示例2:
UData_t
tuner_set_bw_normal(
handle_t tuner_handle,
handle_t demod_handle
)
{
DVBT_DEMOD_MODULE *pDemod;
int DemodBandwidthMode;
unsigned int TunerBandwidthHz;
unsigned int TargetTunerBandwidthHz;
// Get demod module.
pDemod = (DVBT_DEMOD_MODULE *)demod_handle;
// Get demod bandwidth mode.
if(pDemod->GetBandwidthMode(pDemod, &DemodBandwidthMode) != FUNCTION_SUCCESS)
goto error_status_execute_function;
// Determine tuner target bandwidth.
switch(DemodBandwidthMode)
{
case DVBT_BANDWIDTH_6MHZ: TargetTunerBandwidthHz = MT2266_BANDWIDTH_6MHZ; break;
case DVBT_BANDWIDTH_7MHZ: TargetTunerBandwidthHz = MT2266_BANDWIDTH_7MHZ; break;
default:
case DVBT_BANDWIDTH_8MHZ: TargetTunerBandwidthHz = MT2266_BANDWIDTH_8MHZ; break;
}
// Get tuner bandwidth.
if(MT_IS_ERROR(MT2266_GetParam(tuner_handle, MT2266_OUTPUT_BW, &TunerBandwidthHz)))
goto error_status_get_tuner_bandwidth;
// Set tuner bandwidth with normal setting according to demod bandwidth mode.
if(TunerBandwidthHz != TargetTunerBandwidthHz)
{
if(MT_IS_ERROR(MT2266_SetParam(tuner_handle, MT2266_OUTPUT_BW, TargetTunerBandwidthHz)))
goto error_status_set_tuner_bandwidth;
}
return MT_OK;
error_status_set_tuner_bandwidth:
error_status_get_tuner_bandwidth:
error_status_execute_function:
return MT_COMM_ERR;
}