ffmpeg | branch: master | Paul B Mahol <[email protected]> | Sat Aug 27 22:10:10 2016 +0200| [449339084fb2fe9259d8612a9c8c2a886022d1f5] | committer: Paul B Mahol
avfilter: add nb_threads to AVFilterContext To be used in following commits. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=449339084fb2fe9259d8612a9c8c2a886022d1f5 --- libavfilter/avfilter.c | 2 ++ libavfilter/avfilter.h | 7 +++++++ libavfilter/version.h | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 21f8d9e..a8e5a5a 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -616,6 +616,8 @@ static const AVOption avfilter_options[] = { { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" }, { "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .unit = "thread_type" }, { "enable", "set enable expression", OFFSET(enable_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, + { "threads", "Allowed number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT, + { .i64 = 0 }, 0, INT_MAX, FLAGS }, { NULL }, }; diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index d804c89..15d00f7 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -361,6 +361,13 @@ struct AVFilterContext { * hardware context information. */ AVBufferRef *hw_device_ctx; + + /** + * Max number of threads allowed in this filter instance. + * If <= 0, its value is ignored. + * Overrides global number of threads set per filter graph. + */ + int nb_threads; }; /** diff --git a/libavfilter/version.h b/libavfilter/version.h index e3e3ed0..1b91d60 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 6 -#define LIBAVFILTER_VERSION_MINOR 57 +#define LIBAVFILTER_VERSION_MINOR 58 #define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
