From patchwork Tue Sep 8 17:52:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 22173 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 09F4C44BD32 for ; Tue, 8 Sep 2020 20:52:49 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E35DF68B655; Tue, 8 Sep 2020 20:52:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5889B68B649 for ; Tue, 8 Sep 2020 20:52:41 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 42EE0E4458; Tue, 8 Sep 2020 19:52:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7-N9RqLCilIe; Tue, 8 Sep 2020 19:52:39 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 01185E4430; Tue, 8 Sep 2020 19:52:38 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 8 Sep 2020 19:52:32 +0200 Message-Id: <20200908175232.5733-4-cus@passwd.hu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908175232.5733-1-cus@passwd.hu> References: <20200908175232.5733-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] avdevice/decklink_dec: add support for querying RP188 High Frame Rate 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: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- doc/indevs.texi | 4 ++-- libavdevice/decklink_common.h | 5 +++++ libavdevice/decklink_common_c.h | 2 ++ libavdevice/decklink_dec_c.c | 5 ++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index 7748232b26..3d554bc8d8 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -350,8 +350,8 @@ Defaults to @samp{unset}. @item timecode_format Timecode type to include in the frame and video stream metadata. Must be @samp{none}, @samp{rp188vitc}, @samp{rp188vitc2}, @samp{rp188ltc}, -@samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}. Defaults to -@samp{none} (not included). +@samp{rp188hfr}, @samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}. +Defaults to @samp{none} (not included). @item video_input Sets the video input source. Must be @samp{unset}, @samp{sdi}, @samp{hdmi}, diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index 9f69054e64..f35bd9ae6f 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -191,6 +191,11 @@ static const BMDTimecodeFormat decklink_timecode_format_map[] = { bmdTimecodeVITC, bmdTimecodeVITCField2, bmdTimecodeSerial, +#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 + bmdTimecodeRP188HighFrameRate, +#else + (BMDTimecodeFormat)0, +#endif }; int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction); diff --git a/libavdevice/decklink_common_c.h b/libavdevice/decklink_common_c.h index a78262aaac..68978fa855 100644 --- a/libavdevice/decklink_common_c.h +++ b/libavdevice/decklink_common_c.h @@ -23,6 +23,8 @@ #ifndef AVDEVICE_DECKLINK_COMMON_C_H #define AVDEVICE_DECKLINK_COMMON_C_H +#include + typedef enum DecklinkPtsSource { PTS_SRC_AUDIO = 1, PTS_SRC_VIDEO = 2, diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c index 54cd681710..f3fdcd339d 100644 --- a/libavdevice/decklink_dec_c.c +++ b/libavdevice/decklink_dec_c.c @@ -49,7 +49,7 @@ static const AVOption options[] = { { "unset", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "duplex_mode"}, { "half", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "duplex_mode"}, { "full", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, DEC, "duplex_mode"}, - { "timecode_format", "timecode format", OFFSET(tc_format), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 7, DEC, "tc_format"}, + { "timecode_format", "timecode format", OFFSET(tc_format), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 8, DEC, "tc_format"}, { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "tc_format"}, { "rp188vitc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "tc_format"}, { "rp188vitc2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, DEC, "tc_format"}, @@ -58,6 +58,9 @@ static const AVOption options[] = { { "vitc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 5}, 0, 0, DEC, "tc_format"}, { "vitc2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 6}, 0, 0, DEC, "tc_format"}, { "serial", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 7}, 0, 0, DEC, "tc_format"}, +#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 + { "rp188hfr", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 8}, 0, 0, DEC, "tc_format"}, +#endif { "video_input", "video input", OFFSET(video_input), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 6, DEC, "video_input"}, { "unset", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "video_input"}, { "sdi", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "video_input"},