From ea2b19f64673a975a6bafe3292d26eab51142a5f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Sep 2014 01:19:27 +0200 Subject: player: allow overriding OSD message for all OSD levels Until now, you could override only level 3 with --osd-status-msg. Extend this, add add --osd-msg1 to --osd-msg3 (one for each OSD level). OSD level 0 always means disable OSD, so that isn't included. --osd-msg3 corresponds to --osd-status-msg, but they're not exactly the same. To allow more customization, --osd-msgN do not include the OSD symbol. The symbol can be manually added with "${osd-sym-cc}". We keep the "old" option for some short-term compatibility. --osd-msg1 should be particularly useful; for example you could do: --osd-msg1='${?pause==yes:${osd-sym-cc}}' to display a "paused" symbol when paused, and nothing during normal playback. (Although admittedly, the syntax is quite a bit of work.) --- options/options.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index a57b5fffb4..e245434052 100644 --- a/options/options.c +++ b/options/options.c @@ -521,6 +521,9 @@ const m_option_t mp_opts[] = { OPT_STRING("osd-playing-msg", osd_playing_msg, 0), OPT_STRING("term-status-msg", status_msg, 0), OPT_STRING("osd-status-msg", osd_status_msg, 0), + OPT_STRING("osd-msg1", osd_msg[0], 0), + OPT_STRING("osd-msg2", osd_msg[1], 0), + OPT_STRING("osd-msg3", osd_msg[2], 0), OPT_FLAG("idle", player_idle_mode, M_OPT_GLOBAL), OPT_FLAG("input-terminal", consolecontrols, CONF_GLOBAL), -- cgit v1.2.3