comparison src/alac/plugin.c @ 559:d5782f3bd760 trunk

[svn] Update plugins to the new input plugin API
author iabervon
date Sun, 28 Jan 2007 17:02:41 -0800
parents d124034ebea3
children 914c96de3244
comparison
equal deleted inserted replaced
558:324a6d834f32 559:d5782f3bd760
176 vfs_fclose(input_file); 176 vfs_fclose(input_file);
177 177
178 return build_tuple_from_demux(&demux_res, filename); 178 return build_tuple_from_demux(&demux_res, filename);
179 } 179 }
180 180
181 static void play_file(char *filename) 181 static void play_file(InputPlayback *data)
182 { 182 {
183 char *filename = data->filename;
183 going = 1; 184 going = 1;
184 playback_thread = g_thread_create(decode_thread, filename, TRUE, NULL); 185 playback_thread = g_thread_create(decode_thread, filename, TRUE, NULL);
185 } 186 }
186 187
187 static void stop(void) 188 static void stop(InputPlayback * data)
188 { 189 {
189 going = 0; 190 going = 0;
190 g_thread_join(playback_thread); 191 g_thread_join(playback_thread);
191 output_close_audio(); 192 output_close_audio();
192 } 193 }
193 194
194 static void seek(gint time) 195 static void do_pause(InputPlayback *data, short paused)
196 {
197 output_pause(paused);
198 }
199
200 static void seek(InputPlayback * data, gint time)
195 { 201 {
196 seek_to = time; 202 seek_to = time;
197 } 203 }
198 204
199 static gint get_time(void) 205 static gint get_time(InputPlayback *data)
200 { 206 {
201 if (going) 207 if (going)
202 return get_output_time(); 208 return get_output_time();
203 else 209 else
204 return -1; 210 return -1;
215 NULL, 221 NULL,
216 NULL, 222 NULL,
217 NULL, 223 NULL,
218 play_file, 224 play_file,
219 stop, 225 stop,
220 output_pause, 226 do_pause,
221 seek, 227 seek,
222 NULL, 228 NULL,
223 get_time, 229 get_time,
224 NULL, 230 NULL,
225 NULL, 231 NULL,