From patchwork Thu Jul 30 14:58:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21388 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7695D44B9B6 for ; Thu, 30 Jul 2020 18:27:04 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4B00B68B502; Thu, 30 Jul 2020 18:27:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f66.google.com (mail-qv1-f66.google.com [209.85.219.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A63268B4FB for ; Thu, 30 Jul 2020 18:26:57 +0300 (EEST) Received: by mail-qv1-f66.google.com with SMTP id r19so4175743qvw.11 for ; Thu, 30 Jul 2020 08:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IbOrL6h7v4Z8BsSmiXl3EOueOGOsGwlQ/yQx2OditlI=; b=iCfjMg9NZzzgp94K8IVpIuHoCTFvJ+6TcMMQKGe8K4QsBTJvVO2CwyAz5xCqft/GdK +hWTI5U8cADB0dvkyklB4mKnP3SDuN9QFlwznKPICHKOmdPF9jJSHR7/oPupOPNGugVh +70w9larp0jCtH/INXjfgBgBjE2HS0hT79/eflkKw5+rf6PCbrnHoALdlpEl+rNXzGII 1eYmAz5PtC+c9pafDdF+HCoLovS6JudlYplcXHHjNm1pSYFBNiO2yrEdz6bEmZ7Qf8/m w5q6MURclDcTf4i6hZ9r4RoI8mr9nywkK4uX/lul6A5kJUkO2qmLyKRbRRxX0JIOKslr nxmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IbOrL6h7v4Z8BsSmiXl3EOueOGOsGwlQ/yQx2OditlI=; b=topPlFhYJuxLwH4nx25Tby6BsXoeusT+CKrw4Kn2oKFTkp9aipvGwRPxZ6y5tI+y+d b/SPx5/Hol/zE+qT4SKlE0+CqY47cPeVp1ydlwUoInSLuLUvIzZoqR9FsZnlmrgtQkF6 OfPQ/VzRwnLDq0q1eNs+kUcWypcoty7NBSoedFE+2ldoMsNhP030D2O/IU4w/G+BAet2 W0sid2pW7WtwqiYBjyKo4MZIJyidfIE2sMib0kdAeASePLEDXOPRHzbK36k2RGK0qU8f D/hUAAdELfiwUaaUvljVao6hx6Cg7x+/PVFYsQxX/X7200XZ3V03ibu6H1wk5odHshoR JLJA== X-Gm-Message-State: AOAM531jppap3lXIx9GS9aBZE5TmsCTJBubsYcj2Ay09QRCWptjw/gw0 EbxDhmMn1dGc459AJQOOGoKnPFOv X-Google-Smtp-Source: ABdhPJx7MWhKGHqm/LitiTD49P/USbsHrTDS/8fW+/s8XC/7+1YbHQuD+oKPZLnciz11Fi6mWz8tUg== X-Received: by 2002:a62:b417:: with SMTP id h23mr3495746pfn.118.1596121146906; Thu, 30 Jul 2020 07:59:06 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id d5sm5620864pju.15.2020.07.30.07.59.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 07:59:06 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 Jul 2020 22:58:56 +0800 Message-Id: <1596121138-20997-3-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1596121138-20997-1-git-send-email-lance.lmwang@gmail.com> References: <1595948614-10861-1-git-send-email-lance.lmwang@gmail.com> <1596121138-20997-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH v2 3/5] avformat/dump: dump AV_PKT_DATA_MPEGTS_6A_DESC side data X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang Signed-off-by: Limin Wang --- 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);