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_xv.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'video/out/vo_xv.c') diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index e506fc9359..11c6efc26e 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -648,15 +648,6 @@ static void flip_page(struct vo *vo) XSync(vo->x11->display, False); } -static mp_image_t *get_screenshot(struct vo *vo) -{ - struct xvctx *ctx = vo->priv; - if (!ctx->original_image) - return NULL; - - return mp_image_new_ref(ctx->original_image); -} - // Note: REDRAW_FRAME can call this with NULL. static void draw_image(struct vo *vo, mp_image_t *mpi) { @@ -839,9 +830,6 @@ static int control(struct vo *vo, uint32_t request, void *data) case VOCTRL_REDRAW_FRAME: draw_image(vo, ctx->original_image); return true; - case VOCTRL_SCREENSHOT: - *(struct mp_image **)data = get_screenshot(vo); - return true; } int events = 0; int r = vo_x11_control(vo, &events, request, data); -- cgit v1.2.3