[FFmpeg-devel] [PATCH] avcodec: Add av_packet_side_data_name()
Michael Niedermayer
michaelni at gmx.at
Sun May 3 04:11:04 CEST 2015
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/avcodec.h | 2 ++
libavcodec/avpacket.c | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8c7c420..41414ee 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3847,6 +3847,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 22a2d5d..aae67c5 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){
--
1.7.9.5
More information about the ffmpeg-devel
mailing list