]> git.sesse.net Git - vlc/blobdiff - modules/access/bda/bda.c
Update LGPL license blurb, choosing v2.1+.
[vlc] / modules / access / bda / bda.c
index 5cf230af310ce795c9b6495f2d2b63805c8f6c67..064f12bd407226c322270e9800c0cfdbbd2a1638 100644 (file)
@@ -53,7 +53,7 @@ static int Control( access_t *, int, va_list );
     "named /dev/dvb/adapter[n] with n>=0.")
 
 #define DEVICE_TEXT N_("Device number to use on adapter")
-#define DEVICE_LONGTEXT ""
+#define DEVICE_LONGTEXT NULL
 
 #define FREQ_TEXT N_("Transponder/multiplex frequency")
 #if defined(WIN32) || defined(WINCE)
@@ -80,7 +80,7 @@ static const char *const ppsz_inversion_text[] = { N_("Undefined"), N_("Off"),
 /* Satellite */
 #if defined(WIN32) || defined(WINCE)
 #    define NETID_TEXT N_("Network Identifier")
-#    define NETID_LONGTEXT ""
+#    define NETID_LONGTEXT NULL
 #else
 #    define SATNO_TEXT N_("Satellite number in the Diseqc system")
 #    define SATNO_LONGTEXT N_("[0=no diseqc, 1-4=satellite number].")
@@ -100,7 +100,7 @@ static const char *const ppsz_inversion_text[] = { N_("Undefined"), N_("Off"),
 #define FEC_LONGTEXT N_("FEC=Forward Error Correction mode [9=auto].")
 
 #define SRATE_TEXT N_("Transponder symbol rate in kHz")
-#define SRATE_LONGTEXT ""
+#define SRATE_LONGTEXT NULL
 
 #define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (kHz)")
 #define LNB_LOF1_LONGTEXT N_("Low Band Local Osc Freq in kHz (usually 9.75GHz)")
@@ -293,25 +293,12 @@ vlc_module_begin ()
         change_integer_list( i_hierarchy_list, ppsz_hierarchy_text, NULL )
 
     set_capability( "access", 0 )
-    add_shortcut( "dvb" )      /* Generic name */
-
-    add_shortcut( "dvb-s" )    /* Satellite */
-    add_shortcut( "dvbs" )
-    add_shortcut( "qpsk" )
-    add_shortcut( "satellite" )
-
-    add_shortcut( "dvb-c" )    /* Cable */
-    add_shortcut( "dvbc" )
-    add_shortcut( "qam" )
-    add_shortcut( "cable" )
-
-    add_shortcut( "dvbt" )    /* Terrestrial */
-    add_shortcut( "dvb-t" )
-    add_shortcut( "ofdm" )
-    add_shortcut( "terrestrial" )
-
-    add_shortcut( "atsc" )     /* Atsc */
-    add_shortcut( "usdigital" )
+    add_shortcut( "dvb",                  /* Generic name */
+                  "dvb-s", "dvbs",        /* Satellite */
+                  "dvb-c", "dvbc",        /* Cable */
+                  "dvb-t", "dvbt",        /* Terrestrial */
+                  "atsc",                 /* Atsc */
+                  "cqam",)                /* Clear QAM */
 
     set_callbacks( Open, Close )
 vlc_module_end ()
@@ -382,32 +369,29 @@ static int Open( vlc_object_t *p_this )
 
     i_ret = VLC_EGENERIC;
 
-    if( strncmp( p_access->psz_access, "qpsk", 4 ) == 0 ||
-        strncmp( p_access->psz_access, "dvb-s", 5 ) == 0 ||
-        strncmp( p_access->psz_access, "dvbs", 4 ) == 0 ||
-        strncmp( p_access->psz_access, "satellite", 9 ) == 0 )
+    if( strncmp( p_access->psz_access, "dvb-s", 5 ) == 0 ||
+        strncmp( p_access->psz_access, "dvbs", 4 ) == 0 )
     {
         i_ret = dvb_SubmitDVBSTuneRequest( p_access );
     }
-    if( strncmp( p_access->psz_access, "cable", 5 ) == 0 ||
-        strncmp( p_access->psz_access, "dvb-c", 5 ) == 0  ||
-        strncmp( p_access->psz_access, "dvbc", 4 ) == 0  ||
-        strncmp( p_access->psz_access, "qam", 3 ) == 0 )
+    if( strncmp( p_access->psz_access, "dvb-c", 5 ) == 0  ||
+        strncmp( p_access->psz_access, "dvbc", 4 ) == 0 )
     {
         i_ret = dvb_SubmitDVBCTuneRequest( p_access );
     }
-    if( strncmp( p_access->psz_access, "terrestrial", 11 ) == 0 ||
-        strncmp( p_access->psz_access, "dvb-t", 5 ) == 0 ||
-        strncmp( p_access->psz_access, "ofdm", 4 ) == 0 ||
+    if( strncmp( p_access->psz_access, "dvb-t", 5 ) == 0 ||
         strncmp( p_access->psz_access, "dvbt", 4 ) == 0 )
     {
         i_ret = dvb_SubmitDVBTTuneRequest( p_access );
     }
-    if( strncmp( p_access->psz_access, "usdigital", 9 ) == 0 ||
-        strncmp( p_access->psz_access, "atsc", 4 ) == 0 )
+    if( strncmp( p_access->psz_access, "atsc", 4 ) == 0 )
     {
         i_ret = dvb_SubmitATSCTuneRequest( p_access );
     }
+    if( strncmp( p_access->psz_access, "cqam", 4 ) == 0 )
+    {
+        i_ret = dvb_SubmitCQAMTuneRequest( p_access );
+    }
     if( !strcmp( p_access->psz_access, "dvb" ) )
     {
         /* Try to auto detect */
@@ -419,6 +403,8 @@ static int Open( vlc_object_t *p_this )
             i_ret = dvb_SubmitDVBTTuneRequest( p_access );
         if( i_ret )
             i_ret = dvb_SubmitATSCTuneRequest( p_access );
+        if( i_ret )
+            i_ret = dvb_SubmitCQAMTuneRequest( p_access );
     }
 
     if( !i_ret )
@@ -463,7 +449,7 @@ static int ParsePath( access_t *p_access, const char* psz_module,
     }
     for( int i = 0; i < i_param_count; i++ )
         b_used[i] = false;
-    psz_parser = p_access->psz_path;
+    psz_parser = p_access->psz_location;
     if( strlen( psz_parser ) <= 0 )
         return VLC_SUCCESS;