changeset 256:acb93b546742 trunk

[svn] Port to NewVFS probe function.
author chainsaw
date Sat, 18 Nov 2006 11:46:19 -0800
parents 902605dec467
children e0dc4cc45d26
files ChangeLog src/alac/plugin.c
diffstat 2 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Nov 18 11:20:57 2006 -0800
+++ b/ChangeLog	Sat Nov 18 11:46:19 2006 -0800
@@ -1,3 +1,10 @@
+2006-11-18 19:20:57 +0000  Tony Vroon <chainsaw@gentoo.org>
+  revision [534]
+  Port to NewVFS probe function.
+  trunk/src/aac/src/libmp4.c |   46 +++++++++++++++++++--------------------------
+  1 file changed, 20 insertions(+), 26 deletions(-)
+
+
 2006-11-18 19:00:22 +0000  Tony Vroon <chainsaw@gentoo.org>
   revision [532]
   Port to NewVFS file probe.
--- 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,