Commit 1169b53c authored by videolan's avatar videolan

Added the "-f" command line option to give the configuration file as other...

Added the "-f" command line option to give the configuration file as other VideoLAN projects also use it. (you can  still use -d)

Increased the size of the SAP fields
parent 8c8a0edc
......@@ -7,15 +7,51 @@ ttl=15 # TTL (Time To Live) of the SAP announces
# Then you should have one "[program]" section per program announced
[program]
name=TV1 # Name of the program (as will show up in the VLC playlist)
user=videolan # Name of the streaming entity
machine=vlcs.via.ecp.fr # Name of the streaming machine
site=www.videolan.org # Site of the streaming entity
address=239.255.12.12 # Multicast IP address of the program
name=M6
user=videolan
machine=vlcs.via.ecp.fr
site=www.videolan.org
address=239.255.12.12
[program]
name=TV2
name=France 5
user=videolan
machine=vlcs.via.ecp.fr
site=www.videolan.org
address=239.255.12.13
#[program]
#name=EuroNews
#user=videolan
#machine=vlcs.via.ecp.fr
#site=www.videolan.org
#address=239.255.12.14
[program]
name=Star Wars II
user=videolan
machine=vlcs.via.ecp.fr
site=www.videolan.org
address=239.255.12.15
[program]
name=Le Voyage de Chihiro
user=videolan
machine=vlcs.via.ecp.fr
site=www.videolan.org
address=239.255.12.16
[program]
name=Delicatessen
user=videolan
machine=vlcs.via.ecp.fr
site=www.videolan.org
address=239.255.12.17
[program]
name=Matrix
user=videolan
machine=vlcs.via.ecp.fr
site=www.videolan.org
address=239.255.12.18
......@@ -44,7 +44,7 @@ unsigned int ttl=10; // Default TTL
struct prog
{
char name[16];
char name[64];
char user[16];
char machine[128];
char site[128];
......@@ -225,11 +225,11 @@ int main(int argc, char *argv[])
sprintf(conffile,DEFAULT_CONF);
// Parse the command line
sprintf(getopt_string,"c:d");
sprintf(getopt_string,"f:c:d");
while(result !=-1)
{
result=getopt(argc,argv,getopt_string);
if(result=='c') {sprintf(conffile,optarg);break;}
if(result=='c' || result=='f') {sprintf(conffile,optarg);break;}
if(result=='d') godaemon=1;
}
// Get the programs
......
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