Mercurial > audlegacy-plugins
diff 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 |
line wrap: on
line diff
--- a/src/alac/plugin.c Sat Nov 18 16:21:15 2006 -0800 +++ b/src/alac/plugin.c Sat Nov 18 16:26:08 2006 -0800 @@ -86,6 +86,38 @@ /* empty */ } +gboolean is_our_file(char *filename) +{ + demux_res_t demux_res; + VFSFile *input_file; + stream_t *input_stream; + + input_file = vfs_fopen(filename, "rb"); + input_stream = stream_create_file(input_file, 1); + + set_endian(); + + if (!input_stream) + { + vfs_fclose(input_file); + return FALSE; + } + + /* if qtmovie_read returns successfully, the stream is up to + * the movie data, which can be used directly by the decoder */ + if (!qtmovie_read(input_stream, &demux_res)) + { + stream_destroy(input_stream); + vfs_fclose(input_file); + return FALSE; + } + + stream_destroy(input_stream); + vfs_fclose(input_file); + + return TRUE; +} + gboolean is_our_fd(char *filename, VFSFile* input_file) { demux_res_t demux_res; @@ -201,7 +233,7 @@ alac_init, alac_about, NULL, - NULL, + is_our_file, NULL, play_file, stop,
