]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/decklink_dec: add support for querying RP188 High Frame Rate timecode
authorMarton Balint <cus@passwd.hu>
Sat, 5 Sep 2020 19:18:17 +0000 (21:18 +0200)
committerMarton Balint <cus@passwd.hu>
Sun, 13 Sep 2020 16:06:54 +0000 (18:06 +0200)
Signed-off-by: Marton Balint <cus@passwd.hu>
doc/indevs.texi
libavdevice/decklink_common.h
libavdevice/decklink_common_c.h
libavdevice/decklink_dec_c.c
libavdevice/version.h

index 7748232b26c38adc8225d6a9fa22b60043b7e7ae..3d554bc8d8ef41c0a5eb0860071ccab391316e9c 100644 (file)
@@ -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},
-@samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}. Defaults to
-@samp{none} (not included).
+@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},
index 9f69054e64628de1599cea67c4e1672a7cc58c46..f35bd9ae6ff1a6b1933b6863ac59236b5a8ef4bc 100644 (file)
@@ -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);
index a78262aaac01229d95d1d28f546b180f682370ac..68978fa8558532f8bff46f85032769df5e081872 100644 (file)
@@ -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,
index 54cd681710cc5b1d2c942afb52382e597470da9a..f3fdcd339d3943f241cca81ed2da5db4cd540b24 100644 (file)
@@ -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"},
index 8ca715b8b4d1fe72eff04ad90dd3cb8513026a26..e3aca9e3d2d91cf94151e59a232704c4123e56d3 100644 (file)
@@ -29,7 +29,7 @@
 
 #define LIBAVDEVICE_VERSION_MAJOR  58
 #define LIBAVDEVICE_VERSION_MINOR  11
-#define LIBAVDEVICE_VERSION_MICRO 101
+#define LIBAVDEVICE_VERSION_MICRO 102
 
 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
                                                LIBAVDEVICE_VERSION_MINOR, \