summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-25 21:14:00 +0200
committerwm4 <wm4@nowhere>2014-09-25 21:32:56 +0200
commited116e8b06bf3db6b6867865905b5798071db742 (patch)
tree0680dec454829a6236c276c3e97bf4441acd6b52 /player/core.h
parent07668e50de8c3d9418f7eb1ef00f0391b29a05da (diff)
downloadmpv-ed116e8b06bf3db6b6867865905b5798071db742.tar.bz2
mpv-ed116e8b06bf3db6b6867865905b5798071db742.tar.xz
player: simplify OSD message handling code
Eliminate the remains of the OSD message stack. Another simplification comes from the fact that we do not need to care about time going backwards (we always use a monotonic time source, and wrapping time values are practically impossible). What this code was pretty trivial, and by now unnecessarily roundabout. Merge get_osd_msg() into update_osd_msg(), and add_osd_msg() into set_osd_msg_va().
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/player/core.h b/player/core.h
index a60e13a3e7..581a5b7a42 100644
--- a/player/core.h
+++ b/player/core.h
@@ -172,7 +172,6 @@ typedef struct MPContext {
struct mp_log *statusline;
struct osd_state *osd;
- struct mp_osd_msg *osd_msg_stack;
char *term_osd_text;
char *term_osd_status;
char *term_osd_subs;
@@ -183,8 +182,11 @@ typedef struct MPContext {
double osd_visible; // for the osd bar only
int osd_function;
double osd_function_visible;
+ double osd_msg_visible;
double osd_last_update;
bool osd_force_update;
+ char *osd_msg_text;
+ bool osd_show_pos;
struct osd_progbar_state osd_progbar;
struct playlist *playlist;
@@ -430,7 +432,7 @@ void stream_dump(struct MPContext *mpctx);
// osd.c
void set_osd_bar(struct MPContext *mpctx, int type,
double min, double max, double neutral, double val);
-void set_osd_msg(struct MPContext *mpctx, int level, int time,
+bool set_osd_msg(struct MPContext *mpctx, int level, int time,
const char* fmt, ...) PRINTF_ATTRIBUTE(4,5);
void set_osd_function(struct MPContext *mpctx, int osd_function);
void set_osd_subtitle(struct MPContext *mpctx, const char *text);