]> git.sesse.net Git - vlc/commitdiff
* src/input/input_programs.c: Fixed the --program option (thanks gibalou)
authorChristophe Massiot <massiot@videolan.org>
Mon, 10 May 2004 15:07:15 +0000 (15:07 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 10 May 2004 15:07:15 +0000 (15:07 +0000)
* modules/access/dvb/access.c: Removed the temporary --dvb-program hack
* modules/demux/ts.c: New --ts-silent option to avoid complaints about
  encrypted packets (especially useful with --sout-all for streaming a part
  of a transponder).

modules/access/dvb/access.c
modules/demux/ts.c
src/input/input_programs.c

index 324af9cbc0ecb77aa8bf429e1cf53373aae2589e..ec7abba132c5ff5b812c1ae86278c10a24447485 100644 (file)
@@ -143,7 +143,6 @@ static void    CloseProgram( input_thread_t * p_input );
 vlc_module_begin();
     set_description( N_("DVB input with v4l2 support") );
 
-    add_integer( "dvb-program", 0, NULL, PROGRAM_TEXT, PROGRAM_LONGTEXT,
                  VLC_FALSE );
     add_integer( "dvb-adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT,
                  VLC_FALSE );
@@ -253,7 +252,6 @@ static int Open( vlc_object_t *p_this )
         return( -1 );
     }
 
-    var_Create( p_input, "dvb-program", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_input, "dvb-adapter", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_input, "dvb-device", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_input, "dvb-frequency", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
@@ -445,7 +443,7 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer,
     {
         int i_program;
         unsigned int i;
-        var_Get( p_input, "dvb-program", &val );
+        var_Get( p_input, "program", &val );
         i_program = val.i_int;
 
         /* FIXME : this is not demux2-compatible */
@@ -454,7 +452,6 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer,
             /* Only set a filter on the selected program : some boards
              * (read: Dreambox) only have 8 filters, so you don't want to
              * spend them on unwanted PMTs. --Meuuh */
-            msg_Err(p_input, "Meuuh %d %d %d", p_input->stream.pp_programs[i]->i_number, p_input->stream.pp_programs[i]->pp_es[0]->i_id, i_program);
             if ( !i_program
                    || p_input->stream.pp_programs[i]->i_number == i_program )
             {
index 172a1afb3f80764d0d11f534e3578cb53f04ed3a..732e8d31163a3954551ad3503df928417218b685 100644 (file)
@@ -70,6 +70,7 @@ vlc_module_begin();
     add_string( "ts-out", NULL, NULL, "fast udp streaming", "send TS to specific ip:port by udp (you must know what you are doing)", VLC_TRUE );
     add_integer( "ts-out-mtu", 1500, NULL, "MTU for out mode", "MTU for out mode", VLC_TRUE );
     add_string( "ts-csa-ck", NULL, NULL, "CSA ck", "CSA ck", VLC_TRUE );
+    add_bool( "ts-silent", 0, NULL, "Silent mode", "do not complain on encrypted PES", VLC_TRUE );
     set_capability( "demux2", 10 );
     set_callbacks( Open, Close );
     add_shortcut( "ts2" );
@@ -215,6 +216,7 @@ struct demux_sys_t
     /* */
     vlc_bool_t  b_es_id_pid;
     csa_t       *csa;
+    vlc_bool_t  b_silent;
 
     vlc_bool_t  b_udp_out;
     int         fd; /* udp socket */
@@ -481,6 +483,9 @@ static int Open( vlc_object_t *p_this )
         free( val.psz_string );
     }
 
+    var_Create( p_demux, "ts-silent", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
+    var_Get( p_demux, "ts-silent", &val );
+    p_sys->b_silent = val.b_bool;
 
     return VLC_SUCCESS;
 }
@@ -811,8 +816,9 @@ static void ParsePES ( demux_t *p_demux, ts_pid_t *pid )
 
     if( header[0] != 0 || header[1] != 0 || header[2] != 1 )
     {
-        msg_Warn( p_demux, "invalid header [0x%x:%x:%x:%x]",
-                  header[0], header[1],header[2],header[3] );
+        if ( !p_demux->p_sys->b_silent )
+            msg_Warn( p_demux, "invalid header [0x%x:%x:%x:%x]", header[0],
+                      header[1],header[2],header[3] );
         block_ChainRelease( p_pes );
         return;
     }
index 469510d36d0d9a7b8b0d176929637292d67973b0..5a73f72169a239b8aea2c063d3572a9a31bd2549 100644 (file)
@@ -91,7 +91,8 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len )
     var_Set( p_input, "intf-change", val );
 
     /* Create a few object variables used for navigation in the interfaces */
-    var_Create( p_input, "program", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
+    var_Create( p_input, "program", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE
+                                     | VLC_VAR_DOINHERIT );
     text.psz_string = _("Program");
     var_Change( p_input, "program", VLC_VAR_SETTEXT, &text, NULL );