summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-18 01:19:20 +0100
committerwm4 <wm4@nowhere>2014-01-18 01:27:43 +0100
commit7f4a09bb8534dfafd83099d773adf2e33c64e267 (patch)
tree5b75791151f92e164fbd9badee47590d1164683d /player/core.h
parent92a9f11a0b4fda60c8880014be5920dcf3e95253 (diff)
downloadmpv-7f4a09bb8534dfafd83099d773adf2e33c64e267.tar.bz2
mpv-7f4a09bb8534dfafd83099d773adf2e33c64e267.tar.xz
sub: uglify OSD code path with locking
Do two things: 1. add locking to struct osd_state 2. make struct osd_state opaque While 1. is somewhat simple, 2. is quite horrible. Lots of code accesses lots of osd_state (and osd_object) members. To make sure everything is accessed synchronously, I prefer making osd_state opaque, even if it means adding pretty dumb accessors. All of this is meant to allow running VO in their own threads. Eventually, VOs will request OSD on their own, which means osd_state will be accessed from foreign threads.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h
index edfdaec2e1..1018ea9df3 100644
--- a/player/core.h
+++ b/player/core.h
@@ -23,6 +23,7 @@
#include "common/common.h"
#include "options/options.h"
+#include "sub/osd.h"
// definitions used internally by the core player code
@@ -158,6 +159,7 @@ typedef struct MPContext {
int osd_function;
double osd_function_visible;
double osd_last_update;
+ struct osd_progbar_state osd_progbar;
struct playlist *playlist;
char *filename; // currently playing file