summaryrefslogtreecommitdiffstats
path: root/video/out/vo_vaapi.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-24 22:56:02 +0100
committerwm4 <wm4@nowhere>2015-01-24 23:16:27 +0100
commit28582322207bb962553505f0c25268f4b786287d (patch)
tree8c9611a9161f48338701fc506646aaedd8c1a491 /video/out/vo_vaapi.c
parent047788e3b1354562f99ce8dacdba1972ad990d03 (diff)
downloadmpv-28582322207bb962553505f0c25268f4b786287d.tar.bz2
mpv-28582322207bb962553505f0c25268f4b786287d.tar.xz
vo: simplify VOs by adding generic screenshot support
At the time screenshot support was added, images weren't refcounted yet, so screenshots required specialized implementations in the VOs. But now we can handle these things much simpler. Also see commit 5bb24980. If there are VOs in the future which can't do this (e.g. they need to write to the image passed to vo_driver->draw_image), this still could be disabled on a per-VO basis etc., so we lose no potential performance advantages.
Diffstat (limited to 'video/out/vo_vaapi.c')
-rw-r--r--video/out/vo_vaapi.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/video/out/vo_vaapi.c b/video/out/vo_vaapi.c
index 1c4b016e6b..de2c975823 100644
--- a/video/out/vo_vaapi.c
+++ b/video/out/vo_vaapi.c
@@ -298,14 +298,6 @@ static void draw_image(struct vo *vo, struct mp_image *mpi)
draw_osd(vo);
}
-static struct mp_image *get_screenshot(struct priv *p)
-{
- struct mp_image *hwimg = p->output_surfaces[p->visible_surface];
- if (!hwimg)
- return NULL;
- return mp_image_new_ref(hwimg);
-}
-
static void free_subpicture(struct priv *p, struct vaapi_osd_image *img)
{
if (img->image.image_id != VA_INVALID_ID)
@@ -541,9 +533,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
p->output_surface = p->visible_surface;
draw_osd(vo);
return true;
- case VOCTRL_SCREENSHOT:
- *(struct mp_image **)data = get_screenshot(p);
- return true;
case VOCTRL_GET_PANSCAN:
return VO_TRUE;
case VOCTRL_SET_PANSCAN: