diff options
author | Devin Heitmueller <dheitmueller@ltnglobal.com> | 2018-09-07 15:40:25 -0400 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2018-09-09 22:42:26 +0200 |
commit | 8732dfa99549b8e233b50956cb27031e18806685 (patch) | |
tree | c560d907570eff24f15c4f152101c4e10ad4ccfb /libavdevice/decklink_common.cpp | |
parent | 6a9abe9ec333638b7818dac8ab60d006d5533c4a (diff) | |
download | ffmpeg-8732dfa99549b8e233b50956cb27031e18806685.tar.gz |
avdevice/decklink: Add support for EIA-708 output over SDI
Hook in libklvanc and use it for output of EIA-708 captions over
SDI. The bulk of this patch is just general support for ancillary
data for the Decklink SDI module - the real work for construction
of the EIA-708 CDP and VANC line construction is done by libklvanc.
Libklvanc can be found at: https://github.com/stoth68000/libklvanc
Updated to reflect feedback from Marton Balint <cus@passwd.hu>,
Carl Eugen Hoyos <ceffmpeg@gmail.com>, Aaron Levinson
<alevinsn_dev@levland.net>, and Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_common.cpp')
-rw-r--r-- | libavdevice/decklink_common.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index aab9d85b94..503417bb35 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -239,10 +239,18 @@ int ff_decklink_set_format(AVFormatContext *avctx, &support, NULL) != S_OK) return -1; } else { - if (ctx->dlo->DoesSupportVideoMode(ctx->bmd_mode, bmdFormat8BitYUV, - bmdVideoOutputFlagDefault, - &support, NULL) != S_OK) - return -1; + if (!ctx->supports_vanc || ctx->dlo->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format, + bmdVideoOutputVANC, + &support, NULL) != S_OK) { + /* Try without VANC enabled */ + if (ctx->dlo->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format, + bmdVideoOutputFlagDefault, + &support, NULL) != S_OK) { + return -1; + } + ctx->supports_vanc = 0; + } + } if (support == bmdDisplayModeSupported) return 0; |