[xiph-cvs] cvs commit: ices/src definitions.h ices_config.c icestypes.h setup.c

Brendan brendan at xiph.org
Wed Mar 12 13:21:26 PST 2003



brendan     03/03/12 16:21:26

  Modified:    src      definitions.h ices_config.c icestypes.h setup.c
  Log:
  Initialize logging earlier.
  Some cosmetics.

Revision  Changes    Path
1.12      +1 -1      ices/src/definitions.h

Index: definitions.h
===================================================================
RCS file: /cvs/ice/ices/src/definitions.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- definitions.h	10 Dec 2002 02:05:36 -0000	1.11
+++ definitions.h	12 Mar 2003 21:21:26 -0000	1.12
@@ -123,7 +123,7 @@
 #define ICES_DEFAULT_PORT 8000
 #define ICES_DEFAULT_MOUNT "/ices"
 #define ICES_DEFAULT_PASSWORD "letmein"
-#define ICES_DEFAULT_HEADER_PROTOCOL xaudiocast_header_protocol_e
+#define ICES_DEFAULT_PROTOCOL xaudiocast_protocol_e
 #define ICES_DEFAULT_NAME "Default stream name"
 #define ICES_DEFAULT_GENRE "Default genre"
 #define ICES_DEFAULT_DESCRIPTION "Default description"

<p><p>1.10      +3 -3      ices/src/ices_config.c

Index: ices_config.c
===================================================================
RCS file: /cvs/ice/ices/src/ices_config.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ices_config.c	5 Mar 2003 16:15:44 -0000	1.9
+++ ices_config.c	12 Mar 2003 21:21:26 -0000	1.10
@@ -215,11 +215,11 @@
       unsigned char *str = ices_xml_read_node (doc, cur);
 
       if (str && (strcasecmp(str, "icy") == 0))
-	ices_config->header_protocol = icy_header_protocol_e;
+	ices_config->protocol = icy_protocol_e;
       else if (str && (strcasecmp(str, "http") == 0))
-	ices_config->header_protocol = http_header_protocol_e;
+	ices_config->protocol = http_protocol_e;
       else
-	ices_config->header_protocol = xaudiocast_header_protocol_e;
+	ices_config->protocol = xaudiocast_protocol_e;
     } else {
       ices_log ("Unknown Server keyword: %s", cur->name);
     }

<p><p>1.20      +5 -5      ices/src/icestypes.h

Index: icestypes.h
===================================================================
RCS file: /cvs/ice/ices/src/icestypes.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- icestypes.h	5 Mar 2003 16:15:44 -0000	1.19
+++ icestypes.h	12 Mar 2003 21:21:26 -0000	1.20
@@ -23,10 +23,10 @@
 #define _ICES_ICESTYPES_H
 
 typedef enum {
-  icy_header_protocol_e,
-  xaudiocast_header_protocol_e,
-  http_header_protocol_e
-} header_protocol_t;
+  icy_protocol_e,
+  xaudiocast_protocol_e,
+  http_protocol_e
+} protocol_t;
 
 typedef enum {
   ices_playlist_builtin_e,
@@ -44,7 +44,7 @@
   char *host;
   int port;
   char *password;
-  header_protocol_t header_protocol;
+  protocol_t protocol;
 
   char* mount;
   char* dumpfile;

<p><p>1.42      +13 -13    ices/src/setup.c

Index: setup.c
===================================================================
RCS file: /cvs/ice/ices/src/setup.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- setup.c	5 Mar 2003 16:15:44 -0000	1.41
+++ setup.c	12 Mar 2003 21:21:26 -0000	1.42
@@ -58,6 +58,9 @@
   if (ices_config.daemon)
     ices_setup_daemonize ();
 
+  /* Open logfiles */
+  ices_log_initialize ();
+
   /* Initialize the libshout structure */
   for (stream = ices_config.streams; stream; stream = stream->next) {
     if (!(stream->conn = shout_new ())) {
@@ -68,9 +71,6 @@
 
   ices_setup_activate_libshout_changes (&ices_config);
 
-  /* Open logfiles */
-  ices_log_initialize ();
-
   /* Initialize the playlist handler */
   ices_playlist_initialize ();
 
@@ -174,7 +174,7 @@
   stream->host = ices_util_strdup (ICES_DEFAULT_HOST);
   stream->port = ICES_DEFAULT_PORT;
   stream->password = ices_util_strdup (ICES_DEFAULT_PASSWORD);
-  stream->header_protocol = ICES_DEFAULT_HEADER_PROTOCOL;
+  stream->protocol = ICES_DEFAULT_PROTOCOL;
 
   stream->mount = ices_util_strdup (ICES_DEFAULT_MOUNT);
   stream->dumpfile = NULL;
@@ -369,7 +369,7 @@
           stream->out_samplerate = atoi (argv[arg]);
           break;
         case 'i':
-	  stream->header_protocol = icy_header_protocol_e;
+	  stream->protocol = icy_protocol_e;
           break;
         case 'l':
                     ices_config->pm.loop_playlist = 0;
@@ -473,9 +473,9 @@
     shout_set_port (conn, stream->port);
     shout_set_password (conn, stream->password);
     shout_set_format (conn, SHOUT_FORMAT_MP3);
-    if (stream->header_protocol == icy_header_protocol_e)
+    if (stream->protocol == icy_protocol_e)
       shout_set_protocol(conn, SHOUT_PROTOCOL_ICY);
-    else if (stream->header_protocol == http_header_protocol_e)
+    else if (stream->protocol == http_protocol_e)
       shout_set_protocol(conn, SHOUT_PROTOCOL_HTTP);
     else
       shout_set_protocol(conn, SHOUT_PROTOCOL_XAUDIOCAST);
@@ -495,17 +495,17 @@
 
     ices_log_debug ("Sending following information to libshout:");
     ices_log_debug ("Stream: %d", streamno);
-    ices_log_debug ("Host: %s\tPort: %d", shout_get_host (conn), shout_get_port (conn));
-    ices_log_debug ("Password: %s\tIcy Compat: %d", shout_get_password (conn),
-		    (shout_get_protocol(conn) == SHOUT_PROTOCOL_ICY) ? 1 : 0);
+    ices_log_debug ("Host: %s:%d (protocol: %s)", shout_get_host (conn),
+                    shout_get_port (conn),
+		    stream->protocol == icy_protocol_e ? "icy" :
+		      stream->protocol == http_protocol_e ? "http" : "xaudiocast");
+    ices_log_debug ("Mount: %s, Password: %s", shout_get_mount (conn), shout_get_password (conn));
     ices_log_debug ("Name: %s\tURL: %s", shout_get_name (conn), shout_get_url(conn));
     ices_log_debug ("Genre: %s\tDesc: %s", shout_get_genre (conn),
                     shout_get_description (conn));
     ices_log_debug ("Bitrate: %s\tPublic: %d", shout_get_audio_info (conn, SHOUT_AI_BITRATE),
                     shout_get_public (conn));
-    ices_log_debug ("Mount: %s\tDumpfile: %s",
-		    shout_get_mount (conn),
-		    ices_util_nullcheck (shout_get_dumpfile (conn)));
+    ices_log_debug ("Dump file: %s", ices_util_nullcheck (shout_get_dumpfile (conn)));
     streamno++;
   }
 }

<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