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

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Thu Dec 9 08:35:49 PST 2004


Author: karl
Date: 2004-12-09 08:35:48 -0800 (Thu, 09 Dec 2004)
New Revision: 8356

Modified:
   icecast/branches/kh/icecast/doc/icecast2_config_file.html
   icecast/branches/kh/icecast/src/format_theora.c
   icecast/branches/kh/icecast/src/slave.c
Log:
small cleanups, add missing stats into theora from recent work


Modified: icecast/branches/kh/icecast/doc/icecast2_config_file.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_config_file.html	2004-12-08 20:13:17 UTC (rev 8355)
+++ icecast/branches/kh/icecast/doc/icecast2_config_file.html	2004-12-09 16:35:48 UTC (rev 8356)
@@ -209,6 +209,8 @@
         <port>8001</port>
         <mount>/example.ogg</mount>
         <local-mount>/different.ogg</local-mount>
+        <username>joe</username>
+        <password>soap</password>
         <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
         <on-demand>0</on-demand>
     </relay>
@@ -300,6 +302,8 @@
         <port>8001</port>
         <mount>/example.ogg</mount>
         <local-mount>/different.ogg</local-mount>
+        <username>joe</username>
+        <password>soap</password>
         <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
         <on-demand>1</on-demand>
     </relay>
@@ -322,6 +326,14 @@
 <div class="indentedbox">
 The name to use for the local mountpoint.  This is what the mount will be named on the RELAY SERVER.
 </div>
+<h4>username</h4>
+<div class="indentedbox">
+The source of the relay may require authentication itself, if so state the username here.
+</div>
+<h4>password</h4>
+<div class="indentedbox">
+The source of the relay may require authentication itself, if so state the password here.
+</div>
 <h4>relay-shoutcast-metadata</h4>
 <div class="indentedbox">
 If you are relaying a Shoutcast stream, you need to specify this indicator to also relay the metadata (song titles) that is part of the Shoutcast stream (1=enabled, 0=disabled).

Modified: icecast/branches/kh/icecast/src/format_theora.c
===================================================================
--- icecast/branches/kh/icecast/src/format_theora.c	2004-12-08 20:13:17 UTC (rev 8355)
+++ icecast/branches/kh/icecast/src/format_theora.c	2004-12-09 16:35:48 UTC (rev 8356)
@@ -49,7 +49,8 @@
 
     DEBUG0 ("freeing theora codec");
     stats_event (ogg_info->mount, "video_bitrate", NULL);
-    stats_event (ogg_info->mount, "framerate", NULL);
+    stats_event (ogg_info->mount, "video_quality", NULL);
+    stats_event (ogg_info->mount, "frame_rate", NULL);
     stats_event (ogg_info->mount, "frame_size", NULL);
     theora_info_clear (&theora->ti);
     theora_comment_clear (&theora->tc);
@@ -90,6 +91,19 @@
             }
             header_page = 1;
             codec->headers++;
+            if (codec->headers == 3)
+            {
+                ogg_info->bitrate += theora->ti.target_bitrate;
+                stats_event_args (ogg_info->mount, "video_bitrate", "%ld",
+                        (long)theora->ti.target_bitrate);
+                stats_event_args (ogg_info->mount, "video_quality", "%ld",
+                        (long)theora->ti.quality);
+                stats_event_args (ogg_info->mount, "frame_size", "%ld x %ld",
+                        (long)theora->ti.frame_width,
+                        (long)theora->ti.frame_height);
+                stats_event_args (ogg_info->mount, "frame_rate", "%.2f",
+                        (float)theora->ti.fps_numerator/theora->ti.fps_denominator);
+            }
             continue;
         }
         if (codec->headers < 3)

Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c	2004-12-08 20:13:17 UTC (rev 8355)
+++ icecast/branches/kh/icecast/src/slave.c	2004-12-09 16:35:48 UTC (rev 8356)
@@ -79,8 +79,10 @@
     xmlFree (relay->server);
     xmlFree (relay->mount);
     xmlFree (relay->localmount);
-    xmlFree (relay->username);
-    xmlFree (relay->password);
+    if (relay->username)
+        xmlFree (relay->username);
+    if (relay->password)
+        xmlFree (relay->password);
     free (relay);
     return next;
 }
@@ -95,8 +97,10 @@
         copy->server = xmlStrdup (r->server);
         copy->mount = xmlStrdup (r->mount);
         copy->localmount = xmlStrdup (r->localmount);
-        copy->username = xmlStrdup (r->username);
-        copy->password = xmlStrdup (r->password);
+        if (r->username)
+            copy->username = xmlStrdup (r->username);
+        if (r->password)
+            copy->password = xmlStrdup (r->password);
         copy->port = r->port;
         copy->mp3metadata = r->mp3metadata;
         copy->on_demand = r->on_demand;



More information about the commits mailing list