diff options
author | wm4 <wm4@nowhere> | 2014-06-15 20:46:57 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-15 20:53:15 +0200 |
commit | 716285782d5e4b264e18e253e9d58980183c76c6 (patch) | |
tree | b03e6e0ead71828f9d68bdebe777a808bee5d26f /video/out/vo_x11.c | |
parent | d88aca6fb2474617136b09c2f281860d6a0a1a38 (diff) | |
download | mpv-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/vo_x11.c')
-rw-r--r-- | video/out/vo_x11.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index fa067849af..543e762fce 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -421,15 +421,6 @@ static struct mp_image get_x_buffer(struct priv *p, int buf_index) return img; } -static void draw_osd(struct vo *vo, struct osd_state *osd) -{ - struct priv *p = vo->priv; - - struct mp_image img = get_x_buffer(p, p->current_buf); - - osd_draw_on_image(osd, p->osd, osd_get_vo_pts(osd), 0, &img); -} - static mp_image_t *get_screenshot(struct vo *vo) { struct priv *p = vo->priv; @@ -490,6 +481,8 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) mp_image_clear(&img, 0, 0, img.w, img.h); } + osd_draw_on_image(vo->osd, p->osd, mpi ? mpi->pts : 0, 0, &img); + mp_image_setrefp(&p->original_image, mpi); } @@ -666,7 +659,6 @@ const struct vo_driver video_out_x11 = { .reconfig = reconfig, .control = control, .draw_image = draw_image, - .draw_osd = draw_osd, .flip_page = flip_page, .uninit = uninit, }; |