Commit 9d8d50a8 authored by Sam Hocevar's avatar Sam Hocevar

. ajout de l'option --broadcast en ligne de commande

parent a43bce4e
...@@ -214,6 +214,10 @@ ...@@ -214,6 +214,10 @@
#define INPUT_PORT_VAR "vlc_server_port" #define INPUT_PORT_VAR "vlc_server_port"
#define INPUT_PORT_DEFAULT 1234 #define INPUT_PORT_DEFAULT 1234
/* Broadcast mode */
#define INPUT_BROADCAST_VAR "vlc_broadcast"
#define INPUT_BROADCAST_DEFAULT 0
/* /*
* Vlan method * Vlan method
*/ */
......
...@@ -125,6 +125,12 @@ int input_NetworkOpen( input_thread_t *p_input ) ...@@ -125,6 +125,12 @@ int input_NetworkOpen( input_thread_t *p_input )
p_input->i_port = main_GetIntVariable( INPUT_PORT_VAR, INPUT_PORT_DEFAULT ); p_input->i_port = main_GetIntVariable( INPUT_PORT_VAR, INPUT_PORT_DEFAULT );
} }
/* See if the user requested broadcast method */
if( main_GetIntVariable( INPUT_BROADCAST_VAR, INPUT_BROADCAST_DEFAULT ) )
{
p_input->i_method = INPUT_METHOD_TS_BCAST;
}
/* Find the address. */ /* Find the address. */
switch( p_input->i_method ) switch( p_input->i_method )
{ {
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
#define OPT_NOVLANS 170 #define OPT_NOVLANS 170
#define OPT_SERVER 171 #define OPT_SERVER 171
#define OPT_PORT 172 #define OPT_PORT 172
#define OPT_BROADCAST 173
#define OPT_SYNCHRO 180 #define OPT_SYNCHRO 180
...@@ -122,6 +123,7 @@ static const struct option longopts[] = ...@@ -122,6 +123,7 @@ static const struct option longopts[] =
{ "novlans", 0, 0, OPT_NOVLANS }, { "novlans", 0, 0, OPT_NOVLANS },
{ "server", 1, 0, OPT_SERVER }, { "server", 1, 0, OPT_SERVER },
{ "port", 1, 0, OPT_PORT }, { "port", 1, 0, OPT_PORT },
{ "broadcast", 0, 0, OPT_BROADCAST },
/* Synchro options */ /* Synchro options */
{ "synchro", 1, 0, OPT_SYNCHRO }, { "synchro", 1, 0, OPT_SYNCHRO },
...@@ -541,6 +543,9 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] ) ...@@ -541,6 +543,9 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
case OPT_PORT: /* --port */ case OPT_PORT: /* --port */
main_PutPszVariable( INPUT_PORT_VAR, optarg ); main_PutPszVariable( INPUT_PORT_VAR, optarg );
break; break;
case OPT_BROADCAST: /* --broadcast */
main_PutIntVariable( INPUT_BROADCAST_VAR, 1 );
break;
/* Synchro options */ /* Synchro options */
case OPT_SYNCHRO: case OPT_SYNCHRO:
...@@ -604,6 +609,7 @@ static void Usage( int i_fashion ) ...@@ -604,6 +609,7 @@ static void Usage( int i_fashion )
" --novlans \tdisable vlans\n" " --novlans \tdisable vlans\n"
" --server <host> \tvideo server address\n" " --server <host> \tvideo server address\n"
" --port <port> \tvideo server port\n" " --port <port> \tvideo server port\n"
" --broadcast \tlisten to a broadcast\n"
"\n" "\n"
" --synchro <type> \tforce synchro algorithm\n" " --synchro <type> \tforce synchro algorithm\n"
"\n" "\n"
...@@ -651,6 +657,7 @@ static void Usage( int i_fashion ) ...@@ -651,6 +657,7 @@ static void Usage( int i_fashion )
" " INPUT_SERVER_VAR "=<hostname> \tvideo server\n" " " INPUT_SERVER_VAR "=<hostname> \tvideo server\n"
" " INPUT_PORT_VAR "=<port> \tvideo server port\n" " " INPUT_PORT_VAR "=<port> \tvideo server port\n"
" " INPUT_IFACE_VAR "=<interface> \tnetwork interface\n" " " INPUT_IFACE_VAR "=<interface> \tnetwork interface\n"
" " INPUT_BROADCAST_VAR "={1|0} \tbroadcast mode\n"
" " INPUT_VLAN_SERVER_VAR "=<hostname> \tvlan server\n" " " INPUT_VLAN_SERVER_VAR "=<hostname> \tvlan server\n"
" " INPUT_VLAN_PORT_VAR "=<port> \tvlan server port\n" ); " " INPUT_VLAN_PORT_VAR "=<port> \tvlan server port\n" );
......
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