Commit 77ea92e9 authored by Marian Ďurkovič's avatar Marian Ďurkovič Committed by Christophe Massiot

* dvb.c, dvblastctl.c: Simplify #ifdef's for different DVB API version.

parent e1c6a703
......@@ -374,9 +374,7 @@ static int FrontendDoDiseqc(void)
switch ( i_voltage )
{
#ifdef SEC_VOLTAGE_OFF
case 0: fe_voltage = SEC_VOLTAGE_OFF; break;
#endif
default:
case 13: fe_voltage = SEC_VOLTAGE_13; break;
case 18: fe_voltage = SEC_VOLTAGE_18; break;
......@@ -500,6 +498,8 @@ static int FrontendDoDiseqc(void)
return bis_frequency;
}
#define DVBAPI_VERSION ((DVB_API_VERSION)*100+(DVB_API_VERSION_MINOR))
#if DVB_API_VERSION >= 5
/*****************************************************************************
......@@ -741,7 +741,7 @@ static void FrontendSet( void )
i_frequency, i_srate );
break;
#ifdef FE_ATSC
#if DVBAPI_VERSION >= 301
case FE_ATSC:
fep.frequency = i_frequency;
......
......@@ -308,22 +308,21 @@ int main( int i_argc, char **ppsz_argv )
PRINT_CAPS( CAN_BANDWIDTH_AUTO );
PRINT_CAPS( CAN_GUARD_INTERVAL_AUTO );
PRINT_CAPS( CAN_HIERARCHY_AUTO );
#ifdef FE_CAN_8VSB
PRINT_CAPS( CAN_MUTE_TS );
#define DVBAPI_VERSION ((DVB_API_VERSION)*100+(DVB_API_VERSION_MINOR))
#if DVBAPI_VERSION >= 301
PRINT_CAPS( CAN_8VSB );
PRINT_CAPS( CAN_16VSB );
PRINT_CAPS( NEEDS_BENDING );
PRINT_CAPS( CAN_RECOVER );
#endif
#if DVB_API_VERSION >= 5
#if DVBAPI_VERSION >= 500
PRINT_CAPS( HAS_EXTENDED_CAPS );
#ifdef FE_CAN_2G_MODULATION
PRINT_CAPS( CAN_2G_MODULATION );
#endif
#endif
#ifdef FE_NEEDS_BENDING
PRINT_CAPS( NEEDS_BENDING );
#endif
PRINT_CAPS( CAN_MUTE_TS );
#ifdef FE_CAN_RECOVER
PRINT_CAPS( CAN_RECOVER );
#if DVBAPI_VERSION >= 501
PRINT_CAPS( CAN_2G_MODULATION );
#endif
#undef PRINT_CAPS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment