]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/decklink_enc: add support for setting duplex mode
authorMarton Balint <cus@passwd.hu>
Thu, 6 Sep 2018 20:46:18 +0000 (22:46 +0200)
committerMarton Balint <cus@passwd.hu>
Sun, 9 Sep 2018 19:21:42 +0000 (21:21 +0200)
Signed-off-by: Marton Balint <cus@passwd.hu>
doc/outdevs.texi
libavdevice/decklink_enc.cpp
libavdevice/decklink_enc_c.c
libavdevice/version.h

index 30d376d793afb1f6e948c18e4d4313303ebf417b..34c508a9700c5b6287b9450e9563f46b38af67e6 100644 (file)
@@ -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
index ee4c962add795914b612d1738626384987f84b1e..de562bd22d74ca729ef5311511b26802505a671b 100644 (file)
@@ -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. */
index 360535cfdaaf11e88395044ceb09558f1201a90e..6169078159c57c50afec5d5bd1fcc5b19fd81ece 100644 (file)
@@ -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 },
 };
 
index 99041492887b6efe93c4c5ddafe31f719f114b1a..c10081461d9d2d8beb4fd32651b7063ab00a61af 100644 (file)
@@ -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, \