ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Mon Mar  4 16:22:22 
2024 -0300| [ab15c04dee5a607e4cedeff852839f96d8bc9129] | committer: James Almer

avformat/avformat: add a function to return the name of stream groups

Reviewed-by: Stefano Sabatini <stefa...@gmail.com>
Signed-off-by: James Almer <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab15c04dee5a607e4cedeff852839f96d8bc9129
---

 doc/APIchanges         |  3 +++
 libavformat/avformat.c | 10 ++++++++++
 libavformat/avformat.h |  5 +++++
 libavformat/version.h  |  2 +-
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 7d46ebb006..523945e511 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:
 
+2024-03-05 - xxxxxxxxxx - lavf 60.24.100 - avformat.h
+  Add avformat_stream_group_name().
+
 2024-02-28 - xxxxxxxxxx - swr   4.14.100 - swresample.h
   swr_convert() now accepts arrays of const pointers (to input and output).
 
diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index eb898223d2..98dfac2f89 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -321,6 +321,16 @@ AVStream *ff_stream_clone(AVFormatContext *dst_ctx, const 
AVStream *src)
     return st;
 }
 
+const char *avformat_stream_group_name(enum AVStreamGroupParamsType type)
+{
+    switch(type) {
+    case AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT:        return "IAMF Audio 
Element";
+    case AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION:     return "IAMF Mix 
Presentation";
+    case AV_STREAM_GROUP_PARAMS_TILE_GRID:                 return "Tile Grid";
+    }
+    return NULL;
+}
+
 AVProgram *av_new_program(AVFormatContext *ac, int id)
 {
     AVProgram *program = NULL;
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f4506f4cf1..3a584993dd 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2120,6 +2120,11 @@ const AVClass *av_stream_get_class(void);
  */
 const AVClass *av_stream_group_get_class(void);
 
+/**
+ * @return a string identifying the stream group type, or NULL if unknown
+ */
+const char *avformat_stream_group_name(enum AVStreamGroupParamsType type);
+
 /**
  * Add a new empty stream group to a media file.
  *
diff --git a/libavformat/version.h b/libavformat/version.h
index a8385d1a7b..6c2776460b 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #include "version_major.h"
 
-#define LIBAVFORMAT_VERSION_MINOR  23
+#define LIBAVFORMAT_VERSION_MINOR  24
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to