From 596c9dff3806272f1f28b7a4105ca90a027df7d4 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Thu, 31 Jul 2003 11:59:10 +0000 Subject: introduce config file versioning A new entry in the config file ".version:" stores the current version of the config file. The '.' at the beginning of ".version" shows that this is a somewhat hidden (read: internal) entry and it makes the line easy to spot and prevents clashes with regular config entries. The first use of this is to reset all decoder priorities to 0 (= use default) so that we hopefully won't have problems like the qtv decoder clash any more. CVS patchset: 5226 CVS date: 2003/07/31 11:59:10 --- src/xine-engine/load_plugins.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/xine-engine/load_plugins.c') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index a9201b8b5..239288107 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.156 2003/07/27 23:39:02 siggi Exp $ + * $Id: load_plugins.c,v 1.157 2003/07/31 11:59:10 mroi Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -97,7 +97,6 @@ static int _get_decoder_priority (xine_t *this, int default_priority, char str[80]; int result; - int reset; sprintf (str, "decoder.%s_priority", id); @@ -109,10 +108,9 @@ static int _get_decoder_priority (xine_t *this, int default_priority, "can be handled by more than one decoder.\n" "A priority of 0 enables the decoder's default priority.", 20, NULL, NULL /*FIXME: implement callback*/); - /* check for priority reset */ - reset = this->config->lookup_entry(this->config, - "decoder.reset_priorities")->num_value; - if (reset){ + + /* reset priority on old config files */ + if (this->config->current_version < 1) { result = 0; this->config->update_num(this->config, str, 0); } @@ -970,19 +968,6 @@ void scan_plugins (xine_t *this) { } #endif - (void) this->config - ->register_bool(this->config, - "decoder.reset_priorities", - 1, - "if 'true', reset default decoder priorities", - "This will restore all decoder priorities by\n" - " setting them to 0. (= \"use default priority\")\n" - "while dropping user changes, this ensures that\n" - "a sane set of decoders will be used.\n" - "This option is only evaluated once, next time xine is\n" - "started. After that, it resets to 'false'.", - 20, NULL, NULL); - homedir = xine_get_homedir(); this->plugin_catalog = _new_catalog(); load_cached_catalog (this); @@ -1022,8 +1007,6 @@ void scan_plugins (xine_t *this) { load_required_plugins (this); map_decoders (this); - - this->config->update_num(this->config, "decoder.reset_priorities", 0); } /* -- cgit v1.2.3