diff mbox series

[FFmpeg-devel,13/25] avfilter/buffersink: add color space/range accessors

Message ID 20231109122534.124157-14-ffmpeg@haasn.xyz
State New
Headers show
Series YUVJ removal + filter negotiation | expand

Commit Message

Niklas Haas Nov. 9, 2023, 12:19 p.m. UTC
From: Niklas Haas <git@haasn.dev>

Needed for fftools.
---
 doc/APIchanges           | 3 +++
 libavfilter/buffersink.c | 2 ++
 libavfilter/buffersink.h | 2 ++
 libavfilter/version.h    | 2 +-
 4 files changed, 8 insertions(+), 1 deletion(-)

Comments

Anton Khirnov Dec. 12, 2023, 1:08 p.m. UTC | #1
Quoting Niklas Haas (2023-11-09 13:19:45)
> From: Niklas Haas <git@haasn.dev>
> 
> Needed for fftools.
> ---
>  doc/APIchanges           | 3 +++
>  libavfilter/buffersink.c | 2 ++
>  libavfilter/buffersink.h | 2 ++
>  libavfilter/version.h    | 2 +-
>  4 files changed, 8 insertions(+), 1 deletion(-)

Looks trivial enough.
diff mbox series

Patch

diff --git a/doc/APIchanges b/doc/APIchanges
index ce3f90a674..97b6de8276 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@  The last version increases of all libraries were on 2023-02-09
 
 API changes, most recent first:
 
+2023-11-xx - xxxxxxxxxx - lavf 58.15.100 - buffersink.h
+  Add av_buffersink_get_colorspace and av_buffersink_get_color_range.
+
 2023-11-xx - xxxxxxxxxx - lavf 58.14.100 - avfilter.h formats.h
   Add AVFilterFormatsConfig.color_spaces, AVFilterFormatsConfig.color_ranges,
   AVFilterLink.colorspace, AVFilterLink.color_range, ff_all_color_spaces,
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index ca2af1bc07..8fb9ba0fa4 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -202,6 +202,8 @@  MAKE_AVFILTERLINK_ACCESSOR(AVRational       , frame_rate         )
 MAKE_AVFILTERLINK_ACCESSOR(int              , w                  )
 MAKE_AVFILTERLINK_ACCESSOR(int              , h                  )
 MAKE_AVFILTERLINK_ACCESSOR(AVRational       , sample_aspect_ratio)
+MAKE_AVFILTERLINK_ACCESSOR(enum AVColorSpace, colorspace)
+MAKE_AVFILTERLINK_ACCESSOR(enum AVColorRange, color_range)
 
 #if FF_API_OLD_CHANNEL_LAYOUT
 FF_DISABLE_DEPRECATION_WARNINGS
diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h
index 64e08de53e..a9374b8b4f 100644
--- a/libavfilter/buffersink.h
+++ b/libavfilter/buffersink.h
@@ -117,6 +117,8 @@  AVRational       av_buffersink_get_frame_rate          (const AVFilterContext *c
 int              av_buffersink_get_w                   (const AVFilterContext *ctx);
 int              av_buffersink_get_h                   (const AVFilterContext *ctx);
 AVRational       av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx);
+enum AVColorSpace av_buffersink_get_colorspace         (const AVFilterContext *ctx);
+enum AVColorRange av_buffersink_get_color_range        (const AVFilterContext *ctx);
 
 int              av_buffersink_get_channels            (const AVFilterContext *ctx);
 #if FF_API_OLD_CHANNEL_LAYOUT
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 7642b670d1..59330858bd 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -31,7 +31,7 @@ 
 
 #include "version_major.h"
 
-#define LIBAVFILTER_VERSION_MINOR  14
+#define LIBAVFILTER_VERSION_MINOR  15
 #define LIBAVFILTER_VERSION_MICRO 100