summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-09 20:57:37 +0200
committerwm4 <wm4@nowhere>2017-08-09 20:57:37 +0200
commit9c5dcf93989bdfccd4779c2f19282a23703ee4f7 (patch)
tree6702e0220639837a2d4749da60a2a304e5ef52b2 /video/out/opengl/video.c
parentde6d3f8ca10f22901d1cdfb44d117e7ef3eabcc1 (diff)
downloadmpv-9c5dcf93989bdfccd4779c2f19282a23703ee4f7.tar.bz2
mpv-9c5dcf93989bdfccd4779c2f19282a23703ee4f7.tar.xz
vo_opengl: shrink the hwdec overlay API
Just remove one callback, and fold the functionality into the other one. RPI will still not compile, so the hwdec_rpi.c changes are untested.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index a33060de73..8ed21d4380 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -973,7 +973,7 @@ static void unref_current_image(struct gl_video *p)
static void unmap_overlay(struct gl_video *p)
{
if (p->hwdec_active && p->hwdec->driver->overlay_frame)
- p->hwdec->driver->overlay_frame(p->hwdec, NULL);
+ p->hwdec->driver->overlay_frame(p->hwdec, NULL, NULL, NULL, true);
}
static void uninit_video(struct gl_video *p)
@@ -3013,8 +3013,9 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame,
p->ra->fns->clear(p->ra, target.tex, color, &p->dst_rect);
}
- if (frame->frame_id != p->image.id || !frame->current)
- p->hwdec->driver->overlay_frame(p->hwdec, frame->current);
+ p->hwdec->driver->overlay_frame(p->hwdec, frame->current,
+ &p->src_rect, &p->dst_rect,
+ frame->frame_id != p->image.id);
if (frame->current)
p->osd_pts = frame->current->pts;
@@ -3133,9 +3134,6 @@ void gl_video_resize(struct gl_video *p,
if (p->osd)
mpgl_osd_resize(p->osd, p->osd_rect, p->image_params.stereo_out);
-
- if (p->hwdec && p->hwdec->driver->overlay_adjust)
- p->hwdec->driver->overlay_adjust(p->hwdec, src, dst);
}
static void frame_perf_data(struct pass_info pass[], struct mp_frame_perf *out)