[FFmpeg-devel] [PATCH 4/4] avdevice/decklink_dec: add support for querying RP188 High Frame Rate timecode
Marton Balint
cus at passwd.hu
Tue Sep 8 20:52:32 EEST 2020
Signed-off-by: Marton Balint <cus at passwd.hu>
---
doc/indevs.texi | 4 ++--
libavdevice/decklink_common.h | 5 +++++
libavdevice/decklink_common_c.h | 2 ++
libavdevice/decklink_dec_c.c | 5 ++++-
4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/doc/indevs.texi b/doc/indevs.texi
index 7748232b26..3d554bc8d8 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -350,8 +350,8 @@ Defaults to @samp{unset}.
@item timecode_format
Timecode type to include in the frame and video stream metadata. Must be
@samp{none}, @samp{rp188vitc}, @samp{rp188vitc2}, @samp{rp188ltc},
- at samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}. Defaults to
- at samp{none} (not included).
+ at samp{rp188hfr}, @samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}.
+Defaults to @samp{none} (not included).
@item video_input
Sets the video input source. Must be @samp{unset}, @samp{sdi}, @samp{hdmi},
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 9f69054e64..f35bd9ae6f 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -191,6 +191,11 @@ static const BMDTimecodeFormat decklink_timecode_format_map[] = {
bmdTimecodeVITC,
bmdTimecodeVITCField2,
bmdTimecodeSerial,
+#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
+ bmdTimecodeRP188HighFrameRate,
+#else
+ (BMDTimecodeFormat)0,
+#endif
};
int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction);
diff --git a/libavdevice/decklink_common_c.h b/libavdevice/decklink_common_c.h
index a78262aaac..68978fa855 100644
--- a/libavdevice/decklink_common_c.h
+++ b/libavdevice/decklink_common_c.h
@@ -23,6 +23,8 @@
#ifndef AVDEVICE_DECKLINK_COMMON_C_H
#define AVDEVICE_DECKLINK_COMMON_C_H
+#include <DeckLinkAPIVersion.h>
+
typedef enum DecklinkPtsSource {
PTS_SRC_AUDIO = 1,
PTS_SRC_VIDEO = 2,
diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
index 54cd681710..f3fdcd339d 100644
--- a/libavdevice/decklink_dec_c.c
+++ b/libavdevice/decklink_dec_c.c
@@ -49,7 +49,7 @@ static const AVOption options[] = {
{ "unset", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "duplex_mode"},
{ "half", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "duplex_mode"},
{ "full", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, DEC, "duplex_mode"},
- { "timecode_format", "timecode format", OFFSET(tc_format), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 7, DEC, "tc_format"},
+ { "timecode_format", "timecode format", OFFSET(tc_format), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 8, DEC, "tc_format"},
{ "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "tc_format"},
{ "rp188vitc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "tc_format"},
{ "rp188vitc2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, DEC, "tc_format"},
@@ -58,6 +58,9 @@ static const AVOption options[] = {
{ "vitc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 5}, 0, 0, DEC, "tc_format"},
{ "vitc2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 6}, 0, 0, DEC, "tc_format"},
{ "serial", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 7}, 0, 0, DEC, "tc_format"},
+#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
+ { "rp188hfr", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 8}, 0, 0, DEC, "tc_format"},
+#endif
{ "video_input", "video input", OFFSET(video_input), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 6, DEC, "video_input"},
{ "unset", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "video_input"},
{ "sdi", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "video_input"},
--
2.26.2
More information about the ffmpeg-devel
mailing list