diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-28 20:46:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-29 20:16:01 +0200 |
commit | 1e5014c7c7dee0efe026eacafe80a967f04892c8 (patch) | |
tree | 6278c5228b23d956c4b4084432deed4183309eb7 /libavfilter/avfilter.c | |
parent | 4becc8613967869e3fdb748ae7939d849c672500 (diff) | |
download | ffmpeg-1e5014c7c7dee0efe026eacafe80a967f04892c8.tar.gz |
avfilter: Add command passing support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 23bb26cccc..2922138808 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -26,6 +26,7 @@ #include "libavutil/audioconvert.h" #include "libavutil/imgutils.h" #include "libavutil/avassert.h" +#include "libavutil/avstring.h" #include "avfilter.h" #include "internal.h" @@ -616,6 +617,17 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) draw_slice(link, y, h, slice_dir); } +int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags) +{ + if(!strcmp(cmd, "ping")){ + av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name); + return 0; + }else if(filter->filter->process_command) { + return filter->filter->process_command(filter, cmd, arg, res, res_len, flags); + } + return AVERROR(ENOSYS); +} + void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) { void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *); |