History

avfilter: Add command passing support

Michael Niedermayer committed 15 years ago

Commit 1e5014c1 parent 4becc864 files · +83 −1Browse files

Showing the changes to libavfilter/avfilter.h (1 of 4 files). Show all

Unified · Split

libavfilter/avfilter.h+24−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29#include "libavutil/rational.h"29#include "libavutil/rational.h"
30 30
31#define LIBAVFILTER_VERSION_MAJOR 231#define LIBAVFILTER_VERSION_MAJOR 2
32#define LIBAVFILTER_VERSION_MINOR 3532#define LIBAVFILTER_VERSION_MINOR 36
33#define LIBAVFILTER_VERSION_MICRO 033#define LIBAVFILTER_VERSION_MICRO 0
34 34
35#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \35#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
@@ -552,6 +552,20 @@ typedef struct AVFilter { · 516 unmodified lines
552 * NULL_IF_CONFIG_SMALL() macro to define it.552 * NULL_IF_CONFIG_SMALL() macro to define it.
553 */553 */
554 const char *description;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} AVFilter;569} AVFilter;
556 570
557/** An instance of a filter */571/** An instance of a filter */
@@ -791,6 +805,15 @@ void avfilter_end_frame(AVFilterLink *link); · 233 unmodified lines
791 */805 */
792void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);806void 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 */
815int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags);
816
794/**817/**
795 * Send a buffer of audio samples to the next filter.818 * Send a buffer of audio samples to the next filter.
796 *819 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t