summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_common.cpp
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-08-09 07:43:34 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-08-16 10:00:39 +0800
commitb923bfc679358fe109ca66b6ddf9d08ad0e19b7e (patch)
tree95b84ce53f03e63a8897ab95231eb38c16a5aa13 /libavdevice/decklink_common.cpp
parentca788d184cbf0a907ca7db4e4dad9975a91a5839 (diff)
avdevice/decklink: add link configuration option
Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavdevice/decklink_common.cpp')
-rw-r--r--libavdevice/decklink_common.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 24aa9b1d13..4e0df04915 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -214,6 +214,15 @@ int ff_decklink_set_configs(AVFormatContext *avctx,
if (res != S_OK)
av_log(avctx, AV_LOG_WARNING, "Setting timing offset failed.\n");
}
+
+ if (direction == DIRECTION_OUT && ctx->link > 0) {
+ res = ctx->cfg->SetInt(bmdDeckLinkConfigSDIOutputLinkConfiguration, ctx->link);
+ if (res != S_OK)
+ av_log(avctx, AV_LOG_WARNING, "Setting link configuration failed.\n");
+ else
+ av_log(avctx, AV_LOG_VERBOSE, "Successfully set link configuration: 0x%x.\n", ctx->link);
+ }
+
return 0;
}