comparison src/icecast/icecast.c @ 3046:75cd491339c9

ported icecast plugin, fixed possibly uninitialized variable in cue plugin
author Andrew O. Shadoura <bugzilla@tut.by>
date Fri, 17 Apr 2009 16:11:16 +0300
parents 947ac5c18ad3
children ca7d5de41217
comparison
equal deleted inserted replaced
3045:85f036d3e641 3046:75cd491339c9
93 guint64 offset = 0; 93 guint64 offset = 0;
94 Tuple *tuple = NULL; 94 Tuple *tuple = NULL;
95 static shout_t *shout = NULL; 95 static shout_t *shout = NULL;
96 static gboolean paused = FALSE; 96 static gboolean paused = FALSE;
97 97
98 static void ice_init(void); 98 static OutputPluginInitStatus ice_init(void);
99 static void ice_cleanup(void); 99 static void ice_cleanup(void);
100 static void ice_about(void); 100 static void ice_about(void);
101 static gint ice_open(AFormat fmt, gint rate, gint nch); 101 static gint ice_open(AFormat fmt, gint rate, gint nch);
102 static void ice_write(void *ptr, gint length); 102 static void ice_write(void *ptr, gint length);
103 static gint ice_write_output(void *ptr, gint length); 103 static gint ice_write_output(void *ptr, gint length);
113 static int ice_mod_samples(gpointer * d, gint length, AFormat afmt, gint srate, gint nch); 113 static int ice_mod_samples(gpointer * d, gint length, AFormat afmt, gint srate, gint nch);
114 114
115 OutputPlugin ice_op = 115 OutputPlugin ice_op =
116 { 116 {
117 .description = "Icecast Plugin (output)", 117 .description = "Icecast Plugin (output)",
118 .probe_priority = 0,
118 .init = ice_init, 119 .init = ice_init,
119 .cleanup = ice_cleanup, 120 .cleanup = ice_cleanup,
120 .about = ice_about, 121 .about = ice_about,
121 .configure = ice_configure, 122 .configure = ice_configure,
122 .open_audio = ice_open, 123 .open_audio = ice_open,
159 if (streamformat == VORBIS) 160 if (streamformat == VORBIS)
160 plugin_new = vorbis_plugin; 161 plugin_new = vorbis_plugin;
161 #endif 162 #endif
162 } 163 }
163 164
164 static void ice_init(void) 165 static OutputPluginInitStatus ice_init(void)
165 { 166 {
166 ConfigDb *db; 167 ConfigDb *db;
167 shout_init(); 168 shout_init();
168 g_message("Using libshout %s", shout_version(NULL, NULL, NULL)); 169 g_message("Using libshout %s", shout_version(NULL, NULL, NULL));
169 170
199 200
200 set_plugin(); 201 set_plugin();
201 plugin = plugin_new; 202 plugin = plugin_new;
202 if (plugin.init) 203 if (plugin.init)
203 plugin.init(&ice_write_output); 204 plugin.init(&ice_write_output);
205
206 return OUTPUT_PLUGIN_INIT_NO_DEVICES;
204 } 207 }
205 208
206 static void ice_cleanup(void) 209 static void ice_cleanup(void)
207 { 210 {
208 if (shout) 211 if (shout)