From fee4d3b473deeb7b77d868ad2d78fc61446fe364 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Jan 2012 19:48:50 +0100 Subject: osd: add setting to display OSD always on terminal Now the option --term-osd=force will cause mplayer to display all OSD messages on the terminal, even if there is video. Possible values for --term-osd: - auto: use video OSD, or of there's no video, the terminal (default) - off: always use video for OSD - force: always use terminal for OSD -term-osd and --term-osd are equivalent to --term-osd=force. This changes the meaning of the option, since -term-osd used to enable the OSD default behavior, i.e. --term-osd=auto. -noterm-osd has the same effect as --term-osd=off, and is kept for compatibility. Implementation note: The location for the OSD text was shared between the two code paths (it was in osd_state.osd_text). We can't rely on the fact that the video-OSD update code normally isn't run when --term-osd is called. When e.g. panscan is updated, the video OSD code will draw the OSD anyway. This would sometimes show unwanted OSD text on the video. Deal with this by putting the current terminal-OSD text in a different place (in MPContext.terminal_osd_text) to deal with this. --- mp_core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'mp_core.h') diff --git a/mp_core.h b/mp_core.h index fbcd03b8ba..26ba1b764f 100644 --- a/mp_core.h +++ b/mp_core.h @@ -90,6 +90,7 @@ typedef struct MPContext { struct mp_fifo *key_fifo; struct input_ctx *input; struct osd_state *osd; + char *terminal_osd_text; struct sub_data *subdata; // current sub_data style subtitles if any // last sub_data style sub line if any, used by log_sub() only struct subtitle *vo_sub_last; -- cgit v1.2.3