[xiph-cvs] cvs commit: ices/src setup.c

Brendan brendan at xiph.org
Tue Jul 8 17:47:04 PDT 2003



brendan     03/07/08 20:47:04

  Modified:    conf     ices.conf.dist.in
               doc      ices.1.in
               src      setup.c
  Log:
  Replace '-i' (icy compatible) command line option with '-t <protocol>' since
  we now support three protocols.

Revision  Changes    Path
1.11      +3 -2      ices/conf/ices.conf.dist.in

Index: ices.conf.dist.in
===================================================================
RCS file: /cvs/ice/ices/conf/ices.conf.dist.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -u -r1.10 -r1.11
--- ices.conf.dist.in	4 Jul 2003 05:25:12 -0000	1.10
+++ ices.conf.dist.in	9 Jul 2003 00:47:03 -0000	1.11
@@ -21,7 +21,8 @@
     <!-- Set this to 1 if you want to see more verbose output from ices -->
     <Verbose>0</Verbose>
     <!-- This directory specifies where ices should put the logfile, cue file
-	 and pid file (if daemonizing). -->
+	 and pid file (if daemonizing). Don't use /tmp if you have l33t h4x0rz
+         on your server. -->
     <BaseDirectory>/tmp</BaseDirectory>
   </Execution>
 
@@ -58,7 +59,7 @@
     <Public>0</Public>
 
     <!-- Stream bitrate, used to specify bitrate if reencoding, otherwise
-	 just used for display on yp and on the server. Try to keep it
+	 just used for display on YP and on the server. Try to keep it
          accurate -->
     <Bitrate>128</Bitrate>
     <!-- If this is set to 1, and ices is compiled with liblame support,

<p><p>1.6       +12 -9     ices/doc/ices.1.in

Index: ices.1.in
===================================================================
RCS file: /cvs/ice/ices/doc/ices.1.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -u -r1.5 -r1.6
--- ices.1.in	22 Jun 2003 02:04:24 -0000	1.5
+++ ices.1.in	9 Jul 2003 00:47:04 -0000	1.6
@@ -27,7 +27,8 @@ ices \- stream MP3 audio to an icecast s
 .IR port \|]
 .RB [\| \-P
 .IR password \|]
-.RB [\| -i \|]
+.RB [\| \-t
+.IR protocol \|]
 .\" Stream options
 .RB [\| \-n
 .IR name \|]
@@ -161,14 +162,16 @@ instead of the default,
 Log into the icecast server using the password
 .IR password .
 .TP
-.B \-i
-Use old shoutcast-compatible
-.B icy
-method to log in, instead of the icecast-compatible
-.B x-audiocast
-method. If you have to use this you will lose some functionality, most
-notably the ability to specify mountpoints (and hence, multiple
-streams).
+.BI \-t \ protocol
+Connect to the server using the streaming protocol
+.IR protocol .
+Protocol should be one of
+.BR http , \ xaudiocast ,\ or \ icy ,
+depending on whether your server is icecast 2, icecast 1,
+or shoutcast compatible, respectively. The default is
+.BR http .
+(Shoutcast would be most compatible but, unfortunately, that
+protocol does not support multiple mount points).
 .TP
 .BI \-n \ name
 Set the name of this stream to

<p><p>1.47      +14 -4     ices/src/setup.c

Index: setup.c
===================================================================
RCS file: /cvs/ice/ices/src/setup.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -p -u -r1.46 -r1.47
--- setup.c	9 Jul 2003 00:21:29 -0000	1.46
+++ setup.c	9 Jul 2003 00:47:04 -0000	1.47
@@ -318,7 +318,7 @@ ices_setup_parse_command_line (ices_conf
     s = argv[arg];
 
     if (s[0] == '-') {
-      if ((strchr ("BiRrsVv", s[1]) == NULL) && arg >= (argc - 1)) {
+      if ((strchr ("BRrsVv", s[1]) == NULL) && arg >= (argc - 1)) {
         fprintf (stderr, "Option %c requires an argument!\n", s[1]);
         ices_setup_usage ();
         ices_setup_shutdown ();
@@ -370,9 +370,6 @@ ices_setup_parse_command_line (ices_conf
           arg++;
           stream->out_samplerate = atoi (argv[arg]);
           break;
-        case 'i':
-	  stream->protocol = icy_protocol_e;
-	  break;
         case 'M':
           arg++;
           ices_util_free (ices_config->pm.module);
@@ -430,6 +427,19 @@ ices_setup_parse_command_line (ices_conf
           break;
         case 's':
           stream->ispublic = 0;
+	  break;
+        case 't':
+	  arg++;
+	  if (!strcmp (argv[arg], "http"))
+	    stream->protocol = http_protocol_e;
+	  else if (!strcmp (argv[arg], "xaudiocast"))
+	    stream->protocol = xaudiocast_protocol_e;
+	  else if (!strcmp (argv[arg], "icy"))
+	    stream->protocol = icy_protocol_e;
+	  else {
+	    fprintf (stderr, "Unknown protocol %s. Use 'http', 'xaudiocast' or 'icy'.\n", argv[arg]);
+	    ices_setup_shutdown ();
+	  }
           break;
         case 'u':
           arg++;

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list