# HG changeset patch # User nenolod # Date 1162780586 28800 # Node ID c2a63f41d8c68fd0bf02fae0e8c39200630f3234 # Parent d012e8d8c3b3804c5cff68a301aa8e2d5bcc26d3 [svn] - NewVFS input probing layer. VFS-Aware plugins can automatically take advantage of this. Non VFS-aware plugins (such as FLAC) won't be able to yet. To take advantage, just modify your probing function as described in plugin.h. - __AUDACIOUS_NEWVFS__ is defined to designate availability of this new probing layer. diff -r d012e8d8c3b3 -r c2a63f41d8c6 ChangeLog --- a/ChangeLog Sun Nov 05 18:00:14 2006 -0800 +++ b/ChangeLog Sun Nov 05 18:36:26 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-06 02:00:14 +0000 William Pitcock + revision [2857] + - fix potential display corruption problem in doublesize + + trunk/audacious/mainwin.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + + 2006-11-06 01:45:59 +0000 William Pitcock revision [2855] - do not evaluate mainwinHeight() or mainwinWidth() in skin scripts if doublesize is on diff -r d012e8d8c3b3 -r c2a63f41d8c6 audacious/input.c --- a/audacious/input.c Sun Nov 05 18:00:14 2006 -0800 +++ b/audacious/input.c Sun Nov 05 18:36:26 2006 -0800 @@ -1,4 +1,7 @@ -/* BMP - Cross-platform multimedia player +/* Audacious + * Copyright (C) 2005-2006 Audacious development team. + * + * BMP - Cross-platform multimedia player * Copyright (C) 2003-2004 BMP development team. * * Based on XMMS: @@ -401,18 +404,24 @@ InputPlugin * input_check_file(const gchar * filename, gboolean show_warning) { + VFSFile *fd; GList *node; InputPlugin *ip; gchar *filename_proxy; gint ret = 1; filename_proxy = g_strdup(filename); + fd = vfs_fopen(filename, "rb"); for (node = get_input_list(); node != NULL; node = g_list_next(node)) { ip = INPUT_PLUGIN(node->data); if (ip && input_is_enabled(ip->filename) && - (ret = ip->is_our_file(filename_proxy)) > 0) { + (ip->is_our_file_from_vfs != NULL && + (ret = ip->is_our_file_from_vfs(filename_proxy, fd) > 0) || + (ip->is_our_file != NULL && + (ret = ip->is_our_file(filename_proxy)) > 0))) { g_free(filename_proxy); + vfs_fclose(fd); return ip; } else if (ret <= -1) @@ -425,6 +434,8 @@ input_file_not_playable(filename); } + vfs_fclose(fd); + return NULL; } diff -r d012e8d8c3b3 -r c2a63f41d8c6 audacious/plugin.h --- a/audacious/plugin.h Sun Nov 05 18:00:14 2006 -0800 +++ b/audacious/plugin.h Sun Nov 05 18:36:26 2006 -0800 @@ -32,6 +32,11 @@ #include +#ifdef _AUDACIOUS_CORE +# include "libaudacious/vfs.h" +#else +# include "audacious/vfs.h" +#endif #include "audacious/titlestring.h" #define INPUT_PLUGIN(x) ((InputPlugin *)(x)) @@ -42,6 +47,7 @@ #define LOWLEVEL_PLUGIN(x) ((LowlevelPlugin *)(x)) +#define __AUDACIOUS_NEWVFS__ typedef enum { FMT_U8, @@ -173,9 +179,13 @@ OutputPlugin *output; + /* Added in Audacious 1.1.0 */ TitleInput *(*get_song_tuple) (gchar * filename); void (*set_song_tuple) (TitleInput * tuple); void (*set_status_buffering) (gboolean status); + + /* Added in Audacious 1.2.2 */ + gint (*is_our_file_from_vfs) (gchar *filename, VFSFile *fd); }; struct _GeneralPlugin {