From 92e2c8f81c1e7fec15690cf8b3fed386f08623a0 Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Wed, 8 Dec 2004 19:31:33 +0000 Subject: [PATCH] added theora stats svn path=/icecast/trunk/icecast/; revision=8354 --- src/format_theora.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/format_theora.c b/src/format_theora.c index 5ce4b354..09556dec 100644 --- a/src/format_theora.c +++ b/src/format_theora.c @@ -90,6 +90,17 @@ static refbuf_t *process_theora_page (ogg_state_t *ogg_info, ogg_codec_t *codec, } 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)