From af705d0122add4faa9fb6a7518ee1120670a6629 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 Mar 2015 22:39:22 +0100 Subject: vo_opengl: remove hwdec unmap_image callback Not needed anymore; see previous commit. --- video/out/gl_hwdec.h | 7 +------ video/out/gl_hwdec_vaglx.c | 5 ----- video/out/gl_hwdec_vda.c | 3 --- video/out/gl_hwdec_vdpau.c | 5 ----- video/out/gl_video.c | 3 --- 5 files changed, 1 insertion(+), 22 deletions(-) (limited to 'video') diff --git a/video/out/gl_hwdec.h b/video/out/gl_hwdec.h index cd2ab26892..e60218ff88 100644 --- a/video/out/gl_hwdec.h +++ b/video/out/gl_hwdec.h @@ -37,14 +37,9 @@ struct gl_hwdec_driver { // Called on initialization, and every time the video size changes. // *params must be set to the format the hw textures return. int (*reinit)(struct gl_hwdec *hw, struct mp_image_params *params); - // Return textures that contain the given hw_image. - // Note that the caller keeps a reference to hw_image until unmap_image - // is called, so the hwdec driver doesn't need to do that. + // Return textures that contain a copy or reference of the given hw_image. int (*map_image)(struct gl_hwdec *hw, struct mp_image *hw_image, GLuint *out_textures); - // Undo map_image(). The user of map_image() calls this when the textures - // are not needed anymore. - void (*unmap_image)(struct gl_hwdec *hw); void (*destroy)(struct gl_hwdec *hw); }; diff --git a/video/out/gl_hwdec_vaglx.c b/video/out/gl_hwdec_vaglx.c index 99d29dc385..c9c0535804 100644 --- a/video/out/gl_hwdec_vaglx.c +++ b/video/out/gl_hwdec_vaglx.c @@ -135,16 +135,11 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image, return 0; } -static void unmap_image(struct gl_hwdec *hw) -{ -} - const struct gl_hwdec_driver gl_hwdec_vaglx = { .api_name = "vaapi", .imgfmt = IMGFMT_VAAPI, .create = create, .reinit = reinit, .map_image = map_image, - .unmap_image = unmap_image, .destroy = destroy, }; diff --git a/video/out/gl_hwdec_vda.c b/video/out/gl_hwdec_vda.c index 181674f641..dd28884797 100644 --- a/video/out/gl_hwdec_vda.c +++ b/video/out/gl_hwdec_vda.c @@ -135,8 +135,6 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image, return 0; } -static void unmap_image(struct gl_hwdec *hw) { } - static void destroy(struct gl_hwdec *hw) { struct priv *p = hw->priv; @@ -153,6 +151,5 @@ const struct gl_hwdec_driver gl_hwdec_vda = { .create = create, .reinit = reinit, .map_image = map_image, - .unmap_image = unmap_image, .destroy = destroy, }; diff --git a/video/out/gl_hwdec_vdpau.c b/video/out/gl_hwdec_vdpau.c index fc341b1637..bb502ade11 100644 --- a/video/out/gl_hwdec_vdpau.c +++ b/video/out/gl_hwdec_vdpau.c @@ -199,16 +199,11 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image, return 0; } -static void unmap_image(struct gl_hwdec *hw) -{ -} - const struct gl_hwdec_driver gl_hwdec_vdpau = { .api_name = "vdpau", .imgfmt = IMGFMT_VDPAU, .create = create, .reinit = reinit, .map_image = map_image, - .unmap_image = unmap_image, .destroy = destroy, }; diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 3c94e3c439..b41a3c6590 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1753,9 +1753,6 @@ void gl_video_render_frame(struct gl_video *p, int fbo, struct frame_timing *t) debug_check_gl(p, "after video rendering"); - if (p->hwdec_active) - p->hwdec->driver->unmap_image(p->hwdec); - draw_osd: gl->BindFramebuffer(GL_FRAMEBUFFER, fbo); -- cgit v1.2.3