Enlightenment CVS committal

Author  : tsauerbeck
Project : misc
Module  : eplayer

Dir     : misc/eplayer/src/input/vorbis


Modified Files:
        vorbis.c 


Log Message:
added support for bitrate and sample rate parts
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/input/vorbis/vorbis.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- vorbis.c    1 Feb 2004 12:03:54 -0000       1.8
+++ vorbis.c    15 Feb 2004 18:12:40 -0000      1.9
@@ -1,5 +1,5 @@
 /*
- * $Id: vorbis.c,v 1.8 2004/02/01 12:03:54 tsauerbeck Exp $
+ * $Id: vorbis.c,v 1.9 2004/02/15 18:12:40 tsauerbeck Exp $
  */
 
 #include <config.h>
@@ -10,7 +10,7 @@
 
 static OggVorbis_File track = {0};
 static char comment[COMMENT_ID_NUM][MAX_COMMENT_LEN] = {{0}};
-static int channels = 0, sample_rate = 0, duration = 0;
+static int channels = 0, sample_rate = 0, duration = 0, bitrate = 0;
 
 static void parse_comments(vorbis_comment *vc) {
        char *cmt, *key[COMMENT_ID_NUM] = {NULL};
@@ -60,6 +60,7 @@
        sample_rate = info->rate;
        channels = info->channels;
        duration = ov_time_total(&track, -1);
+       bitrate = ov_bitrate(&track, -1);
 
        return 1;
 }
@@ -85,6 +86,10 @@
        return sample_rate;
 }
 
+int vorbis_get_bitrate() {
+       return bitrate;
+}
+
 int vorbis_read(unsigned char **buf) {
 #define BUF_SIZE 4096
        static unsigned char outbuf[BUF_SIZE];
@@ -120,6 +125,7 @@
        ip->get_duration = vorbis_get_duration;
        ip->get_channels = vorbis_get_channels;
        ip->get_sample_rate = vorbis_get_sample_rate;
+       ip->get_bitrate = vorbis_get_bitrate;
        
        ip->read = vorbis_read;
        




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to