From patchwork Tue Jul 14 23:29:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21021 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 8C4DB44BBA3 for ; Wed, 15 Jul 2020 02:30:24 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 51F6E68A964; Wed, 15 Jul 2020 02:30:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 94B5568096E for ; Wed, 15 Jul 2020 02:30:17 +0300 (EEST) Received: by mail-pg1-f171.google.com with SMTP id l63so100619pge.12 for ; Tue, 14 Jul 2020 16:30:17 -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; bh=4sX6II+E84rMNDEU7qEihAaa6pZkBT5UuoKa7179gOE=; b=uWGtsUaq6VRoIN8Y4f9j9m8+Cj2OajfEewzyhu/4zN0LnfFmaoEI6CwADOjtjryNBB ocmLEJPXoDwkJtylD9fbZCA8DXSulhLZGH+xr/CI9f2O/YTI57stypvOP9K0DE7S4nRn g072UaeU0kApZdBlD026R1N8GEU/JthemjcCa0aK18adxY8zzAf1/v2NyS0j4qFlZbw8 P+Fpq4jsyh9MaDNj+ahYgj31Xukjro/6h4OnTrLOV14vd6blkWeNBVsRJ6h6GdR5ltS6 Ygp/hMtQFSB1+lCWfZEC20BV/LQeQIsLAvsbfNyqVkPvHHjBytDBkfrkWE+pX9MXE6HK YrZg== 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; bh=4sX6II+E84rMNDEU7qEihAaa6pZkBT5UuoKa7179gOE=; b=Kng7RJUVBbtQtY8jCSrqMumvHk5e7s6k7mAwEVZwhxmKyXIUCYja+AKEmSX3NDVwWC WWHIGQYAiXakK1ewdtDqj3bgMbvmsPehxrdvf+Usz/kdbDPQSOwBhShY+OzJGLsZAqhp EhVweUT2eAatzYOUpGhgq37XscpU5J+2HvM43QeUHqKurw9mYoGTMbX0a9tsrpquQspT 7pB99u4drGTAEflsRohXDAGuhKgKvy5UwwmVJSFIdazerxHPNPOTjwz1ui3HAawMdssg k1QK++M6GuxZaYrb1oHTLtd6yIxl6hI/1ahvhNRNIlpG4ogJqE0IDCL2fjfDa/j4BPEX DBpA== X-Gm-Message-State: AOAM530tYTLsUKgz1P4O0/dOE+g2GTvSSavHSqOIoQrDS8bDJ1wmsJ4G BRD7YJBvmWxTQUU9YBb/j5142Aws X-Google-Smtp-Source: ABdhPJwr7hZ1Uk0UactVKhNu16lFUVaTlmK2sKbLC3iSdN5kELxfNRXAnLNs5bfhq2T6GH47UFb3OQ== X-Received: by 2002:a63:7c42:: with SMTP id l2mr5460125pgn.35.1594769415214; Tue, 14 Jul 2020 16:30:15 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id y198sm212954pfg.116.2020.07.14.16.30.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jul 2020 16:30:14 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 15 Jul 2020 07:29:57 +0800 Message-Id: <1594769402-22526-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH 1/6] avcodec: add AV_CODEC_EXPORT_DATA_S12M_TC flag to export S12M timecode 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 --- doc/APIchanges | 3 +++ doc/codecs.texi | 3 +++ libavcodec/avcodec.h | 4 ++++ libavcodec/options_table.h | 1 + libavcodec/version.h | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 67f2ac3..2811ee7 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2020-07-xx - xxxxxxxxxx - lavc 58.97.100 - avcodec.h + Add AV_CODEC_EXPORT_DATA_S12M_TC. + 2020-07-xx - xxxxxxxxxx - lavc 58.96.100 - packet.h Add AV_PKT_DATA_S12M_TIMECODE. diff --git a/doc/codecs.texi b/doc/codecs.texi index c092aad..263da9c 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -816,6 +816,9 @@ for codecs that support it. See also @file{doc/examples/export_mvs.c}. @item prft Export encoder Producer Reference Time into packet side-data (see @code{AV_PKT_DATA_PRFT}) for codecs that support it. +@item s12m_tc +Export SMPTE ST 12-1 timecode through packet side data (see @code{AV_PKT_DATA_S12M_TIMECODE}) +for codecs that support it. @end table @item error @var{integer} (@emph{encoding,video}) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c91b2fd..f8420c0 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -410,6 +410,10 @@ typedef struct RcOverride{ * Export the AVVideoEncParams structure through frame side data. */ #define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2) +/** + * Export SMPTE ST 12-1 timecode through packet side data + */ +#define AV_CODEC_EXPORT_DATA_S12M_TC (1 << 3) /** * Pan Scan area. diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 8ba137f..dcedfbb 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -83,6 +83,7 @@ static const AVOption avcodec_options[] = { {"mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_MVS}, INT_MIN, INT_MAX, V|D, "export_side_data"}, {"prft", "export Producer Reference Time through packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_PRFT}, INT_MIN, INT_MAX, A|V|S|E, "export_side_data"}, {"venc_params", "export video encoding parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS}, INT_MIN, INT_MAX, V|D, "export_side_data"}, +{"s12m_tc", "export SMPTE ST 12-1 timecode through packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_S12M_TC}, INT_MIN, INT_MAX, V|D, "export_side_data"}, {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX}, {"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, diff --git a/libavcodec/version.h b/libavcodec/version.h index ad0bfd6..d5dca8c 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,7 +28,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 58 -#define LIBAVCODEC_VERSION_MINOR 96 +#define LIBAVCODEC_VERSION_MINOR 97 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \