aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-03-04 16:22:22 -0300
committerJames Almer <jamrial@gmail.com>2024-03-05 11:54:27 -0300
commitab15c04dee5a607e4cedeff852839f96d8bc9129 (patch)
treedf95e4f99a307ea78b7b5a8a3acc4350db7aac3d
parent79c6ba900792fcf01a6e29bc7e924da222be2dab (diff)
downloadffmpeg-ab15c04dee5a607e4cedeff852839f96d8bc9129.tar.gz
avformat/avformat: add a function to return the name of stream groups
Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--doc/APIchanges3
-rw-r--r--libavformat/avformat.c10
-rw-r--r--libavformat/avformat.h5
-rw-r--r--libavformat/version.h2
4 files changed, 19 insertions, 1 deletions
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
@@ -2121,6 +2121,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.
*
* When demuxing, it may be called by the demuxer in read_header(). If the
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, \