[xiph-commits] r9065 - in icecast/branches/kh/icecast: doc src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Fri Mar 11 17:37:15 PST 2005


Author: karl
Date: 2005-03-11 17:37:10 -0800 (Fri, 11 Mar 2005)
New Revision: 9065

Modified:
   icecast/branches/kh/icecast/doc/icecast2_config_file.html
   icecast/branches/kh/icecast/src/client.h
   icecast/branches/kh/icecast/src/format_mp3.c
   icecast/branches/kh/icecast/src/format_vorbis.c
   icecast/branches/kh/icecast/src/main.c
   icecast/branches/kh/icecast/src/slave.c
   icecast/branches/kh/icecast/src/source.c
   icecast/branches/kh/icecast/src/xslt.c
Log:
source stats in a slave setup should not be removed on master update, properly
fixup the unnecessary header setup in the vorbis handler, the rest is small
cleanups or resync with changes made in trunk


Modified: icecast/branches/kh/icecast/doc/icecast2_config_file.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_config_file.html	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/doc/icecast2_config_file.html	2005-03-12 01:37:10 UTC (rev 9065)
@@ -148,7 +148,7 @@
 <pre>
     &lt;hostname&gt;localhost&lt;hostname&gt;
 
-    &lt;-- You can use these two if you only want a single listener --&gt;
+    &lt;-- You can use these two if you only want a single listening socket --&gt;
     &lt;-- &lt;port&gt;8000&lt;/port&gt; --&gt;
     &lt;-- &lt;bind-address&gt;127.0.0.1&lt;/bind-address&gt; --&gt;
 
@@ -166,7 +166,7 @@
     &lt;fileserve&gt;1&lt;/fileserve&gt;
     &lt;shoutcast-mount&gt;/live.nsv&lt;/shoutcast-mount&gt;
 </pre>
-<p>This section contains miscellaneous server settings.  Note that multiple listen-socket sections may be configured in order to have icecast2 listen on multiple network interfaces.  If a bind-address is not specified for a particular listen-socket, then the hostname parameter will be used to specify the address that will be bound.
+<p>This section contains miscellaneous server settings.  Note that multiple listen-socket sections may be configured in order to have icecast2 listen on multiple network interfaces.  If a bind-address is not specified for a particular listen-socket, then the socket will be bound to all interfaces. Generally, you won't need to set bind-address.
 </p>
 <h4>port</h4>
 <div class="indentedbox">
@@ -174,7 +174,7 @@
 </div>
 <h4>bind-address</h4>
 <div class="indentedbox">
-And option IP address that can be used to bind to a specific network card.  If not supplied, then &lt;hostname&gt; will be used.
+An optional IP address that can be used to bind to a specific network card.  If not supplied, then it will bind to all interfaces.
 </div>
 <h4>shoutcast-compat</h4>
 <div class="indentedbox">

Modified: icecast/branches/kh/icecast/src/client.h
===================================================================
--- icecast/branches/kh/icecast/src/client.h	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/src/client.h	2005-03-12 01:37:10 UTC (rev 9065)
@@ -18,7 +18,7 @@
 #ifndef __CLIENT_H__
 #define __CLIENT_H__
 
-#ifndef WIN32
+#ifdef HAVE_AIO
 #include <aio.h>
 #endif
 

Modified: icecast/branches/kh/icecast/src/format_mp3.c
===================================================================
--- icecast/branches/kh/icecast/src/format_mp3.c	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/src/format_mp3.c	2005-03-12 01:37:10 UTC (rev 9065)
@@ -111,8 +111,11 @@
     if (metadata)
     {
         state->inline_metadata_interval = atoi (metadata);
-        state->offset = 0;
-        plugin->get_buffer = mp3_get_filter_meta;
+        if (state->inline_metadata_interval)
+        {
+            state->offset = 0;
+            plugin->get_buffer = mp3_get_filter_meta;
+        }
     }
     source->format = plugin;
     thread_mutex_create ("mp3 url lock", &state->url_lock);

Modified: icecast/branches/kh/icecast/src/format_vorbis.c
===================================================================
--- icecast/branches/kh/icecast/src/format_vorbis.c	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/src/format_vorbis.c	2005-03-12 01:37:10 UTC (rev 9065)
@@ -200,7 +200,11 @@
 
     format_ogg_free_headers (ogg_info);
     source_vorbis->get_buffer_page = NULL;
-    source_vorbis->process_packet = NULL;
+    if (source_vorbis->prev_packet)
+        source_vorbis->process_packet = process_vorbis_headers;
+    else
+        source_vorbis->process_packet = NULL;
+
     if (source_vorbis->initial_audio_packet == 0)
         source_vorbis->prev_window = 0;
 
@@ -264,6 +268,8 @@
         if (packet.e_o_s)
         {
             initiate_flush (source_vorbis);
+            free_ogg_packet (source_vorbis->prev_packet);
+            source_vorbis->prev_packet = NULL;
             return 1;
         }
 
@@ -275,6 +281,7 @@
     {
         initiate_flush (source_vorbis);
         source_vorbis->stream_notify = 0;
+        return 1;
     }
     return -1;
 }
@@ -329,7 +336,6 @@
  */
 ogg_codec_t *initial_vorbis_page (format_plugin_t *plugin, ogg_page *page)
 {
-    // ogg_state_t *ogg_info = plugin->_state;
     ogg_codec_t *codec = calloc (1, sizeof (ogg_codec_t));
     ogg_packet packet;
 

Modified: icecast/branches/kh/icecast/src/main.c
===================================================================
--- icecast/branches/kh/icecast/src/main.c	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/src/main.c	2005-03-12 01:37:10 UTC (rev 9065)
@@ -75,10 +75,9 @@
 static void _print_usage()
 {
     printf(ICECAST_VERSION_STRING "\n\n");
-    printf("usage: icecast [-h -b -v] -c <file>\n");
+    printf("usage: icecast [-b -v] -c <file>\n");
     printf("options:\n");
     printf("\t-c <file>\tSpecify configuration file\n");
-    printf("\t-h\t\tDisplay usage\n");
     printf("\t-v\t\tDisplay version info\n");
     printf("\t-b\t\tRun icecast in the background\n");
     printf("\n");

Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/src/slave.c	2005-03-12 01:37:10 UTC (rev 9065)
@@ -525,16 +525,19 @@
 
     while (to_free)
     {
-        if (to_free->running && to_free->source)
+        if (to_free->source)
         {
-            /* relay has been removed from xml, shut down active relay */
-            DEBUG1 ("source shutdown request on \"%s\"", to_free->localmount);
-            to_free->source->running = 0;
-            thread_join (to_free->thread);
-            update_settings = 1;
+            if (to_free->running)
+            {
+                /* relay has been removed from xml, shut down active relay */
+                DEBUG1 ("source shutdown request on \"%s\"", to_free->localmount);
+                to_free->source->running = 0;
+                thread_join (to_free->thread);
+                update_settings = 1;
+            }
+            else
+                stats_event (to_free->localmount, NULL, NULL);
         }
-        else
-            stats_event (to_free->localmount, NULL, NULL);
         to_free = relay_free (to_free);
     }
 

Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/src/source.c	2005-03-12 01:37:10 UTC (rev 9065)
@@ -50,6 +50,7 @@
 #include "format.h"
 #include "fserve.h"
 #include "auth.h"
+#include "os.h"
 
 #undef CATMODULE
 #define CATMODULE "source"
@@ -615,7 +616,8 @@
      * if so, check to see if this client is still referring to it */
     if (deletion_expected && client->refbuf == source->stream_data)
     {
-        DEBUG0("Client has fallen too far behind, removing");
+        INFO2 ("Client %lu (%s) has fallen too far behind, removing",
+                client->con->id, client->con->ip);
         client->con->error = 1;
         ret = 1;
     }
@@ -1040,11 +1042,11 @@
     {
         ice_config_t *config = config_get_config_unlocked ();
         unsigned int len  = strlen (config->webroot_dir) +
-            strlen (mountinfo->intro_filename) + 1;
+            strlen (mountinfo->intro_filename) + 2;
         char *path = malloc (len);
         if (path)
         {
-            snprintf (path, len, "%s%s", config->webroot_dir,
+            snprintf (path, len, "%s" PATH_SEPARATOR "%s", config->webroot_dir,
                     mountinfo->intro_filename);
 
             source->intro_file = fopen (path, "rb");

Modified: icecast/branches/kh/icecast/src/xslt.c
===================================================================
--- icecast/branches/kh/icecast/src/xslt.c	2005-03-11 21:12:47 UTC (rev 9064)
+++ icecast/branches/kh/icecast/src/xslt.c	2005-03-12 01:37:10 UTC (rev 9065)
@@ -107,7 +107,8 @@
     struct stat file;
 
     if(stat(fn, &file)) {
-        DEBUG1("Error checking for stylesheet file: %s", strerror(errno));
+        WARN2("Error checking for stylesheet file \"%s\": %s", fn, 
+                strerror(errno));
         return NULL;
     }
 



More information about the commits mailing list