summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 20:45:19 +0100
committerwm4 <wm4@nowhere>2013-12-21 21:43:17 +0100
commitad2199128da4a689be374e92aab57ac2c9fa76b9 (patch)
treee59647846141017a5ef1da3a3b0961b95cfbc5e6 /player/loadfile.c
parent232b8de095b0ad493f7aa83e900e861bcb11f52a (diff)
downloadmpv-ad2199128da4a689be374e92aab57ac2c9fa76b9.tar.bz2
mpv-ad2199128da4a689be374e92aab57ac2c9fa76b9.tar.xz
path lookup functions: mp_msg conversions
There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index deda26ee2a..31ac4b3c4c 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1001,19 +1001,10 @@ static void play_current_file(struct MPContext *mpctx)
}
}
- mp_load_per_protocol_config(mpctx->mconfig, mpctx->filename);
- mp_load_per_extension_config(mpctx->mconfig, mpctx->filename);
- mp_load_per_file_config(mpctx->mconfig, mpctx->filename, opts->use_filedir_conf);
-
- if (opts->vo.video_driver_list)
- mp_load_per_output_config(mpctx->mconfig, "vo.",
- opts->vo.video_driver_list[0].name);
- if (opts->audio_driver_list)
- mp_load_per_output_config(mpctx->mconfig, "ao.",
- opts->audio_driver_list[0].name);
+ mp_load_auto_profiles(mpctx);
if (opts->position_resume)
- mp_load_playback_resume(mpctx->mconfig, mpctx->filename);
+ mp_load_playback_resume(mpctx, mpctx->filename);
load_per_file_options(mpctx->mconfig, mpctx->playlist->current->params,
mpctx->playlist->current->num_params);