From a7dd933b811b799cc087508f24201f2593c07347 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 3 May 2015 03:21:23 +0200 Subject: [PATCH] avcodec: Add av_packet_side_data_name() Signed-off-by: Michael Niedermayer --- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 2 ++ libavcodec/avpacket.c | 23 +++++++++++++++++++++++ libavcodec/version.h | 4 ++-- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index bf0913aaa9..fc150aef44 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2014-08-09 API changes, most recent first: +2015-05-07 - xxxxxxx - 56.38.100 - avcodec.h + Add av_packet_side_data_name(). + 2015-05-04 - xxxxxxx - 56.37.100 - avcodec.h Add FF_PROFILE_VP9_0 and FF_PROFILE_VP9_1. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index f1a330e409..4aeb57aed4 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3852,6 +3852,8 @@ int av_packet_merge_side_data(AVPacket *pkt); int av_packet_split_side_data(AVPacket *pkt); +const char *av_packet_side_data_name(enum AVPacketSideDataType type); + /** * Pack a dictionary for use in side_data. * diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 22a2d5d57d..aae67c5a00 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -336,6 +336,29 @@ uint8_t *av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, return NULL; } +const char *av_packet_side_data_name(enum AVPacketSideDataType type) +{ + switch(type) { + case AV_PKT_DATA_PALETTE: return "Palette"; + case AV_PKT_DATA_NEW_EXTRADATA: return "New Extradata"; + case AV_PKT_DATA_PARAM_CHANGE: return "Param Change"; + case AV_PKT_DATA_H263_MB_INFO: return "H263 MB Info"; + case AV_PKT_DATA_REPLAYGAIN: return "Replay Gain"; + case AV_PKT_DATA_DISPLAYMATRIX: return "Display Matrix"; + case AV_PKT_DATA_STEREO3D: return "Stereo 3D"; + case AV_PKT_DATA_AUDIO_SERVICE_TYPE: return "Audio Service Type"; + case AV_PKT_DATA_SKIP_SAMPLES: return "Skip Samples"; + case AV_PKT_DATA_JP_DUALMONO: return "JP Dual Mono"; + case AV_PKT_DATA_STRINGS_METADATA: return "Strings Metadata"; + case AV_PKT_DATA_SUBTITLE_POSITION: return "Subtitle Position"; + case AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL: return "Matroska BlockAdditional"; + case AV_PKT_DATA_WEBVTT_IDENTIFIER: return "WebVTT ID"; + case AV_PKT_DATA_WEBVTT_SETTINGS: return "WebVTT Settings"; + case AV_PKT_DATA_METADATA_UPDATE: return "Metadata Update"; + } + return NULL; +} + #define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL int av_packet_merge_side_data(AVPacket *pkt){ diff --git a/libavcodec/version.h b/libavcodec/version.h index e4a7f753c4..1d0525aa18 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,8 +29,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 56 -#define LIBAVCODEC_VERSION_MINOR 37 -#define LIBAVCODEC_VERSION_MICRO 102 +#define LIBAVCODEC_VERSION_MINOR 38 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \