]> git.sesse.net Git - ffmpeg/commitdiff
avutil/frame: Deprecate av_get_colorspace_name()
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 21 Mar 2021 09:15:44 +0000 (10:15 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 24 Mar 2021 07:00:57 +0000 (08:00 +0100)
Contrary to av_color_space_name() it doesn't even support newer
colorspaces.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
doc/APIchanges
libavutil/frame.c
libavutil/frame.h
libavutil/version.h

index c928887f7959f1a8ac972fa89614b4062142c433..b41dadee8da7560a322b9d9e9b859f7cb73b36a3 100644 (file)
@@ -15,6 +15,10 @@ libavutil:     2017-10-21
 
 API changes, most recent first:
 
+2021-03-21 - xxxxxxxxxx - lavu 56.72.100 - frame.h
+  Deprecated av_get_colorspace_name().
+  Use av_color_space_name() instead.
+
 -------- 8< --------- FFmpeg 4.4 was cut here -------- 8< ---------
 
 2021-03-19 - e8c0bca6bd - lavu 56.69.100 - adler32.h
index 75e347bf2f0a831d495186c3a8a5296c7a840c2f..31a2117b82aa02afcc553dded8208a302f9e63d0 100644 (file)
@@ -120,6 +120,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 }
 #endif
 
+#if FF_API_COLORSPACE_NAME
 const char *av_get_colorspace_name(enum AVColorSpace val)
 {
     static const char * const name[] = {
@@ -135,7 +136,7 @@ const char *av_get_colorspace_name(enum AVColorSpace val)
         return NULL;
     return name[val];
 }
-
+#endif
 static void get_frame_defaults(AVFrame *frame)
 {
     if (frame->extended_data != frame->data)
index 7d1f8e293579c491868a9be181bd8ddb5962ad96..a5ed91b20ab83d90d59ae936153152dbe583480d 100644 (file)
@@ -754,12 +754,15 @@ attribute_deprecated
 void    av_frame_set_color_range(AVFrame *frame, enum AVColorRange val);
 #endif
 
+#if FF_API_COLORSPACE_NAME
 /**
  * Get the name of a colorspace.
  * @return a static string identifying the colorspace; can be NULL.
+ * @deprecated use av_color_space_name()
  */
+attribute_deprecated
 const char *av_get_colorspace_name(enum AVColorSpace val);
-
+#endif
 /**
  * Allocate an AVFrame and set its fields to default values.  The resulting
  * struct must be freed using av_frame_free().
index 55072f8246d0c18d1f4fde30a83aad68782ff0d3..e88e1ad08d4468cc056e882dea816d288635aa63 100644 (file)
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  56
-#define LIBAVUTIL_VERSION_MINOR  71
+#define LIBAVUTIL_VERSION_MINOR  72
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
 #ifndef FF_API_DECLARE_ALIGNED
 #define FF_API_DECLARE_ALIGNED          (LIBAVUTIL_VERSION_MAJOR < 58)
 #endif
+#ifndef FF_API_COLORSPACE_NAME
+#define FF_API_COLORSPACE_NAME          (LIBAVUTIL_VERSION_MAJOR < 58)
+#endif
 
 /**
  * @}