[FFmpeg-devel] [PATCH v2 3/5] avformat/dump: dump AV_PKT_DATA_MPEGTS_6A_DESC side data

lance.lmwang at gmail.com lance.lmwang at gmail.com
Thu Jul 30 17:58:56 EEST 2020


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavformat/dump.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 6d29d85..249789a 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -28,6 +28,7 @@
 #include "libavutil/log.h"
 #include "libavutil/mastering_display_metadata.h"
 #include "libavutil/dovi_meta.h"
+#include "libavutil//mpegts_audio_desc_metadata.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/opt.h"
 #include "libavutil/avstring.h"
@@ -424,6 +425,19 @@ static void dump_s12m_timecode(void *ctx, const AVPacketSideData *sd)
     }
 }
 
+static void dump_desc6a_conf(void *ctx, const AVPacketSideData *sd)
+{
+    const AVDescriptor6A *desc6a = (const AVDescriptor6A *)sd->data;
+
+    av_log(ctx, AV_LOG_INFO, "component_type_flag: %u, bsid_flag: %u, "
+           "mainid_flag: %u, asvc_flag: %u, "
+           "component_type: %u, bsid: %u, mainid: %u, asvc: %u",
+           desc6a->component_type_flag, desc6a->bsid_flag,
+           desc6a->mainid_flag, desc6a->asvc_flag,
+           desc6a->component_type, desc6a->bsid, desc6a->mainid, desc6a->asvc);
+}
+
+
 static void dump_sidedata(void *ctx, const AVStream *st, const char *indent)
 {
     int i;
@@ -494,6 +508,10 @@ static void dump_sidedata(void *ctx, const AVStream *st, const char *indent)
             av_log(ctx, AV_LOG_INFO, "SMPTE ST 12-1:2014: ");
             dump_s12m_timecode(ctx, sd);
             break;
+        case AV_PKT_DATA_MPEGTS_DESC_6A:
+            av_log(ctx, AV_LOG_INFO, "ETSI 300 468 descriptor 0x6A(AC-3): ");
+            dump_desc6a_conf(ctx, sd);
+            break;
         default:
             av_log(ctx, AV_LOG_INFO,
                    "unknown side data type %d (%d bytes)", sd->type, sd->size);
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list