diff options
author | wm4 <wm4@nowhere> | 2012-11-04 18:39:32 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 20:04:10 +0100 |
commit | 6e0b7300447c4f8f82bc5467870a00d7c4f2095f (patch) | |
tree | 30d8751dd4ff414214f08d8fee3e62af56923a9d /video/filter/vf.h | |
parent | b7cacf9165290067b66b160b108790b89c080a3e (diff) | |
download | mpv-6e0b7300447c4f8f82bc5467870a00d7c4f2095f.tar.bz2 mpv-6e0b7300447c4f8f82bc5467870a00d7c4f2095f.tar.xz |
vf_screenshot: simplify
Instead of using a callback to "capture" the image next time the filter
function is called, do it the other way around: on every filter
invocation, create a reference to the image, and return it if a
screenshot is requested. This also fixes the 1-frame delay when taking
screenshots with the filter.
This also allows simplifying screenshot.c.
Diffstat (limited to 'video/filter/vf.h')
-rw-r--r-- | video/filter/vf.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/video/filter/vf.h b/video/filter/vf.h index ac9394024f..187af302ad 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -86,19 +86,13 @@ typedef struct vf_seteq { int value; } vf_equalizer_t; -struct vf_ctrl_screenshot { - // When the screenshot is complete, pass it to this callback. - void (*image_callback)(void *, mp_image_t *); - void *image_callback_ctx; -}; - #define VFCTRL_QUERY_MAX_PP_LEVEL 4 // query max postprocessing level (if any) #define VFCTRL_SET_PP_LEVEL 5 // set postprocessing level #define VFCTRL_SET_EQUALIZER 6 // set color options (brightness,contrast etc) #define VFCTRL_GET_EQUALIZER 8 // get color options (brightness,contrast etc) #define VFCTRL_HWDEC_DECODER_RENDER 9 // vdpau hw decoding #define VFCTRL_HWDEC_ALLOC_SURFACE 10 // vdpau hw decoding -#define VFCTRL_SCREENSHOT 14 // Take screenshot, arg is vf_ctrl_screenshot +#define VFCTRL_SCREENSHOT 14 // Take screenshot, arg is voctrl_screenshot_args #define VFCTRL_INIT_OSD 15 // Filter OSD renderer present? #define VFCTRL_SET_DEINTERLACE 18 // Set deinterlacing status #define VFCTRL_GET_DEINTERLACE 19 // Get deinterlacing status |