comparison 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
comparison
equal deleted inserted replaced
610:862190d39e00 611:3f7a52adfe0e
20 */ 20 */
21 21
22 #ifndef AUD_MAD_H 22 #ifndef AUD_MAD_H
23 #define AUD_MAD_H 23 #define AUD_MAD_H
24 24
25 //#define DEBUG 1 25 #define DEBUG 1
26 #undef DEBUG 26 /* #define DEBUG_INTENSIVELY 1 */
27 /* #define DEBUG_DITHER 1 */
27 28
28 #undef G_LOG_DOMAIN 29 #undef G_LOG_DOMAIN
29 #define G_LOG_DOMAIN "MADPlug" 30 #define G_LOG_DOMAIN "MADPlug"
30 31
31 #include "config.h" 32 //#include "config.h" // is it needed when in src tree?
32 33
33 #undef PACKAGE 34 #undef PACKAGE
34 #define PACKAGE "audacious-plugins" 35 #define PACKAGE "audacious-plugins"
35 36
36 #include <stdlib.h> 37 #include <stdlib.h>
37 #include <stdio.h> 38 #include <stdio.h>
38 #include <string.h> 39 #include <string.h>
39 #include <unistd.h> 40 #include <unistd.h>
40 #include <audacious/plugin.h> 41 #include <audacious/plugin.h>
41 #include <audacious/titlestring.h> 42 #include <audacious/titlestring.h>
43 #include <audacious/util.h>
42 #include <audacious/strings.h> 44 #include <audacious/strings.h>
45 #include <audacious/vfs.h>
43 #include <audacious/i18n.h> 46 #include <audacious/i18n.h>
44 #include <id3tag.h> 47 #include <id3tag.h>
45 #include <mad.h> 48 #include <mad.h>
46 49
47 #include "xing.h" 50 #include "xing.h"
48 51
49 struct mad_info_t 52 struct mad_info_t
50 { 53 {
54 /* InputPlayback */
51 InputPlayback *playback; 55 InputPlayback *playback;
52 int seek; 56
57 /* flags */
58 gint seek; /**< seek time in seconds */
53 59
54 /* state */ 60 /* state */
55 guint current_frame;/**< current mp3 frame */ 61 guint current_frame;/**< current mp3 frame */
56 mad_timer_t pos; /**< current play position */ 62 mad_timer_t pos; /**< current play position */
57 63
92 gchar *url; 98 gchar *url;
93 gchar *filename; 99 gchar *filename;
94 VFSFile *infile; 100 VFSFile *infile;
95 gint offset; 101 gint offset;
96 102
97 gint remote; 103 gboolean remote;
98 struct streamdata_t *sdata; 104
99 /**< stream data for remote connections */
100 }; 105 };
101 106
102 struct audmad_config_t 107 struct audmad_config_t
103 { 108 {
104 gint http_buffer_size; 109 gint http_buffer_size;
105 gboolean fast_play_time_calc; 110 gboolean fast_play_time_calc;
106 gboolean use_xing; 111 gboolean use_xing;
107 gboolean dither; 112 gboolean dither;
113 gboolean sjis;
108 gboolean hard_limit; 114 gboolean hard_limit;
109 gchar *pregain_db; // gain applied to samples at decoding stage. 115 gchar *pregain_db; // gain applied to samples at decoding stage.
110 gdouble pregain_scale; // pow(10, pregain/20) 116 gdouble pregain_scale; // pow(10, pregain/20)
111 struct 117 struct
112 { 118 {
117 } replaygain; 123 } replaygain;
118 gboolean title_override; 124 gboolean title_override;
119 gchar *id3_format; 125 gchar *id3_format;
120 }; 126 };
121 127
128 // gcond
129 extern GMutex *mad_mutex;
130 extern GMutex *pb_mutex;
131 extern GCond *mad_cond;
132
122 void audmad_config_compute(struct audmad_config_t *config); 133 void audmad_config_compute(struct audmad_config_t *config);
123 // compute scale values from "_db" strings 134 // compute scale values from "_db" strings
124 135
125 extern gpointer decode_loop(gpointer arg); 136 extern gpointer decode_loop(gpointer arg);
126 extern void audmad_error(gchar * fmt, ...); 137 extern void audmad_error(gchar * fmt, ...);