[dvblast-devel] enforce code conventions

Christophe Massiot git at videolan.org
Fri Jan 8 21:24:31 CET 2016


dvblast | branch: master | Christophe Massiot <cmassiot at openheadend.tv> | Fri Jan  8 21:23:44 2016 +0100| [179f0498f629386e8342bcc6db1fe3c967912df3] | committer: Christophe Massiot

enforce code conventions

> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=179f0498f629386e8342bcc6db1fe3c967912df3
---

 NEWS      |    1 +
 dvb.c     |   10 +++++-----
 dvblast.c |   14 +++++++-------
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/NEWS b/NEWS
index dff6fa9..0e3ae42 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 Changes between 3.0 and 3.1:
 ----------------------------
   * Print source address in UDP input
+  * Add DVB-T2 support
 
 Changes between 2.2 and 3.0:
 ----------------------------
diff --git a/dvb.c b/dvb.c
index b7925b4..ec84ed0 100644
--- a/dvb.c
+++ b/dvb.c
@@ -1023,7 +1023,7 @@ FrontendGuessSystem( fe_delivery_system_t *p_systems, int i_systems )
             return SYS_DVBC_ANNEX_B;
         if ( !strcasecmp( psz_delsys, "DVBT" ) )
             return SYS_DVBT;
-				if ( !strcasecmp( psz_delsys, "DVBT2" ) )
+        if ( !strcasecmp( psz_delsys, "DVBT2" ) )
            return SYS_DVBT2;
         if ( !strcasecmp( psz_delsys, "ATSC" ) )
             return SYS_ATSC;
@@ -1060,7 +1060,7 @@ FrontendGuessSystem( fe_delivery_system_t *p_systems, int i_systems )
                 if ( i_frequency > 50000000 )
                     return SYS_DVBT;
                 break;
-						 case SYS_DVBT2:
+            case SYS_DVBT2:
                if ( i_frequency > 50000000 && (dvb_plp_id) )
                   return SYS_DVBT2;
                break;
@@ -1179,9 +1179,9 @@ static void FrontendSet( bool b_init )
                  psz_modulation == NULL ? "qam_auto" : psz_modulation,
                  i_guard, i_transmission );
         break;
-		case SYS_DVBT2:
+    case SYS_DVBT2:
         p = &dvbt2_cmdseq;
-       p->props[DELSYS].u.data = system;
+        p->props[DELSYS].u.data = system;
         p->props[FREQUENCY].u.data = i_frequency;
         p->props[INVERSION].u.data = GetInversion();
         if ( psz_modulation != NULL )
@@ -1195,7 +1195,7 @@ static void FrontendSet( bool b_init )
         p->props[PLP_ID].u.data = dvb_plp_id;
 
         msg_Dbg( NULL, "tuning DVB-T2 frontend to f=%d bandwidth=%d inversion=%d fec_hp=%d fec_lp=%d hierarchy=%d modulation=%s guard=%d transmission=%d PLP_ID=%d ",
-									i_frequency, i_bandwidth, i_inversion, i_fec, i_fec_lp,
+                 i_frequency, i_bandwidth, i_inversion, i_fec, i_fec_lp,
                  i_hierarchy,
                  psz_modulation == NULL ? "qam_auto" : psz_modulation,
                  i_guard, i_transmission, p->props[PLP_ID].u.data );
diff --git a/dvblast.c b/dvblast.c
index 3ab5615..38709dd 100644
--- a/dvblast.c
+++ b/dvblast.c
@@ -616,7 +616,7 @@ void usage()
     msg_Raw( NULL, "  -5 --delsys           delivery system" );
     msg_Raw( NULL, "    DVBS|DVBS2|DVBC_ANNEX_A|DVBT|ATSC (default guessed)");
     msg_Raw( NULL, "  -f --frequency        frontend frequency" );
-		msg_Raw( NULL, "  -9 --dvb-plp-id <number> Switch PLP of the DVB-T2 transmission (for Russia special)" );
+    msg_Raw( NULL, "  -9 --dvb-plp-id <number> Switch PLP of the DVB-T2 transmission (for Russia special)" );
     msg_Raw( NULL, "  -F --fec-inner        Forward Error Correction (FEC Inner)");
     msg_Raw( NULL, "    DVB-S2 0|12|23|34|35|56|78|89|910|999 (default auto: 999)");
     msg_Raw( NULL, "  -I --inversion        Inversion (-1 auto, 0 off, 1 on)" );
@@ -702,7 +702,7 @@ int main( int i_argc, char **pp_argv )
         usage();
 
     /*
-     * The only short options left are: 489
+     * The only short options left are: 48
      * Use them wisely.
      */
     static const struct option long_options[] =
@@ -715,7 +715,7 @@ int main( int i_argc, char **pp_argv )
         { "adapter",         required_argument, NULL, 'a' },
         { "frontend-number", required_argument, NULL, 'n' },
         { "delsys",          required_argument, NULL, '5' },
-				{ "dvb-plp-id",      required_argument, NULL, '9' },
+        { "dvb-plp-id",      required_argument, NULL, '9' },
         { "frequency",       required_argument, NULL, 'f' },
         { "fec-inner",       required_argument, NULL, 'F' },
         { "rolloff",         required_argument, NULL, 'R' },
@@ -843,9 +843,9 @@ int main( int i_argc, char **pp_argv )
         case '5':
             psz_delsys = optarg;
             break;
-				case '9':
-           dvb_plp_id = strtol( optarg, NULL, 0 );
-           break;
+        case '9':
+            dvb_plp_id = strtol( optarg, NULL, 0 );
+            break;
         case 'f':
             if (optarg && optarg[0] != '-')
                 i_frequency = strtol( optarg, NULL, 0 );
@@ -1112,7 +1112,7 @@ int main( int i_argc, char **pp_argv )
         case '2':
             i_dvr_buffer_size = strtol( optarg, NULL, 0 );
             if (!i_dvr_buffer_size)
-                usage();	// it exits
+                usage();  // it exits
             /* roundup to packet size */
             i_dvr_buffer_size += TS_SIZE - 1;
             i_dvr_buffer_size /= TS_SIZE;



More information about the dvblast-devel mailing list