summaryrefslogtreecommitdiff
path: root/libavcodec/codec.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-03-09 18:35:56 +0100
committerAnton Khirnov <anton@khirnov.net>2021-03-16 10:38:41 +0100
commit7d09579190def3ef7562399489e628f3b65714ce (patch)
treed51d4586c7b44eaabc6d077bcc7af29e17d51d48 /libavcodec/codec.h
parent8a129077cc37202a00dd666bd5365c3f61ea2e80 (diff)
downloadffmpeg-7d09579190def3ef7562399489e628f3b65714ce.tar.gz
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.
Diffstat (limited to 'libavcodec/codec.h')
-rw-r--r--libavcodec/codec.h9
1 files changed, 7 insertions, 2 deletions
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.
*/