History

lavc: Deprecate av_hwaccel_next() and av_register_hwaccel()

Mark Thompson committed 9 years ago

Commit e2d57551 parent 39056b54 files · +26 −11Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavcodec/avcodec.h +13 −0
  3. libavcodec/utils.c +5 −10
  4. libavcodec/version.h +4 −1
doc/APIchanges+4−0
@@ -13,6 +13,10 @@ libavutil: 2017-03-23 · 12 unmodified lines
13 13
14API changes, most recent first:14API changes, most recent first:
15 15
162017-xx-xx - xxxxxxx - lavc 58.7.0 - avcodec.h
17 Deprecate user visibility of the AVHWAccel structure and the functions
18 av_register_hwaccel() and av_hwaccel_next().
19
162017-xx-xx - xxxxxxx - lavc 58.6.0 - avcodec.h202017-xx-xx - xxxxxxx - lavc 58.6.0 - avcodec.h
17 Add AVCodecHWConfig and avcodec_get_hw_config().21 Add AVCodecHWConfig and avcodec_get_hw_config().
18 22
libavcodec/avcodec.h+13−0
@@ -2962,6 +2962,10 @@ const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index); · 2961 unmodified lines
2962 2962
2963/**2963/**
2964 * @defgroup lavc_hwaccel AVHWAccel2964 * @defgroup lavc_hwaccel AVHWAccel
2965 *
2966 * @note Nothing in this structure should be accessed by the user. At some
2967 * point in future it will not be externally visible at all.
2968 *
2965 * @{2969 * @{
2966 */2970 */
2967typedef struct AVHWAccel {2971typedef struct AVHWAccel {
@@ -5040,17 +5044,26 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size); · 2072 unmodified lines
5040 */5044 */
5041unsigned int av_xiphlacing(unsigned char *s, unsigned int v);5045unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
5042 5046
5047#if FF_API_USER_VISIBLE_AVHWACCEL
5043/**5048/**
5044 * Register the hardware accelerator hwaccel.5049 * Register the hardware accelerator hwaccel.
5050 *
5051 * @deprecated This function doesn't do anything.
5045 */5052 */
5053attribute_deprecated
5046void av_register_hwaccel(AVHWAccel *hwaccel);5054void av_register_hwaccel(AVHWAccel *hwaccel);
5047 5055
5048/**5056/**
5049 * If hwaccel is NULL, returns the first registered hardware accelerator,5057 * If hwaccel is NULL, returns the first registered hardware accelerator,
5050 * if hwaccel is non-NULL, returns the next registered hardware accelerator5058 * if hwaccel is non-NULL, returns the next registered hardware accelerator
5051 * after hwaccel, or NULL if hwaccel is the last one.5059 * after hwaccel, or NULL if hwaccel is the last one.
5060 *
5061 * @deprecated AVHWaccel structures contain no user-serviceable parts, so
5062 * this function should not be used.
5052 */5063 */
5064attribute_deprecated
5053AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);5065AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);
5066#endif
5054 5067
5055 5068
5056/**5069/**
libavcodec/utils.c+5−10
@@ -1347,21 +1347,16 @@ const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index) · 1346 unmodified lines
1347 return &codec->hw_configs[index]->public;1347 return &codec->hw_configs[index]->public;
1348}1348}
1349 1349
1350static AVHWAccel *first_hwaccel = NULL;1350#if FF_API_USER_VISIBLE_AVHWACCEL
1351 1351AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel)
1352void av_register_hwaccel(AVHWAccel *hwaccel)
1353{1352{
1354 AVHWAccel **p = &first_hwaccel;1353 return NULL;
1355 while (*p)
1356 p = &(*p)->next;
1357 *p = hwaccel;
1358 hwaccel->next = NULL;
1359}1354}
1360 1355
1361AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel)1356void av_register_hwaccel(AVHWAccel *hwaccel)
1362{1357{
1363 return hwaccel ? hwaccel->next : first_hwaccel;
1364}1358}
1359#endif
1365 1360
1366int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))1361int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
1367{1362{
libavcodec/version.h+4−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
28#include "libavutil/version.h"28#include "libavutil/version.h"
29 29
30#define LIBAVCODEC_VERSION_MAJOR 5830#define LIBAVCODEC_VERSION_MAJOR 58
31#define LIBAVCODEC_VERSION_MINOR 631#define LIBAVCODEC_VERSION_MINOR 7
32#define LIBAVCODEC_VERSION_MICRO 032#define LIBAVCODEC_VERSION_MICRO 0
33 33
34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -95,5 +95,8 @@ · 60 unmodified lines
95#ifndef FF_API_VAAPI_CONTEXT95#ifndef FF_API_VAAPI_CONTEXT
96#define FF_API_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)96#define FF_API_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
97#endif97#endif
98#ifndef FF_API_USER_VISIBLE_AVHWACCEL
99#define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 60)
100#endif
98 101
99#endif /* AVCODEC_VERSION_H */102#endif /* AVCODEC_VERSION_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t