Showing the changes to libavfilter/avfilter.h (1 of 4 files). Show all
Unified · Split
| @@ -29,7 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | #include "libavutil/rational.h" |
| 30 | 30 | |
| 31 | 31 | #define LIBAVFILTER_VERSION_MAJOR 2 |
| 32 | −#define LIBAVFILTER_VERSION_MINOR 35 | |
| 32 | +#define LIBAVFILTER_VERSION_MINOR 36 | |
| 33 | 33 | #define LIBAVFILTER_VERSION_MICRO 0 |
| 34 | 34 | |
| 35 | 35 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| @@ -552,6 +552,20 @@ typedef struct AVFilter { · 516 unmodified lines | ||
| 552 | 552 | * NULL_IF_CONFIG_SMALL() macro to define it. |
| 553 | 553 | */ |
| 554 | 554 | const char *description; |
| 555 | + | |
| 556 | + /** | |
| 557 | + * Make the filter instance process a command. | |
| 558 | + * | |
| 559 | + * @param cmd the command to process, for handling simplicity all commands must be alphanumeric only | |
| 560 | + * @param arg the argument for the command | |
| 561 | + * @param res a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported. | |
| 562 | + * @param flags if AVFILTER_CMD_FLAG_FAST is set and the command would be | |
| 563 | + * timeconsuming then a filter should treat it like an unsupported command | |
| 564 | + * | |
| 565 | + * @returns >=0 on success otherwise an error code. | |
| 566 | + * AVERROR(ENOSYS) on unsupported commands | |
| 567 | + */ | |
| 568 | + int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags); | |
| 555 | 569 | } AVFilter; |
| 556 | 570 | |
| 557 | 571 | /** An instance of a filter */ |
| @@ -791,6 +805,15 @@ void avfilter_end_frame(AVFilterLink *link); · 233 unmodified lines | ||
| 791 | 805 | */ |
| 792 | 806 | void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir); |
| 793 | 807 | |
| 808 | +#define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically | |
| 809 | +#define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw) | |
| 810 | + | |
| 811 | +/** | |
| 812 | + * Make the filter instance process a command. | |
| 813 | + * It is recommanded to use avfilter_graph_send_command(). | |
| 814 | + */ | |
| 815 | +int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags); | |
| 816 | + | |
| 794 | 817 | /** |
| 795 | 818 | * Send a buffer of audio samples to the next filter. |
| 796 | 819 | * |