diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-25 19:37:16 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:03 -0300 |
commit | e8fdb0db16c5ca8ad382b20874b4a454be6b79ae (patch) | |
tree | ca6c99f02a179646053196cca0b1fd0f5242ab23 | |
parent | d1d8a818742f2429b544d38446a3510d8a23be94 (diff) | |
download | ffmpeg-e8fdb0db16c5ca8ad382b20874b4a454be6b79ae.tar.gz |
avcodec: Remove lock manager API
Deprecated in a04c2c707de2ce850f79870e84ac9d7ec7aa9143.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/avcodec.c | 7 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 43 | ||||
-rw-r--r-- | libavcodec/version.h | 3 |
3 files changed, 0 insertions, 53 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 24f6922d4f..01fe8a6d97 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -102,13 +102,6 @@ static void unlock_avcodec(const AVCodec *codec) ff_mutex_unlock(&codec_mutex); } -#if FF_API_LOCKMGR -int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) -{ - return 0; -} -#endif - static int64_t get_bit_rate(AVCodecContext *ctx) { int64_t bit_rate; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 0e86064ccb..7c6f5c1fc0 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3799,49 +3799,6 @@ attribute_deprecated AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel); #endif -#if FF_API_LOCKMGR -/** - * Lock operation used by lockmgr - * - * @deprecated Deprecated together with av_lockmgr_register(). - */ -enum AVLockOp { - AV_LOCK_CREATE, ///< Create a mutex - AV_LOCK_OBTAIN, ///< Lock the mutex - AV_LOCK_RELEASE, ///< Unlock the mutex - AV_LOCK_DESTROY, ///< Free mutex resources -}; - -/** - * Register a user provided lock manager supporting the operations - * specified by AVLockOp. The "mutex" argument to the function points - * to a (void *) where the lockmgr should store/get a pointer to a user - * allocated mutex. It is NULL upon AV_LOCK_CREATE and equal to the - * value left by the last call for all other ops. If the lock manager is - * unable to perform the op then it should leave the mutex in the same - * state as when it was called and return a non-zero value. However, - * when called with AV_LOCK_DESTROY the mutex will always be assumed to - * have been successfully destroyed. If av_lockmgr_register succeeds - * it will return a non-negative value, if it fails it will return a - * negative value and destroy all mutex and unregister all callbacks. - * av_lockmgr_register is not thread-safe, it must be called from a - * single thread before any calls which make use of locking are used. - * - * @param cb User defined callback. av_lockmgr_register invokes calls - * to this callback and the previously registered callback. - * The callback will be used to create more than one mutex - * each of which must be backed by its own underlying locking - * mechanism (i.e. do not use a single static object to - * implement your lock manager). If cb is set to NULL the - * lockmgr will be unregistered. - * - * @deprecated This function does nothing, and always returns 0. Be sure to - * build with thread support to get basic thread safety. - */ -attribute_deprecated -int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); -#endif - /** * @return a positive value if s is open (i.e. avcodec_open2() was called on it * with no corresponding avcodec_close()), 0 otherwise. diff --git a/libavcodec/version.h b/libavcodec/version.h index a43c44961e..e76ec915f9 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -87,9 +87,6 @@ #ifndef FF_API_USER_VISIBLE_AVHWACCEL #define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_LOCKMGR -#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_UNSANITIZED_BITRATES #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) #endif |