From 135a7217b92c0b1c29ea40ab405566e72d23ae4b Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 22 Jan 2016 16:18:28 +0100 Subject: command: add vf-command command --- video/filter/vf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'video/filter/vf.c') diff --git a/video/filter/vf.c b/video/filter/vf.c index 35de0f23a7..f710d81ea7 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -163,6 +163,17 @@ static void vf_control_all(struct vf_chain *c, int cmd, void *arg) } } +int vf_send_command(struct vf_chain *c, char *label, char *cmd, char *arg) +{ + char *args[2] = {cmd, arg}; + if (strcmp(label, "all") == 0) { + vf_control_all(c, VFCTRL_COMMAND, args); + return 0; + } else { + return vf_control_by_label(c, VFCTRL_COMMAND, args, bstr0(label)); + } +} + static void vf_fix_img_params(struct mp_image *img, struct mp_image_params *p) { // Filters must absolutely set these correctly. -- cgit v1.2.3