Mercurial > audlegacy-plugins
comparison src/alac/plugin.c @ 332:626f9f4d79a8 trunk
[svn] Remove old-style is_our_file() where a new-style is_our_fd() exists
author | kiyoshi |
---|---|
date | Tue, 05 Dec 2006 01:07:41 -0800 |
parents | 74df3bd6f472 |
children | a157306caf03 |
comparison
equal
deleted
inserted
replaced
331:5c4a9e4ba3be | 332:626f9f4d79a8 |
---|---|
94 static void alac_init(void) | 94 static void alac_init(void) |
95 { | 95 { |
96 /* empty */ | 96 /* empty */ |
97 } | 97 } |
98 | 98 |
99 gboolean is_our_file(char *filename) | |
100 { | |
101 demux_res_t demux_res; | |
102 VFSFile *input_file; | |
103 stream_t *input_stream; | |
104 | |
105 input_file = vfs_fopen(filename, "rb"); | |
106 input_stream = stream_create_file(input_file, 1); | |
107 | |
108 set_endian(); | |
109 | |
110 if (!input_stream) | |
111 { | |
112 vfs_fclose(input_file); | |
113 return FALSE; | |
114 } | |
115 | |
116 /* if qtmovie_read returns successfully, the stream is up to | |
117 * the movie data, which can be used directly by the decoder */ | |
118 if (!qtmovie_read(input_stream, &demux_res)) | |
119 { | |
120 stream_destroy(input_stream); | |
121 vfs_fclose(input_file); | |
122 return FALSE; | |
123 } | |
124 | |
125 stream_destroy(input_stream); | |
126 vfs_fclose(input_file); | |
127 | |
128 return TRUE; | |
129 } | |
130 | |
131 gboolean is_our_fd(char *filename, VFSFile* input_file) | 99 gboolean is_our_fd(char *filename, VFSFile* input_file) |
132 { | 100 { |
133 demux_res_t demux_res; | 101 demux_res_t demux_res; |
134 stream_t *input_stream; | 102 stream_t *input_stream; |
135 | 103 |
241 NULL, | 209 NULL, |
242 "Apple Lossless Plugin", /* Description */ | 210 "Apple Lossless Plugin", /* Description */ |
243 alac_init, | 211 alac_init, |
244 alac_about, | 212 alac_about, |
245 NULL, | 213 NULL, |
246 is_our_file, | 214 NULL, |
247 NULL, | 215 NULL, |
248 play_file, | 216 play_file, |
249 stop, | 217 stop, |
250 output_pause, | 218 output_pause, |
251 seek, | 219 seek, |