diff options
author | wm4 <wm4@nowhere> | 2016-01-22 16:18:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-22 16:18:28 +0100 |
commit | 135a7217b92c0b1c29ea40ab405566e72d23ae4b (patch) | |
tree | 491bfc975d15c4df6095a30720dd9bd404f73e70 /video/filter/vf.c | |
parent | ce0b26c60ff31166b4b4317d269c52fe7d576c5c (diff) | |
download | mpv-135a7217b92c0b1c29ea40ab405566e72d23ae4b.tar.bz2 mpv-135a7217b92c0b1c29ea40ab405566e72d23ae4b.tar.xz |
command: add vf-command command
Diffstat (limited to 'video/filter/vf.c')
-rw-r--r-- | video/filter/vf.c | 11 |
1 files changed, 11 insertions, 0 deletions
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. |