1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avdevice/decklink: add support for SDK version 11.5

Fixes ticket #8534.

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2020-02-21 22:30:16 +01:00
parent 95324ecf23
commit f32f9231dd

View File

@ -269,7 +269,22 @@ int ff_decklink_set_format(AVFormatContext *avctx,
if (ctx->bmd_mode == bmdModeUnknown) if (ctx->bmd_mode == bmdModeUnknown)
return -1; 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 (direction == DIRECTION_IN) {
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format, if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
bmdSupportedVideoModeDefault, bmdSupportedVideoModeDefault,