mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/avfilter: mark enable as runtime option too
This commit is contained in:
parent
f6621a8e72
commit
b4ad669a42
@ -620,11 +620,12 @@ static const AVClass *filter_child_class_iterate(void **iter)
|
|||||||
|
|
||||||
#define OFFSET(x) offsetof(AVFilterContext, x)
|
#define OFFSET(x) offsetof(AVFilterContext, x)
|
||||||
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM
|
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM
|
||||||
|
#define TFLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
|
||||||
static const AVOption avfilter_options[] = {
|
static const AVOption avfilter_options[] = {
|
||||||
{ "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,
|
{ "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,
|
||||||
{ .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" },
|
{ .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" },
|
||||||
{ "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .flags = FLAGS, .unit = "thread_type" },
|
{ "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .flags = FLAGS, .unit = "thread_type" },
|
||||||
{ "enable", "set enable expression", OFFSET(enable_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
|
{ "enable", "set enable expression", OFFSET(enable_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = TFLAGS },
|
||||||
{ "threads", "Allowed number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT,
|
{ "threads", "Allowed number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT,
|
||||||
{ .i64 = 0 }, 0, INT_MAX, FLAGS },
|
{ .i64 = 0 }, 0, INT_MAX, FLAGS },
|
||||||
{ "extra_hw_frames", "Number of extra hardware frames to allocate for the user",
|
{ "extra_hw_frames", "Number of extra hardware frames to allocate for the user",
|
||||||
|
@ -368,6 +368,8 @@ int ff_filter_get_nb_threads(AVFilterContext *ctx);
|
|||||||
/**
|
/**
|
||||||
* Generic processing of user supplied commands that are set
|
* Generic processing of user supplied commands that are set
|
||||||
* in the same way as the filter options.
|
* in the same way as the filter options.
|
||||||
|
* NOTE: 'enable' option is handled separately, and not by
|
||||||
|
* this function.
|
||||||
*/
|
*/
|
||||||
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
|
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
|
||||||
const char *arg, char *res, int res_len, int flags);
|
const char *arg, char *res, int res_len, int flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user