[xiph-commits] r8354 - icecast/trunk/icecast/src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Wed Dec 8 11:31:34 PST 2004


Author: karl
Date: 2004-12-08 11:31:33 -0800 (Wed, 08 Dec 2004)
New Revision: 8354

Modified:
   icecast/trunk/icecast/src/format_theora.c
Log:
added theora stats


Modified: icecast/trunk/icecast/src/format_theora.c
===================================================================
--- icecast/trunk/icecast/src/format_theora.c	2004-12-08 14:04:20 UTC (rev 8353)
+++ icecast/trunk/icecast/src/format_theora.c	2004-12-08 19:31:33 UTC (rev 8354)
@@ -90,6 +90,17 @@
             }
             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, "frame_size", "%ld x %ld",
+                        (long)theora->ti.frame_width,
+                        (long)theora->ti.frame_height);
+                stats_event_args (ogg_info->mount, "framerate", "%.2f",
+                        (float)theora->ti.fps_numerator/theora->ti.fps_denominator);
+            }
             continue;
         }
         if (codec->headers < 3)



More information about the commits mailing list