comparison src/alac/plugin.c @ 261:9ce03bf021ae trunk

[svn] So input.c wants to have the old-style function available...
author chainsaw
date Sat, 18 Nov 2006 16:26:08 -0800
parents acb93b546742
children 74df3bd6f472
comparison
equal deleted inserted replaced
260:4f7b72c88319 261:9ce03bf021ae
84 static void alac_init(void) 84 static void alac_init(void)
85 { 85 {
86 /* empty */ 86 /* empty */
87 } 87 }
88 88
89 gboolean is_our_file(char *filename)
90 {
91 demux_res_t demux_res;
92 VFSFile *input_file;
93 stream_t *input_stream;
94
95 input_file = vfs_fopen(filename, "rb");
96 input_stream = stream_create_file(input_file, 1);
97
98 set_endian();
99
100 if (!input_stream)
101 {
102 vfs_fclose(input_file);
103 return FALSE;
104 }
105
106 /* if qtmovie_read returns successfully, the stream is up to
107 * the movie data, which can be used directly by the decoder */
108 if (!qtmovie_read(input_stream, &demux_res))
109 {
110 stream_destroy(input_stream);
111 vfs_fclose(input_file);
112 return FALSE;
113 }
114
115 stream_destroy(input_stream);
116 vfs_fclose(input_file);
117
118 return TRUE;
119 }
120
89 gboolean is_our_fd(char *filename, VFSFile* input_file) 121 gboolean is_our_fd(char *filename, VFSFile* input_file)
90 { 122 {
91 demux_res_t demux_res; 123 demux_res_t demux_res;
92 stream_t *input_stream; 124 stream_t *input_stream;
93 125
199 NULL, 231 NULL,
200 "Apple Lossless Plugin", /* Description */ 232 "Apple Lossless Plugin", /* Description */
201 alac_init, 233 alac_init,
202 alac_about, 234 alac_about,
203 NULL, 235 NULL,
204 NULL, 236 is_our_file,
205 NULL, 237 NULL,
206 play_file, 238 play_file,
207 stop, 239 stop,
208 output_pause, 240 output_pause,
209 seek, 241 seek,