Commit a960194c authored by massiot's avatar massiot

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


git-svn-id: svn://svn.videolan.org/dvblast/trunk@61 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent bb15a4ec
...@@ -374,9 +374,7 @@ static int FrontendDoDiseqc(void) ...@@ -374,9 +374,7 @@ static int FrontendDoDiseqc(void)
switch ( i_voltage ) switch ( i_voltage )
{ {
#ifdef SEC_VOLTAGE_OFF
case 0: fe_voltage = SEC_VOLTAGE_OFF; break; case 0: fe_voltage = SEC_VOLTAGE_OFF; break;
#endif
default: default:
case 13: fe_voltage = SEC_VOLTAGE_13; break; case 13: fe_voltage = SEC_VOLTAGE_13; break;
case 18: fe_voltage = SEC_VOLTAGE_18; break; case 18: fe_voltage = SEC_VOLTAGE_18; break;
...@@ -500,6 +498,8 @@ static int FrontendDoDiseqc(void) ...@@ -500,6 +498,8 @@ static int FrontendDoDiseqc(void)
return bis_frequency; return bis_frequency;
} }
#define DVBAPI_VERSION ((DVB_API_VERSION)*100+(DVB_API_VERSION_MINOR))
#if DVB_API_VERSION >= 5 #if DVB_API_VERSION >= 5
/***************************************************************************** /*****************************************************************************
...@@ -741,7 +741,7 @@ static void FrontendSet( void ) ...@@ -741,7 +741,7 @@ static void FrontendSet( void )
i_frequency, i_srate ); i_frequency, i_srate );
break; break;
#ifdef FE_ATSC #if DVBAPI_VERSION >= 301
case FE_ATSC: case FE_ATSC:
fep.frequency = i_frequency; fep.frequency = i_frequency;
......
...@@ -308,22 +308,21 @@ int main( int i_argc, char **ppsz_argv ) ...@@ -308,22 +308,21 @@ int main( int i_argc, char **ppsz_argv )
PRINT_CAPS( CAN_BANDWIDTH_AUTO ); PRINT_CAPS( CAN_BANDWIDTH_AUTO );
PRINT_CAPS( CAN_GUARD_INTERVAL_AUTO ); PRINT_CAPS( CAN_GUARD_INTERVAL_AUTO );
PRINT_CAPS( CAN_HIERARCHY_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_8VSB );
PRINT_CAPS( CAN_16VSB ); PRINT_CAPS( CAN_16VSB );
PRINT_CAPS( NEEDS_BENDING );
PRINT_CAPS( CAN_RECOVER );
#endif #endif
#if DVB_API_VERSION >= 5 #if DVBAPI_VERSION >= 500
PRINT_CAPS( HAS_EXTENDED_CAPS ); PRINT_CAPS( HAS_EXTENDED_CAPS );
#ifdef FE_CAN_2G_MODULATION
PRINT_CAPS( CAN_2G_MODULATION );
#endif #endif
#endif #if DVBAPI_VERSION >= 501
#ifdef FE_NEEDS_BENDING PRINT_CAPS( CAN_2G_MODULATION );
PRINT_CAPS( NEEDS_BENDING );
#endif
PRINT_CAPS( CAN_MUTE_TS );
#ifdef FE_CAN_RECOVER
PRINT_CAPS( CAN_RECOVER );
#endif #endif
#undef PRINT_CAPS #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