Mercurial > audlegacy-plugins
diff src/alac/plugin.c @ 256:acb93b546742 trunk
[svn] Port to NewVFS probe function.
author | chainsaw |
---|---|
date | Sat, 18 Nov 2006 11:46:19 -0800 |
parents | 6e1002ea4ded |
children | 9ce03bf021ae |
line wrap: on
line diff
--- a/src/alac/plugin.c Sat Nov 18 11:20:57 2006 -0800 +++ b/src/alac/plugin.c Sat Nov 18 11:46:19 2006 -0800 @@ -86,34 +86,27 @@ /* empty */ } -gboolean is_our_file(char *filename) +gboolean is_our_fd(char *filename, VFSFile* input_file) { 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; } @@ -208,7 +201,7 @@ alac_init, alac_about, NULL, - is_our_file, + NULL, NULL, play_file, stop, @@ -226,7 +219,10 @@ NULL, NULL, /* file_info_box */ NULL, - build_tuple + build_tuple, + NULL, + NULL, + is_our_fd, }; static int get_sample_info(demux_res_t *demux_res, uint32_t samplenum,