Unified · Split
| @@ -127,7 +127,7 @@ typedef struct PseudoColorContext { · 126 unmodified lines | |||
| 127 | } PseudoColorContext; | 127 | } PseudoColorContext; |
| 128 | 128 | ||
| 129 | #define OFFSET(x) offsetof(PseudoColorContext, x) | 129 | #define OFFSET(x) offsetof(PseudoColorContext, x) |
| 130 | #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM | 130 | #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM |
| 131 | 131 | ||
| 132 | static const AVOption pseudocolor_options[] = { | 132 | static const AVOption pseudocolor_options[] = { |
| 133 | { "c0", "set component #0 expression", OFFSET(comp_expr_str[0]), AV_OPT_TYPE_STRING, {.str="val"}, .flags = FLAGS }, | 133 | { "c0", "set component #0 expression", OFFSET(comp_expr_str[0]), AV_OPT_TYPE_STRING, {.str="val"}, .flags = FLAGS }, |
| @@ -720,6 +720,17 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 586 unmodified lines | |||
| 720 | return ff_filter_frame(outlink, out); | 720 | return ff_filter_frame(outlink, out); |
| 721 | } | 721 | } |
| 722 | 722 | ||
| 723 | static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, | ||
| 724 | char *res, int res_len, int flags) | ||
| 725 | { | ||
| 726 | int ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags); | ||
| 727 | |||
| 728 | if (ret < 0) | ||
| 729 | return ret; | ||
| 730 | |||
| 731 | return config_input(ctx->inputs[0]); | ||
| 732 | } | ||
| 733 | |||
| 723 | static const AVFilterPad inputs[] = { | 734 | static const AVFilterPad inputs[] = { |
| 724 | { | 735 | { |
| 725 | .name = "default", | 736 | .name = "default", |
| @@ -761,4 +772,5 @@ AVFilter ff_vf_pseudocolor = { · 35 unmodified lines | |||
| 761 | .inputs = inputs, | 772 | .inputs = inputs, |
| 762 | .outputs = outputs, | 773 | .outputs = outputs, |
| 763 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, | 774 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, |
| 775 | .process_command = process_command, | ||
| 764 | }; | 776 | }; |