From patchwork Mon Oct 11 14:52:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31047 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp3775451ioa; Mon, 11 Oct 2021 07:53:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwudFNYP/bbLUvJ58Yf8xk8Vps80b8T1IK0JDWyV/OP1FOiBT6U4bJfXT9uU/T6+Kefd12K X-Received: by 2002:a50:d88a:: with SMTP id p10mr41819518edj.274.1633963984595; Mon, 11 Oct 2021 07:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633963984; cv=none; d=google.com; s=arc-20160816; b=CJvDho2UaHL2Ny4McaZESfuf3gpQa5/pRsiiXirNBi/RDROKOop3OzhGLnRT/roLbn 96UL7yIUs8Tw4lJ9Q+3aMzgVY6YFgysNQdS2pxDo127iVncDfrO843BNz71zZPDU1TFJ NJSrp/WXFQshb76MiUYADmVzhj4AKGuCc9WNsddzPbSv12+2ubo9z2Zjq0jCYHfGgtZF 1AJVdg3aMGLAVgf91FdsseUNbTTo0o6Wj7MG6OaewNp+Tvd6iUTXOMheNwY5MOwUBI3E /vRfHZh2ubRgvGCJxgCJNLfYtOAtGdQyv3/TsfsWdFihVQdTmJZ50sYRJ49+lJduaz42 8TFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=8NhJKes7Cdm4YIxZIFqFSz410fkTrQDv87HN9ybm14s=; b=UTixlCiiHq7oO2QFro5fCYuJXy7OfLRrNUvVinDyJrzj/4IibvJD90VXwNBqTb319G kRNXUmTCbBWnHiZ4o9ns3WDJ2B7CM6fe4A69SLmWHcm1/m0KvdXoz74T1E2JzpHu+/K4 lWPrRDZdpFe6+pBS69OyWMDAlWsPG5BwpsR8XGOIek5u5rSelljkIAh0njQebFF5aSws /uAoUdZtkx8CLBwkPnZOGHHLu497RuroUvnVdzw61D+fGPL+/AKZNvyvR7oRlIcVyTGu qH8hYTD6ntBrxgGRMwjhmKi3jOt5HAuzl9owr0OhVjLgxLj/jqWnmSFd+/skt+FOq3jn /vqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=pmi+jr3s; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e20si10295559edy.408.2021.10.11.07.53.03; Mon, 11 Oct 2021 07:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=pmi+jr3s; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B2EE68A87D; Mon, 11 Oct 2021 17:52:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 15BD468A8B4 for ; Mon, 11 Oct 2021 17:52:24 +0300 (EEST) Received: by mail-pj1-f45.google.com with SMTP id ns7-20020a17090b250700b001a0937b87b7so107997pjb.1 for ; Mon, 11 Oct 2021 07:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2VjOBmBPjZGgAQYvMvNhE7/BLYBMeXuB4w23Loj4JlY=; b=pmi+jr3s6ETwSyGD7mxhaF0iOl1Eyz74HgqIz4CoK+nkUfDB8UUHAaZ5FKSpeMcZWZ rlBLxGN6nmtZrUT7gxd1wcYKHry+UWFi7zjUR83Kx0/3BAEPWRRcXK8yDzLAwgznGHwP M2cMRcpy7O5YMHyHRycuyHt9hMp1NZN2dm1qNy0E4/+TstxgQsSSq6ZfHM6n6/xUddW9 TKe5KSc0oIrV0cxmFXJ/GT2BD+cwTB0kVu64Q7i7CMECLvtZV95Ismhba0h9nn2Ks6+E cUZTyNa18lJvPJoceXxXU7IE7RWyiB39rd/E3Wa6M+kKbZqEWk+pK9D6i0K4zszMMzke EvHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2VjOBmBPjZGgAQYvMvNhE7/BLYBMeXuB4w23Loj4JlY=; b=jgDNRBQg9zmwZ78O5PtXdfyMX4jTopt5ECsepuv922CxIINTQzwgHo1TMdc/Pjja4W ss+mPaPiaXbOxXTPYX/jI5ph351fFV1JILntN7IwQB2nspMTgPG2P/V7bCgKDqRVXk/2 dHticeoC/F3hOqgBMpN4OPWvh1mHO89RblY1gTw2tJWF38Hwdjx5YstJZTHwETt96Z1L cTHEOu8opXG6HHEGyZ6wX4KAidsH2gqF3ixCtCpesUZYFWpAeQayWIhrTTPwZp0qOQdS hH7NafjQL5ort7+sHAaWc5VCxdq9bm//ICjnptsE6+s+qervQI4ea2A8sEMC7GWReDXa MR/w== X-Gm-Message-State: AOAM533rYfBwpXNdqAwculvmal4yAYHhCc50Thl5anwwz3Hm6OV/WsWN rVCj0iphsV9LEsZfD2mYmFwSX/UwoIo= X-Received: by 2002:a17:90a:6a8f:: with SMTP id u15mr30554973pjj.212.1633963942256; Mon, 11 Oct 2021 07:52:22 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id q11sm8082287pjf.14.2021.10.11.07.52.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Oct 2021 07:52:21 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Oct 2021 22:52:01 +0800 Message-Id: <1633963925-13579-4-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633963925-13579-1-git-send-email-lance.lmwang@gmail.com> References: <1633963925-13579-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 4/8] avformat/mpegts: add support for stream_type 0xd4, which is AVS3 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: ZM5TwSdMFaEx From: Limin Wang GB/T 17975.1 Information technology-Generic coding of moving pictures and associated audio information-Part 1:Systems Signed-off-by: Limin Wang --- libavformat/mpegts.c | 1 + libavformat/mpegts.h | 1 + libavformat/mpegtsenc.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 9a6bbb1..d3a4e4e 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -807,6 +807,7 @@ static const StreamType ISO_types[] = { { 0x42, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_CAVS }, { 0xd1, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC }, { 0xd2, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_AVS2 }, + { 0xd4, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_AVS3 }, { 0xea, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 }, { 0 }, }; diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h index 910d65a..a48f14e 100644 --- a/libavformat/mpegts.h +++ b/libavformat/mpegts.h @@ -130,6 +130,7 @@ #define STREAM_TYPE_VIDEO_HEVC 0x24 #define STREAM_TYPE_VIDEO_CAVS 0x42 #define STREAM_TYPE_VIDEO_AVS2 0xd2 +#define STREAM_TYPE_VIDEO_AVS3 0xd4 #define STREAM_TYPE_VIDEO_VC1 0xea #define STREAM_TYPE_VIDEO_DIRAC 0xd1 diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index f3b7914..26fb1f1 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -369,6 +369,9 @@ static int get_dvb_stream_type(AVFormatContext *s, AVStream *st) case AV_CODEC_ID_AVS2: stream_type = STREAM_TYPE_VIDEO_AVS2; break; + case AV_CODEC_ID_AVS3: + stream_type = STREAM_TYPE_VIDEO_AVS3; + break; case AV_CODEC_ID_DIRAC: stream_type = STREAM_TYPE_VIDEO_DIRAC; break;