Mercurial > audlegacy
diff src/audacious/input.c @ 4266:2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
author | stefano@zanga |
---|---|
date | Sun, 10 Feb 2008 12:31:44 +0100 |
parents | 92642f860860 |
children | 04ade98fafa3 |
line wrap: on
line diff
--- a/src/audacious/input.c Sun Feb 10 10:40:51 2008 +0100 +++ b/src/audacious/input.c Sun Feb 10 12:31:44 2008 +0100 @@ -254,6 +254,7 @@ (ip->probe_for_tuple && ip->have_subtune == TRUE) || (ip->probe_for_tuple && (cfg.use_pl_metadata && (!loading || (loading && cfg.get_info_on_load)))) ) { + plugin_set_current((Plugin *)ip); Tuple *tuple = ip->probe_for_tuple(filename_proxy, fd); if (tuple != NULL) { @@ -267,6 +268,7 @@ } else if (ip->is_our_file_from_vfs != NULL) { + plugin_set_current((Plugin *)ip); result = ip->is_our_file_from_vfs(filename_proxy, fd); if (result > 0) { @@ -278,6 +280,7 @@ } else if (ip->is_our_file != NULL) { + plugin_set_current((Plugin *)ip); result = ip->is_our_file(filename_proxy); if (result > 0) { @@ -363,7 +366,10 @@ /* cue:// cdda:// tone:// tact:// */ if ((ip = uri_get_plugin(filename_proxy)) != NULL && ip->enabled) { if (ip->is_our_file != NULL) + { + plugin_set_current((Plugin *)ip); ret = ip->is_our_file(filename_proxy); + } else ret = 0; if (ret > 0) { @@ -488,7 +494,10 @@ return; if (playback->plugin->set_eq) + { + plugin_set_current((Plugin *)(playback->plugin)); playback->plugin->set_eq(on, preamp, bands); + } } @@ -518,7 +527,10 @@ g_free(pr); if (ip && ip->get_song_tuple) + { + plugin_set_current((Plugin *)ip); input = ip->get_song_tuple(filename_proxy); + } else { gchar *scratch; @@ -641,7 +653,10 @@ g_free(pr); if (ip->file_info_box) + { + plugin_set_current((Plugin *)ip); ip->file_info_box(filename_proxy); + } else input_general_file_info_box(filename, ip); @@ -676,6 +691,7 @@ if (!ip->enabled) continue; + plugin_set_current((Plugin *)ip); if ((result = ip->scan_dir(path_proxy))) break; } @@ -706,11 +722,14 @@ h_vol[1] = r; hook_call("volume set", h_vol); - if (playback_get_playing() && - (playback = get_current_input_playback()) != NULL && - playback->plugin->set_volume && - playback->plugin->set_volume(l, r)) - return; + if (playback_get_playing()) + if ((playback = get_current_input_playback()) != NULL) + if (playback->plugin->set_volume != NULL) + { + plugin_set_current((Plugin *)(playback->plugin)); + if (playback->plugin->set_volume(l, r)) + return; + } output_set_volume(l, r);