diff options
author | Marton Balint <cus@passwd.hu> | 2020-02-21 22:30:16 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-02-26 21:32:56 +0100 |
commit | f32f9231dd4f74d9f95eef575b838bdc3e06a234 (patch) | |
tree | 369ff5a00d065a1b4339ff9fde277b3b9a7587e7 /libavdevice/decklink_common.cpp | |
parent | 95324ecf235a467f6804019e250e59bca576922a (diff) | |
download | ffmpeg-f32f9231dd4f74d9f95eef575b838bdc3e06a234.tar.gz |
avdevice/decklink: add support for SDK version 11.5
Fixes ticket #8534.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_common.cpp')
-rw-r--r-- | libavdevice/decklink_common.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 04c0f99edc..53b57ffe4e 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -269,7 +269,22 @@ int ff_decklink_set_format(AVFormatContext *avctx, if (ctx->bmd_mode == bmdModeUnknown) return -1; -#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 +#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b050000 + if (direction == DIRECTION_IN) { + BMDDisplayMode actualMode = ctx->bmd_mode; + if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format, + bmdNoVideoInputConversion, bmdSupportedVideoModeDefault, + &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode) + return -1; + } else { + BMDDisplayMode actualMode = ctx->bmd_mode; + if (ctx->dlo->DoesSupportVideoMode(bmdVideoConnectionUnspecified, ctx->bmd_mode, ctx->raw_format, + bmdNoVideoOutputConversion, bmdSupportedVideoModeDefault, + &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode) + return -1; + } + return 0; +#elif BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 if (direction == DIRECTION_IN) { if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format, bmdSupportedVideoModeDefault, |