From 5e9f7916674c4640707727eac80c659290492bad Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Jan 2015 22:06:12 +0100 Subject: video: separate screenshot modes Use different VOCTRLs for "window" and normal screenshot modes. The normal one will probably be removed, and replaced by generic code in vo.c, and this commit is preparation for this. (Doing it the other way around would be slightly simpler, but I haven't decided yet about the second one, and touching every VO is needed anyway in order to remove the unneeded crap. E.g. has_osd has been unused for a long time.) --- video/filter/vf.h | 2 +- video/filter/vf_screenshot.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'video/filter') diff --git a/video/filter/vf.h b/video/filter/vf.h index 07f38d680b..3362320eb8 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -144,7 +144,7 @@ enum vf_ctrl { VFCTRL_SEEK_RESET = 1, // reset on picture and PTS discontinuities VFCTRL_SET_EQUALIZER, // set color options (brightness,contrast etc) VFCTRL_GET_EQUALIZER, // get color options (brightness,contrast etc) - VFCTRL_SCREENSHOT, // Take screenshot, arg is voctrl_screenshot_args + VFCTRL_SCREENSHOT, // Take screenshot, arg is mp_image** VFCTRL_INIT_OSD, // Filter OSD renderer present? VFCTRL_SET_DEINTERLACE, // Set deinterlacing status VFCTRL_GET_DEINTERLACE, // Get deinterlacing status diff --git a/video/filter/vf_screenshot.c b/video/filter/vf_screenshot.c index d60271acc4..562a1d03f5 100644 --- a/video/filter/vf_screenshot.c +++ b/video/filter/vf_screenshot.c @@ -46,8 +46,7 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi) static int control (vf_instance_t *vf, int request, void *data) { if (request == VFCTRL_SCREENSHOT && vf->priv->current) { - struct voctrl_screenshot_args *args = data; - args->out_image = mp_image_new_ref(vf->priv->current); + *(struct mp_image **)data = mp_image_new_ref(vf->priv->current); return CONTROL_TRUE; } return CONTROL_UNKNOWN; -- cgit v1.2.3