From b923bfc679358fe109ca66b6ddf9d08ad0e19b7e Mon Sep 17 00:00:00 2001 From: Limin Wang Date: Mon, 9 Aug 2021 07:43:34 +0800 Subject: avdevice/decklink: add link configuration option Reviewed-by: Marton Balint Signed-off-by: Limin Wang --- libavdevice/decklink_common.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libavdevice/decklink_common.cpp') 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; } -- cgit v1.2.3