summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-10 23:32:50 +0000
committerben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-10 23:32:50 +0000
commit989b1fe59b1abc747aeb590447cd246bece1498b (patch)
tree96aae103d5cba1143388146ccd222ad9cf99b705 /mplayer.c
parent89518d1df3c398f32e9a0499e919f1feafeac849 (diff)
downloadmpv-989b1fe59b1abc747aeb590447cd246bece1498b.tar.bz2
mpv-989b1fe59b1abc747aeb590447cd246bece1498b.tar.xz
allow profile loading per audio/video output
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25669 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index 06ea4fed3a..fc842e44c3 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -882,6 +882,23 @@ static void load_per_extension_config (m_config_t* conf, const char *const file)
}
}
+#define PROFILE_CFG_VO "vo."
+#define PROFILE_CFG_AO "ao."
+
+static void load_per_output_config (m_config_t* conf, char *cfg, char *out)
+{
+ char profile[strlen (cfg) + strlen (out) + 1];
+ m_profile_t *p;
+
+ sprintf (profile, "%s%s", cfg, out);
+ p = m_config_get_profile (conf, profile);
+ if (p)
+ {
+ mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingExtensionProfile, profile);
+ m_config_set_profile(conf,p);
+ }
+}
+
static void load_per_file_config (m_config_t* conf, const char *const file)
{
char *confpath;
@@ -2747,6 +2764,11 @@ play_next_file:
load_per_file_config (mconfig, filename);
}
+ if (video_driver_list)
+ load_per_output_config (mconfig, PROFILE_CFG_VO, video_driver_list[0]);
+ if (audio_driver_list)
+ load_per_output_config (mconfig, PROFILE_CFG_AO, audio_driver_list[0]);
+
// We must enable getch2 here to be able to interrupt network connection
// or cache filling
if(!noconsolecontrols && !slave_mode){