aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/internal.h
diff options
context:
space:
mode:
authorAlexander Strange <astrange@ithinksw.com>2011-02-07 21:15:44 -0500
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-09 09:17:28 -0500
commit37b00b47cbeecd66bb34c5c7c534d016d6e8da24 (patch)
treedce47f2343f8a0f0f73e09a787aa92f255f9aa0f /libavutil/internal.h
parentc2bd7578af069206831a9c25fa68c9bbd5004619 (diff)
downloadffmpeg-37b00b47cbeecd66bb34c5c7c534d016d6e8da24.tar.gz
Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r--libavutil/internal.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 36d3e719f6..4c98a1299f 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -210,4 +210,15 @@
type ff_##name args
#endif
+/**
+ * Returns NULL if a threading library has not been enabled.
+ * Used to disable threading functions in AVCodec definitions
+ * when not needed.
+ */
+#if HAVE_THREADS
+# define ONLY_IF_THREADS_ENABLED(x) x
+#else
+# define ONLY_IF_THREADS_ENABLED(x) NULL
+#endif
+
#endif /* AVUTIL_INTERNAL_H */