History

avutil/frame: Deprecate av_get_colorspace_name()

Contrary to av_color_space_name() it doesn't even support newer colorspaces.

Andreas Rheinhardt committed 5 years ago

Commit a77beea1 parent 54127cc4 files · +14 −3Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavutil/frame.c +2 −1
  3. libavutil/frame.h +4 −1
  4. libavutil/version.h +4 −1
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2021-03-21 - xxxxxxxxxx - lavu 56.72.100 - frame.h
19+ Deprecated av_get_colorspace_name().
20+ Use av_color_space_name() instead.
21+
1822 -------- 8< --------- FFmpeg 4.4 was cut here -------- 8< ---------
1923
2024 2021-03-19 - e8c0bca6bd - lavu 56.69.100 - adler32.h
libavutil/frame.c+2−1
@@ -120,6 +120,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 119 unmodified lines
120120 }
121121 #endif
122122
123+#if FF_API_COLORSPACE_NAME
123124 const char *av_get_colorspace_name(enum AVColorSpace val)
124125 {
125126 static const char * const name[] = {
@@ -135,7 +136,7 @@ const char *av_get_colorspace_name(enum AVColorSpace val) · 9 unmodified lines
135136 return NULL;
136137 return name[val];
137138 }
138−
139+#endif
139140 static void get_frame_defaults(AVFrame *frame)
140141 {
141142 if (frame->extended_data != frame->data)
libavutil/frame.h+4−1
@@ -754,12 +754,15 @@ attribute_deprecated · 753 unmodified lines
754754 void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val);
755755 #endif
756756
757+#if FF_API_COLORSPACE_NAME
757758 /**
758759 * Get the name of a colorspace.
759760 * @return a static string identifying the colorspace; can be NULL.
761+ * @deprecated use av_color_space_name()
760762 */
763+attribute_deprecated
761764 const char *av_get_colorspace_name(enum AVColorSpace val);
762−
765+#endif
763766 /**
764767 * Allocate an AVFrame and set its fields to default values. The resulting
765768 * struct must be freed using av_frame_free().
libavutil/version.h+4−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
7979 */
8080
8181 #define LIBAVUTIL_VERSION_MAJOR 56
82−#define LIBAVUTIL_VERSION_MINOR 71
82+#define LIBAVUTIL_VERSION_MINOR 72
8383 #define LIBAVUTIL_VERSION_MICRO 100
8484
8585 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@@ -141,6 +141,9 @@ · 55 unmodified lines
141141 #ifndef FF_API_DECLARE_ALIGNED
142142 #define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58)
143143 #endif
144+#ifndef FF_API_COLORSPACE_NAME
145+#define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58)
146+#endif
144147
145148 /**
146149 * @}

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