]> git.sesse.net Git - vlc/commitdiff
dvb/access.c removed old commandline syntax
authorJean-Paul Saman <jpsaman@videolan.org>
Sat, 24 Apr 2004 10:18:08 +0000 (10:18 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Sat, 24 Apr 2004 10:18:08 +0000 (10:18 +0000)
better debug information
dvb/dvb.c debug message beautifying
dvb/qpsk.c textual changes

modules/access/dvb/access.c
modules/access/dvb/dvb.c
modules/access/dvb/qpsk.c

index 760c5723c7aa0238e2d5854f6957b7a088d0c8c1..c3996c045539872abe8a698980710e0ef3aa3578 100644 (file)
@@ -183,7 +183,7 @@ int E_(Open) ( vlc_object_t *p_this )
                                strlen( "frequency=" ) ) )
             {
                 u_freq =
-                  strtol( psz_parser + strlen( "frequency=" ),
+                (unsigned int)strtol( psz_parser + strlen( "frequency=" ),
                             &psz_parser, 0 );
             }
             else if( !strncmp( psz_parser, "polarization=",
@@ -340,37 +340,22 @@ int E_(Open) ( vlc_object_t *p_this )
     }
     else
     {
-        msg_Warn(p_input,"DVB Input syntax has changed, please see documentation for further informations");
-        u_freq = (unsigned int)i_test;
-        if( *psz_next )
-        {
-            psz_parser = psz_next + 1;
-            i_polarisation = strtol( psz_parser, &psz_next, 10 );
-            if( *psz_next )
-            {
-                psz_parser = psz_next + 1;
-                i_fec = (int)strtol( psz_parser, &psz_next, 10 );
-                if( *psz_next )
-                {
-                    psz_parser = psz_next + 1;
-                    u_srate = (unsigned int)strtol( psz_parser, &psz_next, 10 );
-                }
-            }
-        }
+        msg_Err(p_input, "DVB Input old syntax deprecreated, use vlc -p dvb to see an explantion of the new syntax");
+        return -1;
     }
    
     /* Validating input values */
     if ( ((u_freq) > frontend_info.frequency_max) ||
          ((u_freq) < frontend_info.frequency_min) )
     {
-        msg_Warn( p_input, "invalid frequency %d (KHz), using default one", u_freq );
-        u_freq = config_GetInt( p_input, "frequency" );
-        if ( ((u_freq) > frontend_info.frequency_max) ||
-             ((u_freq) < frontend_info.frequency_min) )
-        {
-            msg_Err( p_input, "invalid default frequency" );
-            return -1;
-        }
+        if ((u_freq) > frontend_info.frequency_max)
+            msg_Err( p_input, "given frequency %u (kHz) > %u (kHz) max. frequency",
+                     u_freq, frontend_info.frequency_max );
+        else
+            msg_Err( p_input, "given frequency %u (kHz) < %u (kHz) min.frequency",
+                     u_freq, frontend_info.frequency_min );
+        msg_Err( p_input, "baling out given frequency outside specification range for this frontend" );
+        return -1;
     }
 
     /* Workaround for backwards compatibility */
@@ -427,7 +412,7 @@ int E_(Open) ( vlc_object_t *p_this )
             
         /* DVB-C */
         case FE_QAM:
-            fep.frequency = u_freq; /* KHz */
+            fep.frequency = u_freq; /* in Hz */
             fep.inversion = dvb_DecodeInversion(p_input, i_polarisation);
             fep.u.qam.symbol_rate = u_srate;
             fep.u.qam.fec_inner = dvb_DecodeFEC(p_input, i_fec); 
@@ -442,7 +427,7 @@ int E_(Open) ( vlc_object_t *p_this )
 
         /* DVB-T */
         case FE_OFDM:
-            fep.frequency = u_freq; /* KHz */
+            fep.frequency = u_freq; /* in Hz */
             fep.inversion = dvb_DecodeInversion(p_input, i_polarisation);
             fep.u.ofdm.bandwidth = dvb_DecodeBandwidth(p_input, i_bandwidth);
             fep.u.ofdm.code_rate_HP = dvb_DecodeFEC(p_input, i_code_rate_HP); 
index e01c46ae94f7e0785eafccbfc8ec875981216a58..57a6f84719f263f27ba45f0badbd9f6dc0d560a6 100644 (file)
@@ -46,6 +46,7 @@
 #include <sys/poll.h>
 
 /* DVB Card Drivers */
+#include <linux/dvb/version.h>
 #include <linux/dvb/dmx.h>
 #include <linux/dvb/frontend.h>
 
@@ -122,65 +123,90 @@ int ioctl_InfoFrontend(input_thread_t * p_input, struct dvb_frontend_info *info,
         return -1;
     }
     /* Print out frontend capabilities. */
-    msg_Dbg(p_input, "Frontend Info:\tname = %s\n\t\tfrequency_min = %d\n\t\tfrequency_max = %d\n\t\tfrequency_stepsize = %d\n\t\tfrequency_tolerance = %d\n\t\tsymbol_rate_min = %d\n\t\tsymbol_rate_max = %d\n\t\tsymbol_rate_tolerance (ppm) = %d\n\t\tnotifier_delay (ms)= %d\n",
-            info->name,
-            info->frequency_min,
-            info->frequency_max,
-            info->frequency_stepsize,
-            info->frequency_tolerance,
-            info->symbol_rate_min,
-            info->symbol_rate_max,
-            info->symbol_rate_tolerance,
-            info->notifier_delay );
+
+    msg_Dbg(p_input, "Frontend Info:" );
+    msg_Dbg(p_input, "  name = %s", info->name);
+    switch(info->type)
+    {
+        case FE_QPSK:
+            msg_Dbg(p_input, "  type = QPSK (DVB-S)" );
+            break;
+        case FE_QAM:
+            msg_Dbg(p_input, "  type = QAM (DVB-C)" );
+            break;
+        case FE_OFDM:
+            msg_Dbg(p_input, "  type = OFDM (DVB-T)" );
+            break;
+#ifdef 0 /* DVB_API_VERSION == 3 */
+        case FE_MEMORY:
+            msg_Dbg(p_input, "  type = MEMORY" );
+            break;
+        case FE_NET:
+            msg_Dbg(p_input, "  type = NETWORK" );
+            break;
+#endif
+        default
+            msg_Err(p_input, "  unknown frontend found fe_type_t(%d)", info->type );
+            return -1;
+    }
+    msg_Dbg(p_input, "  frequency_min = %u (kHz)", info->frequency_min);
+    msg_Dbg(p_input, "  frequency_max = %u (kHz)", info->frequency_max);
+    msg_Dbg(p_input, "  frequency_stepsize = %u",  info->frequency_stepsize);
+    msg_Dbg(p_input, "  frequency_tolerance = %u", info->frequency_tolerance);
+    msg_Dbg(p_input, "  symbol_rate_min = %u (kHz)", info->symbol_rate_min);
+    msg_Dbg(p_input, "  symbol_rate_max = %u (kHz)", info->symbol_rate_max);
+    msg_Dbg(p_input, "  symbol_rate_tolerance (ppm) = %u", info->symbol_rate_tolerance);
+    msg_Dbg(p_input, "  notifier_delay (ms)= %u", info->notifier_delay );
+
     msg_Dbg(p_input, "Frontend Info capability list:");
     if (info->caps&FE_IS_STUPID)
-        msg_Dbg(p_input, "no capabilities - frontend is stupid!");
+        msg_Dbg(p_input, "  no capabilities - frontend is stupid!");
     if (info->caps&FE_CAN_INVERSION_AUTO)
-        msg_Dbg(p_input, "inversion auto");
+        msg_Dbg(p_input, "  inversion auto");
     if (info->caps&FE_CAN_FEC_1_2)
-        msg_Dbg(p_input, "forward error correction 1/2");
+        msg_Dbg(p_input, "  forward error correction 1/2");
     if (info->caps&FE_CAN_FEC_2_3)
-        msg_Dbg(p_input, "forward error correction 2/3");
+        msg_Dbg(p_input, "  forward error correction 2/3");
     if (info->caps&FE_CAN_FEC_3_4)
-        msg_Dbg(p_input, "forward error correction 3/4");
+        msg_Dbg(p_input, "  forward error correction 3/4");
     if (info->caps&FE_CAN_FEC_4_5)
-        msg_Dbg(p_input, "forward error correction 4/5");
+        msg_Dbg(p_input, "  forward error correction 4/5");
     if (info->caps&FE_CAN_FEC_5_6)
-        msg_Dbg(p_input, "forward error correction 5/6");
+        msg_Dbg(p_input, "  forward error correction 5/6");
     if (info->caps&FE_CAN_FEC_6_7)
-        msg_Dbg(p_input, "forward error correction 6/7");
+        msg_Dbg(p_input, "  forward error correction 6/7");
     if (info->caps&FE_CAN_FEC_7_8)
-        msg_Dbg(p_input, "forward error correction 7/8");
+        msg_Dbg(p_input, "  forward error correction 7/8");
     if (info->caps&FE_CAN_FEC_8_9)
-        msg_Dbg(p_input, "forward error correction 8/9");
+        msg_Dbg(p_input, "  forward error correction 8/9");
     if (info->caps&FE_CAN_FEC_AUTO)
-        msg_Dbg(p_input, "forward error correction auto");
+        msg_Dbg(p_input, "  forward error correction auto");
     if (info->caps&FE_CAN_QPSK)
-        msg_Dbg(p_input, "card can do QPSK");
+        msg_Dbg(p_input, "  card can do QPSK");
     if (info->caps&FE_CAN_QAM_16)
-        msg_Dbg(p_input, "card can do QAM 16");
+        msg_Dbg(p_input, "  card can do QAM 16");
     if (info->caps&FE_CAN_QAM_32)
-        msg_Dbg(p_input, "card can do QAM 32");
+        msg_Dbg(p_input, "  card can do QAM 32");
     if (info->caps&FE_CAN_QAM_64)
-        msg_Dbg(p_input, "card can do QAM 64");
+        msg_Dbg(p_input, "  card can do QAM 64");
     if (info->caps&FE_CAN_QAM_128)
-        msg_Dbg(p_input, "card can do QAM 128");
+        msg_Dbg(p_input, "  card can do QAM 128");
     if (info->caps&FE_CAN_QAM_256)
-        msg_Dbg(p_input, "card can do QAM 256");
+        msg_Dbg(p_input, "  card can do QAM 256");
     if (info->caps&FE_CAN_QAM_AUTO)
-        msg_Dbg(p_input, "card can do QAM auto");
+        msg_Dbg(p_input, "  card can do QAM auto");
     if (info->caps&FE_CAN_TRANSMISSION_MODE_AUTO)
-        msg_Dbg(p_input, "transmission mode auto");
+        msg_Dbg(p_input, "  transmission mode auto");
     if (info->caps&FE_CAN_BANDWIDTH_AUTO)
-        msg_Dbg(p_input, "bandwidth mode auto");
+        msg_Dbg(p_input, "  bandwidth mode auto");
     if (info->caps&FE_CAN_GUARD_INTERVAL_AUTO)
-        msg_Dbg(p_input, "guard interval mode auto");
+        msg_Dbg(p_input, "  guard interval mode auto");
     if (info->caps&FE_CAN_HIERARCHY_AUTO)
-        msg_Dbg(p_input, "hierarchy mode auto");
+        msg_Dbg(p_input, "  hierarchy mode auto");
     if (info->caps&FE_CAN_MUTE_TS)
-        msg_Dbg(p_input, "card can mute TS");
+        msg_Dbg(p_input, "  card can mute TS");
     if (info->caps&FE_CAN_CLEAN_SETUP)
-        msg_Dbg(p_input, "clean setup");        
+        msg_Dbg(p_input, "  clean setup");        
     msg_Dbg(p_input,"End of capability list");
     
     close(front);
index 5a31ae07aa3437e9adfb575d205009dc31cffd5f..33cbf21efd99538a3f202a05f3d293eb58301888 100644 (file)
@@ -47,7 +47,7 @@ void E_(Close)   ( vlc_object_t * );
 #define DEVICE_TEXT N_("Device number to use on adapter")
 #define DEVICE_LONGTEXT ""
 
-#define FREQ_TEXT N_("Satellite transponder frequency in kHz")
+#define FREQ_TEXT N_("Satellite transponder frequency in kHz for DVB-S and in Hz for DVB-C/T")
 #define FREQ_LONGTEXT ""
 
 #define POL_TEXT N_("Satellite transponder polarization")