Enlightenment CVS committal

Author  : tsauerbeck
Project : misc
Module  : eplayer

Dir     : misc/eplayer/src


Modified Files:
        interface.c playlist_item.c playlist_item.h plugin.h 


Log Message:
added support for bitrate and sample rate parts
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/interface.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- interface.c 14 Feb 2004 11:00:38 -0000      1.53
+++ interface.c 15 Feb 2004 18:12:40 -0000      1.54
@@ -1,5 +1,5 @@
 /*
- * $Id: interface.c,v 1.53 2004/02/14 11:00:38 tsauerbeck Exp $
+ * $Id: interface.c,v 1.54 2004/02/15 18:12:40 tsauerbeck Exp $
  */
 
 #include <config.h>
@@ -176,6 +176,7 @@
 
 void ui_fill_track_info(ePlayer *player) {
        PlayListItem *pli;
+       char buf[128];
 
        if (!(pli = playlist_current_item_get(player->playlist)))
                return;
@@ -196,6 +197,18 @@
                                  pli->comment[COMMENT_ID_ARTIST]);
        edje_object_part_text_set(player->gui.edje, "album_name",
                                  pli->comment[COMMENT_ID_ALBUM]);
+
+       /* sample rate */
+       snprintf(buf, sizeof(buf), "%.1f",
+                (float) pli->sample_rate / 1000);
+       edje_object_part_text_set(player->gui.edje, "track_sample_rate",
+                                 buf);
+
+       /* bitrate */
+       snprintf(buf, sizeof(buf), "%.1f",
+                (float) pli->bitrate / 1000);
+       edje_object_part_text_set(player->gui.edje, "track_bitrate",
+                                 buf);
 }
 
 bool ui_init_edje(ePlayer *player, const char *name) {
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/playlist_item.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- playlist_item.c     14 Feb 2004 11:00:38 -0000      1.7
+++ playlist_item.c     15 Feb 2004 18:12:40 -0000      1.8
@@ -1,5 +1,5 @@
 /*
- * $Id: playlist_item.c,v 1.7 2004/02/14 11:00:38 tsauerbeck Exp $
+ * $Id: playlist_item.c,v 1.8 2004/02/15 18:12:40 tsauerbeck Exp $
  */
 
 #include <config.h>
@@ -22,6 +22,7 @@
        pli->channels = pli->plugin->get_channels();
        pli->duration = pli->plugin->get_duration();
        pli->sample_rate = pli->plugin->get_sample_rate();
+       pli->bitrate = pli->plugin->get_bitrate();
 
        for (i = 0; i < COMMENT_ID_NUM; i++)
                snprintf(pli->comment[i], MAX_COMMENT_LEN, "%s",
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/playlist_item.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- playlist_item.h     3 Feb 2004 22:01:57 -0000       1.3
+++ playlist_item.h     15 Feb 2004 18:12:40 -0000      1.4
@@ -2,7 +2,7 @@
 #define __PLAYLIST_ITEM_H
 
 /*
- * $Id: playlist_item.h,v 1.3 2004/02/03 22:01:57 tsauerbeck Exp $
+ * $Id: playlist_item.h,v 1.4 2004/02/15 18:12:40 tsauerbeck Exp $
  */
 
 #include <Evas.h>
@@ -18,6 +18,7 @@
        int duration;
        int channels; /* number of channels */
        long sample_rate; /* sample rate */
+       int bitrate;
 
        int current_pos;
        pthread_mutex_t pos_mutex;
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/plugin.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- plugin.h    1 Feb 2004 12:03:53 -0000       1.7
+++ plugin.h    15 Feb 2004 18:12:40 -0000      1.8
@@ -2,7 +2,7 @@
 #define __PLUGIN_H
 
 /*
- * $Id: plugin.h,v 1.7 2004/02/01 12:03:53 tsauerbeck Exp $
+ * $Id: plugin.h,v 1.8 2004/02/15 18:12:40 tsauerbeck Exp $
  */
 
 #include "utils.h"
@@ -37,6 +37,7 @@
        int (*get_duration)();
        int (*get_channels)();
        int (*get_sample_rate)();
+       int (*get_bitrate)();
        
        int (*read)(unsigned char **buf);
 




-------------------------------------------------------
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