summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-14 22:39:22 +0100
committerwm4 <wm4@nowhere>2015-03-14 22:39:22 +0100
commitaf705d0122add4faa9fb6a7518ee1120670a6629 (patch)
tree5318c9252785dd553542b046537389de0a90efaa
parenta1b3af5df32558ddcf67432a706a7280f81c5f2d (diff)
downloadmpv-af705d0122add4faa9fb6a7518ee1120670a6629.tar.bz2
mpv-af705d0122add4faa9fb6a7518ee1120670a6629.tar.xz
vo_opengl: remove hwdec unmap_image callback
Not needed anymore; see previous commit.
-rw-r--r--video/out/gl_hwdec.h7
-rw-r--r--video/out/gl_hwdec_vaglx.c5
-rw-r--r--video/out/gl_hwdec_vda.c3
-rw-r--r--video/out/gl_hwdec_vdpau.c5
-rw-r--r--video/out/gl_video.c3
5 files changed, 1 insertions, 22 deletions
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);