From patchwork Mon Oct 11 14:52:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31052 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp3775539ioa; Mon, 11 Oct 2021 07:53:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+Z1hb+uQatqv89JMENSqMKJfq3p4spr3EpLcQIth9hV/oMbLI/NQE78z1PRHUeLbds1UH X-Received: by 2002:a17:907:2658:: with SMTP id ar24mr26305672ejc.405.1633963991265; Mon, 11 Oct 2021 07:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633963991; cv=none; d=google.com; s=arc-20160816; b=GOTv1RMfvJy10Lu7eYNXShXuWUX9xMmDclTOtn+PAHR6I3sBPy6Y6jALqB3T5/G/nh NrOht8sStQxVwvvtZeKsxeyu3pjfzqcV15Vl4gbdUDiNAiYdo9Coi7KEtsQk4e4sH+7X 94ftO7Xy+ZmPDbx6kNNXd0F6SejlbhXQ4kiC3JBRr1WjpCVhx1wPfA7bTrw1sk9KbAkQ Tan1M4wvU8jrRqYtOcRlTVsaE03RHvvZpPFy6PdoyT5hHQgixLELnYf6PEt3a0aPeKQ+ XB8fhj/txsHiE5M/OQLDA7RnjwAxmOE0WD5mhsy93Mt8ZicENVRLQpoWo2VO4qJXG0cf /QLw== 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=zvnklc48ZYssT1mKrC/IdyOppzcY7oqsjeyhQNT1dvk=; b=O2Zz6X3OFTNbytQrD0F2iwPV8km+hJRqtgtvpKuiNhK85lTXe4Ag2z2SPrbxKQwJ1X gavk/Jdk16Iq+BNp+QHY0cmcmuoeaK0ESFcykvxSKyPp+YfKM1+LuHd6M56+WsIz03ns Dpo5E+kB4/P/kyvS4PNhhHzith1FCUrfAywbMEqo2gr78oZM0xU+MlMznjvUzG27WqhI k+wLQBUtlU8ILFl3rdpSKl0OeNN2KxrCxH8iCvIZzUOgpLDjgfTQQyRw5Xr/GiiA5DW9 QIsIA0WpXcbALE39Ythd5sX72RxESp/mWrorCCuQjGX2BRJXDlnMOlMQGYF7KqSsLZAO kkNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=bUZ4ot2m; 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 d21si11908411ejj.20.2021.10.11.07.52.53; Mon, 11 Oct 2021 07:53:11 -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=bUZ4ot2m; 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 5288368A8B4; Mon, 11 Oct 2021 17:52:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3153468A899 for ; Mon, 11 Oct 2021 17:52:23 +0300 (EEST) Received: by mail-pf1-f174.google.com with SMTP id h125so5068127pfe.0 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=KZmPy6cRipPswPTC+GIifRgUcsTYakOi2oOYdzZQr6E=; b=bUZ4ot2mGB/b5rZxKJ0VZaePZSixeyqa5yWOsyQSlYmK1HwskHWHpZD5pNQk8WVzod wUAxi0xFm+vrgm03Xg/nh8z9HwqjsbYzZpFmBd9MDUmO6de5sKKvPpqG4zsJHLSPfsoL a03LX0k3o2IhaJriqkYY6mtzz5MBAhrUgDMfdhDc6ZI0rGYXdLjbjAN/IM260fvfniQU 6Jj3JqlAyKTm9v35Esm6eGzy4UNnoNoujsOWVGXO5celnmbzH40N+z044PzSEVVsB3ji xHZUUKYc2QyuaN96EnJRgGJf9e9Ujzz/sUYfUMptvQdKKlKLiVFZ9M+zPLDDa+MY+grF /GwQ== 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=KZmPy6cRipPswPTC+GIifRgUcsTYakOi2oOYdzZQr6E=; b=zQvqFMkrgVRI9/D/J/SWoshDfUiZC1UZELAqn6kxWOwG/q79NPecqUjqACsAbrv71I syhF2thpiq05fLcL/5TjqCJ2LJsSWc/KKKHOtw7jFmOpYh76f3LGJMt0/nfCsZffrZwh M2+PuZXyTRZirTIoESplsbxJdvMNITOhV0fltQDsJnxc08y+M9dVNJXR/M8axMr/YdOp W7wVi+ZaN3HFLcfgNl4fGw7Z/GWkbInEo8MO9vxr1Fcar6tR/DqywsUczKC/RcmMdqym I2kQip9HxUy2gxJTS3v8iDDJagEUs2VqX5G/WV1oiMyzZGNd5gW6qk1dGvWfq6XE97od +BUQ== X-Gm-Message-State: AOAM532b7H8GQDIw+jy93qfoAD3h8FKSrW83nuXP9gs03geI65nik0Im jCPzVPa6D2n7vYgKEORujGgbHessluc= X-Received: by 2002:a05:6a00:248a:b0:44c:ecc5:a165 with SMTP id c10-20020a056a00248a00b0044cecc5a165mr15236773pfv.43.1633963940959; Mon, 11 Oct 2021 07:52:20 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id q11sm8082287pjf.14.2021.10.11.07.52.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Oct 2021 07:52:20 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Oct 2021 22:52:00 +0800 Message-Id: <1633963925-13579-3-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 3/8] avformat/mpegts: add support for stream_type 0xd2, which is AVS2 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: oPKWJaaO1Hkh 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.h | 1 + libavformat/mpegtsenc.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h index c75ba08..910d65a 100644 --- a/libavformat/mpegts.h +++ b/libavformat/mpegts.h @@ -129,6 +129,7 @@ #define STREAM_TYPE_VIDEO_H264 0x1b #define STREAM_TYPE_VIDEO_HEVC 0x24 #define STREAM_TYPE_VIDEO_CAVS 0x42 +#define STREAM_TYPE_VIDEO_AVS2 0xd2 #define STREAM_TYPE_VIDEO_VC1 0xea #define STREAM_TYPE_VIDEO_DIRAC 0xd1 diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 98dac17..f3b7914 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -366,6 +366,9 @@ static int get_dvb_stream_type(AVFormatContext *s, AVStream *st) case AV_CODEC_ID_CAVS: stream_type = STREAM_TYPE_VIDEO_CAVS; break; + case AV_CODEC_ID_AVS2: + stream_type = STREAM_TYPE_VIDEO_AVS2; + break; case AV_CODEC_ID_DIRAC: stream_type = STREAM_TYPE_VIDEO_DIRAC; break;