[FFmpeg-devel] [PATCH 2/9] avformat/avformat: add a function to return the name of stream groups
James Almer
jamrial at gmail.com
Tue Mar 5 02:00:22 EET 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
Missing version bump and APIChanges entry.
libavformat/avformat.c | 10 ++++++++++
libavformat/avformat.h | 5 +++++
2 files changed, 15 insertions(+)
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..c41041b1bc 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
+ */
+const char *avformat_stream_group_name(enum AVStreamGroupParamsType type);
+
/**
* Add a new empty stream group to a media file.
*
--
2.44.0
More information about the ffmpeg-devel
mailing list