From 28582322207bb962553505f0c25268f4b786287d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 24 Jan 2015 22:56:02 +0100 Subject: 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. --- video/out/vo_vaapi.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'video/out/vo_vaapi.c') 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: -- cgit v1.2.3