From patchwork Thu Sep 6 20:47:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 10263 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp889568jap; Thu, 6 Sep 2018 13:47:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYQg8C2bJe73GBHDUqFDkk7rxdwPH5e2Oiw2Jt8t+Ozxktc2rKZfgPfPwuAE7mMbTHJ5XyZ X-Received: by 2002:adf:b519:: with SMTP id a25-v6mr3886936wrd.273.1536266852182; Thu, 06 Sep 2018 13:47:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536266852; cv=none; d=google.com; s=arc-20160816; b=RWRYxymf9zG0gD91RYxUhoWUxdzDzPxDeQmvmPfZMV8cHgBVekB3nci99fQMArxsy1 zZvz6dPAmf9b7VkEkk5tTW6q7BbLumeLq5OYgreQqTJ2nVmPzgbvf0QP5PnxLNvjRH39 mCOdf8Rbn3ts5uWOCQakzUzMnYZdHRcsA8201bLZ3TtdBXps8HFW5xTpreq1npBFSqsz wAXZrR3P1vpoyI7/QsXl/CSp8u14wYAL/IIbg3C1Nm+b8PL/pm8Owc7sDHCPcfLaqeZ4 Oq7tJlqul9Tu159eVbCDCczXfE6F2BqZplSJ/fL3WK1Dq5dH5UyKGd7RudZeD0uMwL5c Y12Q== 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:message-id:date:to:from:delivered-to; bh=YcZBcw8dy6ZPkgERGNbDujlKfsmsyuJZIdGPdcCtAIY=; b=LPl63msPIY8tOTTLFoJ/HpcMQZSKIQs5ab1MiVegH1c46KWDPrA81Pb3/w0a56EnC2 8lzjogS3/2TaUhnHf9QZPwNTagWg5HzY/7t4ftJR0pt9dDLXESN5WsBS3EMQ0vYnJByw ejnJbRvq4aStrWSG80m2NCLK08VyWm2LAiKRRggmgfaM45n5CDLm8g9LFIdN4eGbpBLH anBBDcFnL7IlmIF78soao6KauuqiDGtXdD1RMOS6cNPKygYxBl3IbiyNGK2wJpC0sWzq nq9cTdTcmtfhPbjPgN+QimRK4wmSLe+Ujy4S1z8XQLA9CuGvwtHNkm5zlJtGfhABF20T mCMA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t1-v6si4804829wma.17.2018.09.06.13.47.31; Thu, 06 Sep 2018 13:47:32 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D845968A087; Thu, 6 Sep 2018 23:47:21 +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 A3963689CB7 for ; Thu, 6 Sep 2018 23:47:14 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 623B0E127F; Thu, 6 Sep 2018 22:47:22 +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 1SdIj-d-KC1b; Thu, 6 Sep 2018 22:47:20 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 6D02FE10C2; Thu, 6 Sep 2018 22:47:20 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Sep 2018 22:47:18 +0200 Message-Id: <20180906204718.28104-1-cus@passwd.hu> X-Mailer: git-send-email 2.16.4 Subject: [FFmpeg-devel] [PATCH] avdevice/decklink_enc: add support for setting duplex mode 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- doc/outdevs.texi | 4 ++++ libavdevice/decklink_enc.cpp | 1 + libavdevice/decklink_enc_c.c | 4 ++++ libavdevice/version.h | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/outdevs.texi b/doc/outdevs.texi index 30d376d793..34c508a970 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -150,6 +150,10 @@ Defaults to @option{false}. Amount of time to preroll video in seconds. Defaults to @option{0.5}. +@item duplex_mode +Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}. +Defaults to @samp{unset}. + @end table @subsection Examples diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index ee4c962add..de562bd22d 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -395,6 +395,7 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) ctx->list_devices = cctx->list_devices; ctx->list_formats = cctx->list_formats; ctx->preroll = cctx->preroll; + ctx->duplex_mode = cctx->duplex_mode; cctx->ctx = ctx; /* List available devices and exit. */ diff --git a/libavdevice/decklink_enc_c.c b/libavdevice/decklink_enc_c.c index 360535cfda..6169078159 100644 --- a/libavdevice/decklink_enc_c.c +++ b/libavdevice/decklink_enc_c.c @@ -31,6 +31,10 @@ static const AVOption options[] = { { "list_devices", "list available devices" , OFFSET(list_devices), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 1, ENC }, { "list_formats", "list supported formats" , OFFSET(list_formats), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 1, ENC }, { "preroll" , "video preroll in seconds", OFFSET(preroll ), AV_OPT_TYPE_DOUBLE, { .dbl = 0.5 }, 0, 5, ENC }, + { "duplex_mode" , "duplex mode" , OFFSET(duplex_mode ), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 2, ENC, "duplex_mode"}, + { "unset" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 0 }, 0, 0, ENC, "duplex_mode"}, + { "half" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 1 }, 0, 0, ENC, "duplex_mode"}, + { "full" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 2 }, 0, 0, ENC, "duplex_mode"}, { NULL }, }; diff --git a/libavdevice/version.h b/libavdevice/version.h index 9904149288..c10081461d 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -29,7 +29,7 @@ #define LIBAVDEVICE_VERSION_MAJOR 58 #define LIBAVDEVICE_VERSION_MINOR 4 -#define LIBAVDEVICE_VERSION_MICRO 101 +#define LIBAVDEVICE_VERSION_MICRO 102 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ LIBAVDEVICE_VERSION_MINOR, \