Message ID | 20210903133638.812-1-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/2] avfilter/avfiltergraph: add an "auto" constant to the threads option | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
On 9/3/2021 10:36 AM, James Almer wrote: > Signed-off-by: James Almer <jamrial@gmail.com> > --- > libavfilter/avfiltergraph.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c > index 383d9c5478..727c8b7f5c 100644 > --- a/libavfilter/avfiltergraph.c > +++ b/libavfilter/avfiltergraph.c > @@ -50,8 +50,8 @@ static const AVOption filtergraph_options[] = { > { "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS, > { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, F|V|A, "thread_type" }, > { "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .flags = F|V|A, .unit = "thread_type" }, > - { "threads", "Maximum number of threads", OFFSET(nb_threads), > - AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, F|V|A }, > + { "threads", "Maximum number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, F|V|A, "threads" }, > + {"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, F|V|A, "threads"}, > {"scale_sws_opts" , "default scale filter options" , OFFSET(scale_sws_opts) , > AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|V }, > {"aresample_swr_opts" , "default aresample filter options" , OFFSET(aresample_swr_opts) , Will apply set.
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 383d9c5478..727c8b7f5c 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -50,8 +50,8 @@ static const AVOption filtergraph_options[] = { { "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS, { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, F|V|A, "thread_type" }, { "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .flags = F|V|A, .unit = "thread_type" }, - { "threads", "Maximum number of threads", OFFSET(nb_threads), - AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, F|V|A }, + { "threads", "Maximum number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, F|V|A, "threads" }, + {"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, F|V|A, "threads"}, {"scale_sws_opts" , "default scale filter options" , OFFSET(scale_sws_opts) , AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|V }, {"aresample_swr_opts" , "default aresample filter options" , OFFSET(aresample_swr_opts) ,
Signed-off-by: James Almer <jamrial@gmail.com> --- libavfilter/avfiltergraph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)