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
1313
1414 API changes, most recent first:
1515
16+2017-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+
1620 2017-xx-xx - xxxxxxx - lavc 58.6.0 - avcodec.h
1721 Add AVCodecHWConfig and avcodec_get_hw_config().
1822
libavcodec/avcodec.h+13−0
@@ -2962,6 +2962,10 @@ const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index); · 2961 unmodified lines
29622962
29632963 /**
29642964 * @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+ *
29652969 * @{
29662970 */
29672971 typedef struct AVHWAccel {
@@ -5040,17 +5044,26 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size); · 2072 unmodified lines
50405044 */
50415045 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
50425046
5047+#if FF_API_USER_VISIBLE_AVHWACCEL
50435048 /**
50445049 * Register the hardware accelerator hwaccel.
5050+ *
5051+ * @deprecated This function doesn't do anything.
50455052 */
5053+attribute_deprecated
50465054 void av_register_hwaccel(AVHWAccel *hwaccel);
50475055
50485056 /**
50495057 * If hwaccel is NULL, returns the first registered hardware accelerator,
50505058 * if hwaccel is non-NULL, returns the next registered hardware accelerator
50515059 * 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.
50525063 */
5064+attribute_deprecated
50535065 AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);
5066+#endif
50545067
50555068
50565069 /**
libavcodec/utils.c+5−10
@@ -1347,21 +1347,16 @@ const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index) · 1346 unmodified lines
13471347 return &codec->hw_configs[index]->public;
13481348 }
13491349
1350−static AVHWAccel *first_hwaccel = NULL;
1351−
1352−void av_register_hwaccel(AVHWAccel *hwaccel)
1350+#if FF_API_USER_VISIBLE_AVHWACCEL
1351+AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel)
13531352 {
1354− AVHWAccel **p = &first_hwaccel;
1355− while (*p)
1356− p = &(*p)->next;
1357− *p = hwaccel;
1358− hwaccel->next = NULL;
1353+ return NULL;
13591354 }
13601355
1361−AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel)
1356+void av_register_hwaccel(AVHWAccel *hwaccel)
13621357 {
1363− return hwaccel ? hwaccel->next : first_hwaccel;
13641358 }
1359+#endif
13651360
13661361 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
13671362 {
libavcodec/version.h+4−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
2828 #include "libavutil/version.h"
2929
3030 #define LIBAVCODEC_VERSION_MAJOR 58
31−#define LIBAVCODEC_VERSION_MINOR 6
31+#define LIBAVCODEC_VERSION_MINOR 7
3232 #define LIBAVCODEC_VERSION_MICRO 0
3333
3434 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -95,5 +95,8 @@ · 60 unmodified lines
9595 #ifndef FF_API_VAAPI_CONTEXT
9696 #define FF_API_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
9797 #endif
98+#ifndef FF_API_USER_VISIBLE_AVHWACCEL
99+#define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 60)
100+#endif
98101
99102 #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