diff options
author | wm4 <wm4@nowhere> | 2014-09-18 01:19:27 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-18 01:23:33 +0200 |
commit | ea2b19f64673a975a6bafe3292d26eab51142a5f (patch) | |
tree | a93fc536215ba676f3d182f452b1bac0a3c2c20a /options | |
parent | 6c3d25e6f5f09a110ad0fffaeeea6a65ee5d228b (diff) | |
download | mpv-ea2b19f64673a975a6bafe3292d26eab51142a5f.tar.bz2 mpv-ea2b19f64673a975a6bafe3292d26eab51142a5f.tar.xz |
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.)
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 3 | ||||
-rw-r--r-- | options/options.h | 1 |
2 files changed, 4 insertions, 0 deletions
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), diff --git a/options/options.h b/options/options.h index 967982ea5c..aeb404ecfe 100644 --- a/options/options.h +++ b/options/options.h @@ -148,6 +148,7 @@ typedef struct MPOpts { char *osd_playing_msg; char *status_msg; char *osd_status_msg; + char *osd_msg[3]; char *heartbeat_cmd; float heartbeat_interval; int player_idle_mode; |