diff src/madplug/plugin.h @ 611:3f7a52adfe0e trunk

[svn] merge recent changes from yaz's branch. - stable shoutcast playback. - tag handling improvement. - view track detail on streaming won't crash. (disabled.) - filepopup for streaming is partially supported. filepopup displays track name and stream name, but not updated automatically.
author yaz
date Tue, 06 Feb 2007 12:11:42 -0800
parents 862190d39e00
children 3d734efe82d0
line wrap: on
line diff
--- a/src/madplug/plugin.h	Mon Feb 05 12:28:01 2007 -0800
+++ b/src/madplug/plugin.h	Tue Feb 06 12:11:42 2007 -0800
@@ -22,13 +22,14 @@
 #ifndef AUD_MAD_H
 #define AUD_MAD_H
 
-//#define DEBUG 1
-#undef DEBUG
+#define DEBUG 1
+/* #define DEBUG_INTENSIVELY 1 */
+/* #define DEBUG_DITHER 1 */
 
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "MADPlug"
 
-#include "config.h"
+//#include "config.h" // is it needed when in src tree?
 
 #undef PACKAGE
 #define PACKAGE "audacious-plugins"
@@ -39,7 +40,9 @@
 #include <unistd.h>
 #include <audacious/plugin.h>
 #include <audacious/titlestring.h>
+#include <audacious/util.h>
 #include <audacious/strings.h>
+#include <audacious/vfs.h>
 #include <audacious/i18n.h>
 #include <id3tag.h>
 #include <mad.h>
@@ -48,8 +51,11 @@
 
 struct mad_info_t
 {
+    /* InputPlayback */
     InputPlayback *playback;
-    int seek;
+
+    /* flags */
+    gint seek;      /**< seek time in seconds */
 
     /* state */
     guint current_frame;/**< current mp3 frame */
@@ -94,9 +100,8 @@
     VFSFile *infile;
     gint offset;
 
-    gint remote;
-    struct streamdata_t *sdata;
-                  /**< stream data for remote connections */
+    gboolean remote;
+
 };
 
 struct audmad_config_t
@@ -105,6 +110,7 @@
     gboolean fast_play_time_calc;
     gboolean use_xing;
     gboolean dither;
+    gboolean sjis;
     gboolean hard_limit;
     gchar *pregain_db;          // gain applied to samples at decoding stage.
     gdouble pregain_scale;      // pow(10, pregain/20)
@@ -119,6 +125,11 @@
     gchar *id3_format;
 };
 
+// gcond
+extern GMutex *mad_mutex;
+extern GMutex *pb_mutex;
+extern GCond *mad_cond;
+
 void audmad_config_compute(struct audmad_config_t *config);
 // compute scale values from "_db" strings