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>
This commit is contained in:
James Almer 2024-03-04 16:22:22 -03:00
parent 79c6ba9007
commit ab15c04dee
4 changed files with 19 additions and 1 deletions

View File

@ -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).

View File

@ -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;

View File

@ -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.
*

View File

@ -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, \