Commit 89b90173 authored by Christophe Massiot's avatar Christophe Massiot

* src/input/input_programs.c: Fixed the --program option (thanks gibalou)

* 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).
parent f12d6405
...@@ -143,7 +143,6 @@ static void CloseProgram( input_thread_t * p_input ); ...@@ -143,7 +143,6 @@ static void CloseProgram( input_thread_t * p_input );
vlc_module_begin(); vlc_module_begin();
set_description( N_("DVB input with v4l2 support") ); set_description( N_("DVB input with v4l2 support") );
add_integer( "dvb-program", 0, NULL, PROGRAM_TEXT, PROGRAM_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
add_integer( "dvb-adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT, add_integer( "dvb-adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
...@@ -253,7 +252,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -253,7 +252,6 @@ static int Open( vlc_object_t *p_this )
return( -1 ); 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-adapter", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_input, "dvb-device", 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 ); 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, ...@@ -445,7 +443,7 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer,
{ {
int i_program; int i_program;
unsigned int i; unsigned int i;
var_Get( p_input, "dvb-program", &val ); var_Get( p_input, "program", &val );
i_program = val.i_int; i_program = val.i_int;
/* FIXME : this is not demux2-compatible */ /* FIXME : this is not demux2-compatible */
...@@ -454,7 +452,6 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, ...@@ -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 /* Only set a filter on the selected program : some boards
* (read: Dreambox) only have 8 filters, so you don't want to * (read: Dreambox) only have 8 filters, so you don't want to
* spend them on unwanted PMTs. --Meuuh */ * 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 if ( !i_program
|| p_input->stream.pp_programs[i]->i_number == i_program ) || p_input->stream.pp_programs[i]->i_number == i_program )
{ {
......
...@@ -70,6 +70,7 @@ vlc_module_begin(); ...@@ -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_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_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_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_capability( "demux2", 10 );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
add_shortcut( "ts2" ); add_shortcut( "ts2" );
...@@ -215,6 +216,7 @@ struct demux_sys_t ...@@ -215,6 +216,7 @@ struct demux_sys_t
/* */ /* */
vlc_bool_t b_es_id_pid; vlc_bool_t b_es_id_pid;
csa_t *csa; csa_t *csa;
vlc_bool_t b_silent;
vlc_bool_t b_udp_out; vlc_bool_t b_udp_out;
int fd; /* udp socket */ int fd; /* udp socket */
...@@ -481,6 +483,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -481,6 +483,9 @@ static int Open( vlc_object_t *p_this )
free( val.psz_string ); 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; return VLC_SUCCESS;
} }
...@@ -811,8 +816,9 @@ static void ParsePES ( demux_t *p_demux, ts_pid_t *pid ) ...@@ -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 ) if( header[0] != 0 || header[1] != 0 || header[2] != 1 )
{ {
msg_Warn( p_demux, "invalid header [0x%x:%x:%x:%x]", if ( !p_demux->p_sys->b_silent )
header[0], header[1],header[2],header[3] ); msg_Warn( p_demux, "invalid header [0x%x:%x:%x:%x]", header[0],
header[1],header[2],header[3] );
block_ChainRelease( p_pes ); block_ChainRelease( p_pes );
return; return;
} }
......
...@@ -91,7 +91,8 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len ) ...@@ -91,7 +91,8 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len )
var_Set( p_input, "intf-change", val ); var_Set( p_input, "intf-change", val );
/* Create a few object variables used for navigation in the interfaces */ /* 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"); text.psz_string = _("Program");
var_Change( p_input, "program", VLC_VAR_SETTEXT, &text, NULL ); var_Change( p_input, "program", VLC_VAR_SETTEXT, &text, NULL );
......
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