mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 19:58:59 +00:00
avfilter/avfilter: add ff_filter_process_command()
This commit is contained in:
parent
f3746d31f9
commit
a918b833a5
@ -884,6 +884,19 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options,
|
||||
return count;
|
||||
}
|
||||
|
||||
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
|
||||
const char *arg, char *res, int res_len, int flags)
|
||||
{
|
||||
const AVOption *o;
|
||||
|
||||
if (!ctx->filter->priv_class)
|
||||
return 0;
|
||||
o = av_opt_find2(ctx->priv, cmd, NULL, AV_OPT_FLAG_RUNTIME_PARAM | AV_OPT_FLAG_FILTERING_PARAM, AV_OPT_SEARCH_CHILDREN, NULL);
|
||||
if (!o)
|
||||
return AVERROR(ENOSYS);
|
||||
return av_opt_set(ctx->priv, cmd, arg, 0);
|
||||
}
|
||||
|
||||
int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -411,6 +411,13 @@ static inline int ff_norm_qscale(int qscale, int type)
|
||||
*/
|
||||
int ff_filter_get_nb_threads(AVFilterContext *ctx);
|
||||
|
||||
/**
|
||||
* Generic processing of user supplied commands that are set
|
||||
* in the same way as the filter options.
|
||||
*/
|
||||
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
|
||||
const char *arg, char *res, int res_len, int flags);
|
||||
|
||||
/**
|
||||
* Perform any additional setup required for hardware frames.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user