summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_common.cpp
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-08-09 08:23:18 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-08-16 10:00:39 +0800
commit13460af45621f2f01d3717cb93d6d09a60e63510 (patch)
treecba99eb8cf8e04c256f66252134b272c711efe9d /libavdevice/decklink_common.cpp
parent5f3df7afa6425d8c7d49340c91243d99336eb27e (diff)
avdevice/decklink: add level_a 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.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index a892a6c9b1..056946212f 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -230,6 +230,23 @@ int ff_decklink_set_configs(AVFormatContext *avctx,
}
}
+ if (direction == DIRECTION_OUT && cctx->level_a >= 0) {
+ DECKLINK_BOOL level_a_supported = false;
+
+ if (ctx->attr->GetFlag(BMDDeckLinkSupportsSMPTELevelAOutput, &level_a_supported) != S_OK)
+ level_a_supported = false;
+
+ if (level_a_supported) {
+ res = ctx->cfg->SetFlag(bmdDeckLinkConfigSMPTELevelAOutput, cctx->level_a);
+ if (res != S_OK)
+ av_log(avctx, AV_LOG_WARNING, "Setting SMPTE levelA failed.\n");
+ else
+ av_log(avctx, AV_LOG_VERBOSE, "Successfully set SMPTE levelA.\n");
+ } else {
+ av_log(avctx, AV_LOG_WARNING, "Unable to set SMPTE levelA mode, because it is not supported.\n");
+ }
+ }
+
return 0;
}