Showing the changes to libavfilter/avfilter.c (1 of 4 files). Show all
Unified · Split
| @@ -26,6 +26,7 @@ · 25 unmodified lines | |||
| 26 | #include "libavutil/audioconvert.h" | 26 | #include "libavutil/audioconvert.h" |
| 27 | #include "libavutil/imgutils.h" | 27 | #include "libavutil/imgutils.h" |
| 28 | #include "libavutil/avassert.h" | 28 | #include "libavutil/avassert.h" |
| 29 | #include "libavutil/avstring.h" | ||
| 29 | #include "avfilter.h" | 30 | #include "avfilter.h" |
| 30 | #include "internal.h" | 31 | #include "internal.h" |
| 31 | 32 | ||
| @@ -616,6 +617,17 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 584 unmodified lines | |||
| 616 | draw_slice(link, y, h, slice_dir); | 617 | draw_slice(link, y, h, slice_dir); |
| 617 | } | 618 | } |
| 618 | 619 | ||
| 620 | int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags) | ||
| 621 | { | ||
| 622 | if(!strcmp(cmd, "ping")){ | ||
| 623 | av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name); | ||
| 624 | return 0; | ||
| 625 | }else if(filter->filter->process_command) { | ||
| 626 | return filter->filter->process_command(filter, cmd, arg, res, res_len, flags); | ||
| 627 | } | ||
| 628 | return AVERROR(ENOSYS); | ||
| 629 | } | ||
| 630 | |||
| 619 | void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) | 631 | void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) |
| 620 | { | 632 | { |
| 621 | void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *); | 633 | void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *); |