From 7d09579190def3ef7562399489e628f3b65714ce Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 9 Mar 2021 18:35:56 +0100 Subject: lavc: rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS This cap is currently used to mark multithreading-capable codecs that wrap external libraries with their own multithreading code. The name is highly confusing for our API users, since libavcodec ALWAYS handles thread_count=0 (see commit message in previous commit). Therefore rename the cap and update its documentation to make its meaning clear. The old name is kept deprecated until next+1 major bump. --- libavcodec/codec.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libavcodec/codec.h') diff --git a/libavcodec/codec.h b/libavcodec/codec.h index 1bb70260ac..50a22f6e3c 100644 --- a/libavcodec/codec.h +++ b/libavcodec/codec.h @@ -115,9 +115,14 @@ */ #define AV_CODEC_CAP_PARAM_CHANGE (1 << 14) /** - * Codec supports avctx->thread_count == 0 (auto). + * Codec supports multithreading through a method other than slice- or + * frame-level multithreading. Typically this marks wrappers around + * multithreading-capable external libraries. */ -#define AV_CODEC_CAP_AUTO_THREADS (1 << 15) +#define AV_CODEC_CAP_OTHER_THREADS (1 << 15) +#if FF_API_AUTO_THREADS +#define AV_CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_OTHER_THREADS +#endif /** * Audio encoder supports receiving a different number of samples in each call. */ -- cgit v1.2.1