summaryrefslogtreecommitdiffstats
path: root/video/out/gl_osd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-15 20:46:57 +0200
committerwm4 <wm4@nowhere>2014-06-15 20:53:15 +0200
commit716285782d5e4b264e18e253e9d58980183c76c6 (patch)
treeb03e6e0ead71828f9d68bdebe777a808bee5d26f /video/out/gl_osd.h
parentd88aca6fb2474617136b09c2f281860d6a0a1a38 (diff)
downloadmpv-716285782d5e4b264e18e253e9d58980183c76c6.tar.bz2
mpv-716285782d5e4b264e18e253e9d58980183c76c6.tar.xz
video/out: change aspects of OSD handling
Let the VOs draw the OSD on their own, instead of making OSD drawing a separate VO driver call. Further, let it be the VOs responsibility to request subtitles with the correct PTS. We also basically allow the VO to request OSD/subtitles at any time. OSX changes untested.
Diffstat (limited to 'video/out/gl_osd.h')
-rw-r--r--video/out/gl_osd.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/gl_osd.h b/video/out/gl_osd.h
index 445766d19a..e4c4502a2a 100644
--- a/video/out/gl_osd.h
+++ b/video/out/gl_osd.h
@@ -21,6 +21,7 @@ struct mpgl_osd_part {
struct mpgl_osd {
struct mp_log *log;
+ struct osd_state *osd;
GL *gl;
bool use_pbo;
bool scaled;
@@ -30,16 +31,16 @@ struct mpgl_osd {
void *scratch;
};
-struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, bool legacy);
+struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, struct osd_state *osd);
void mpgl_osd_destroy(struct mpgl_osd *ctx);
void mpgl_osd_set_gl_state(struct mpgl_osd *ctx, struct mpgl_osd_part *p);
void mpgl_osd_unset_gl_state(struct mpgl_osd *ctx, struct mpgl_osd_part *p);
-void mpgl_osd_draw_legacy(struct mpgl_osd *ctx, struct osd_state *osd,
+void mpgl_osd_draw_legacy(struct mpgl_osd *ctx, double pts,
struct mp_osd_res res);
void mpgl_osd_draw_cb(struct mpgl_osd *ctx,
- struct osd_state *osd,
+ double pts,
struct mp_osd_res res,
void (*cb)(void *ctx, struct mpgl_osd_part *part,
struct sub_bitmaps *imgs),