Unified · Split
| @@ -344,9 +344,23 @@ Defines number of audio channels to capture. Must be @samp{2}, @samp{8} or @samp · 343 unmodified lines | |||
| 344 | Defaults to @samp{2}. | 344 | Defaults to @samp{2}. |
| 345 | 345 | ||
| 346 | @item duplex_mode | 346 | @item duplex_mode |
| 347 | Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}. | 347 | Sets the decklink device duplex/profile mode. Must be @samp{unset}, @samp{half}, @samp{full}, |
| 348 | @samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full}, | ||
| 349 | @samp{four_sub_device_half} | ||
| 348 | Defaults to @samp{unset}. | 350 | Defaults to @samp{unset}. |
| 349 | 351 | ||
| 352 | Note: DeckLink SDK 11.0 have replaced the duplex property by a profile property. | ||
| 353 | For the DeckLink Duo 2 and DeckLink Quad 2, a profile is shared between any 2 | ||
| 354 | sub-devices that utilize the same connectors. For the DeckLink 8K Pro, a profile | ||
| 355 | is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles. | ||
| 356 | |||
| 357 | Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0): | ||
| 358 | @samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full}, | ||
| 359 | @samp{four_sub_device_half} | ||
| 360 | |||
| 361 | Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: | ||
| 362 | @samp{half}, @samp{full} | ||
| 363 | |||
| 350 | @item timecode_format | 364 | @item timecode_format |
| 351 | Timecode type to include in the frame and video stream metadata. Must be | 365 | Timecode type to include in the frame and video stream metadata. Must be |
| 352 | @samp{none}, @samp{rp188vitc}, @samp{rp188vitc2}, @samp{rp188ltc}, | 366 | @samp{none}, @samp{rp188vitc}, @samp{rp188vitc2}, @samp{rp188ltc}, |
| @@ -198,9 +198,23 @@ Amount of time to preroll video in seconds. · 197 unmodified lines | |||
| 198 | Defaults to @option{0.5}. | 198 | Defaults to @option{0.5}. |
| 199 | 199 | ||
| 200 | @item duplex_mode | 200 | @item duplex_mode |
| 201 | Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}. | 201 | Sets the decklink device duplex/profile mode. Must be @samp{unset}, @samp{half}, @samp{full}, |
| 202 | @samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full}, | ||
| 203 | @samp{four_sub_device_half} | ||
| 202 | Defaults to @samp{unset}. | 204 | Defaults to @samp{unset}. |
| 203 | 205 | ||
| 206 | Note: DeckLink SDK 11.0 have replaced the duplex property by a profile property. | ||
| 207 | For the DeckLink Duo 2 and DeckLink Quad 2, a profile is shared between any 2 | ||
| 208 | sub-devices that utilize the same connectors. For the DeckLink 8K Pro, a profile | ||
| 209 | is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles. | ||
| 210 | |||
| 211 | Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0): | ||
| 212 | @samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full}, | ||
| 213 | @samp{four_sub_device_half} | ||
| 214 | |||
| 215 | Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: | ||
| 216 | @samp{half}, @samp{full} | ||
| 217 | |||
| 204 | @item timing_offset | 218 | @item timing_offset |
| 205 | Sets the genlock timing pixel offset on the used output. | 219 | Sets the genlock timing pixel offset on the used output. |
| 206 | Defaults to @samp{unset}. | 220 | Defaults to @samp{unset}. |
| @@ -182,7 +182,11 @@ int ff_decklink_set_configs(AVFormatContext *avctx, · 181 unmodified lines | |||
| 182 | if (duplex_supported) { | 182 | if (duplex_supported) { |
| 183 | #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 | 183 | #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 |
| 184 | IDeckLinkProfile *profile = NULL; | 184 | IDeckLinkProfile *profile = NULL; |
| 185 | BMDProfileID bmd_profile_id = ctx->duplex_mode == 2 ? bmdProfileOneSubDeviceFullDuplex : bmdProfileTwoSubDevicesHalfDuplex; | 185 | BMDProfileID bmd_profile_id; |
| 186 | |||
| 187 | if (ctx->duplex_mode < 0 || ctx->duplex_mode >= FF_ARRAY_ELEMS(decklink_profile_id_map)) | ||
| 188 | return EINVAL; | ||
| 189 | bmd_profile_id = decklink_profile_id_map[ctx->duplex_mode]; | ||
| 186 | res = manager->GetProfile(bmd_profile_id, &profile); | 190 | res = manager->GetProfile(bmd_profile_id, &profile); |
| 187 | if (res == S_OK) { | 191 | if (res == S_OK) { |
| 188 | res = profile->SetActive(); | 192 | res = profile->SetActive(); |
| @@ -195,7 +199,7 @@ int ff_decklink_set_configs(AVFormatContext *avctx, · 6 unmodified lines | |||
| 195 | if (res != S_OK) | 199 | if (res != S_OK) |
| 196 | av_log(avctx, AV_LOG_WARNING, "Setting duplex mode failed.\n"); | 200 | av_log(avctx, AV_LOG_WARNING, "Setting duplex mode failed.\n"); |
| 197 | else | 201 | else |
| 198 | av_log(avctx, AV_LOG_VERBOSE, "Successfully set duplex mode to %s duplex.\n", ctx->duplex_mode == 2 ? "full" : "half"); | 202 | av_log(avctx, AV_LOG_VERBOSE, "Successfully set duplex mode to %s duplex.\n", ctx->duplex_mode == 2 || ctx->duplex_mode == 4 ? "full" : "half"); |
| 199 | } else { | 203 | } else { |
| 200 | av_log(avctx, AV_LOG_WARNING, "Unable to set duplex mode, because it is not supported.\n"); | 204 | av_log(avctx, AV_LOG_WARNING, "Unable to set duplex mode, because it is not supported.\n"); |
| 201 | } | 205 | } |
| @@ -208,6 +208,17 @@ static const BMDLinkConfiguration decklink_link_conf_map[] = { · 207 unmodified lines | |||
| 208 | bmdLinkConfigurationQuadLink | 208 | bmdLinkConfigurationQuadLink |
| 209 | }; | 209 | }; |
| 210 | 210 | ||
| 211 | #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 | ||
| 212 | static const BMDProfileID decklink_profile_id_map[] = { | ||
| 213 | (BMDProfileID)0, | ||
| 214 | bmdProfileTwoSubDevicesHalfDuplex, | ||
| 215 | bmdProfileOneSubDeviceFullDuplex, | ||
| 216 | bmdProfileOneSubDeviceHalfDuplex, | ||
| 217 | bmdProfileTwoSubDevicesFullDuplex, | ||
| 218 | bmdProfileFourSubDevicesHalfDuplex, | ||
| 219 | }; | ||
| 220 | #endif | ||
| 221 | |||
| 211 | int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction); | 222 | int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction); |
| 212 | int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb_num, int tb_den, enum AVFieldOrder field_order, decklink_direction_t direction = DIRECTION_OUT); | 223 | int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb_num, int tb_den, enum AVFieldOrder field_order, decklink_direction_t direction = DIRECTION_OUT); |
| 213 | int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction); | 224 | int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction); |
| @@ -45,10 +45,20 @@ static const AVOption options[] = { · 44 unmodified lines | |||
| 45 | { "standard", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0x7fff9fffeLL}, 0, 0, DEC, "teletext_lines"}, | 45 | { "standard", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0x7fff9fffeLL}, 0, 0, DEC, "teletext_lines"}, |
| 46 | { "all", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0x7ffffffffLL}, 0, 0, DEC, "teletext_lines"}, | 46 | { "all", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0x7ffffffffLL}, 0, 0, DEC, "teletext_lines"}, |
| 47 | { "channels", "number of audio channels", OFFSET(audio_channels), AV_OPT_TYPE_INT , { .i64 = 2 }, 2, 16, DEC }, | 47 | { "channels", "number of audio channels", OFFSET(audio_channels), AV_OPT_TYPE_INT , { .i64 = 2 }, 2, 16, DEC }, |
| 48 | #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 | ||
| 49 | { "duplex_mode", "duplex mode", OFFSET(duplex_mode), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 5, DEC, "duplex_mode"}, | ||
| 50 | #else | ||
| 48 | { "duplex_mode", "duplex mode", OFFSET(duplex_mode), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, DEC, "duplex_mode"}, | 51 | { "duplex_mode", "duplex mode", OFFSET(duplex_mode), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, DEC, "duplex_mode"}, |
| 52 | #endif | ||
| 49 | { "unset", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "duplex_mode"}, | 53 | { "unset", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "duplex_mode"}, |
| 50 | { "half", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "duplex_mode"}, | 54 | { "half", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "duplex_mode"}, |
| 51 | { "full", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, DEC, "duplex_mode"}, | 55 | { "full", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, DEC, "duplex_mode"}, |
| 56 | #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 | ||
| 57 | { "one_sub_device_full", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, DEC, "duplex_mode"}, | ||
| 58 | { "one_sub_device_half", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 3}, 0, 0, DEC, "duplex_mode"}, | ||
| 59 | { "two_sub_device_full", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 4}, 0, 0, DEC, "duplex_mode"}, | ||
| 60 | { "four_sub_device_half", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 5}, 0, 0, DEC, "duplex_mode"}, | ||
| 61 | #endif | ||
| 52 | { "timecode_format", "timecode format", OFFSET(tc_format), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 8, DEC, "tc_format"}, | 62 | { "timecode_format", "timecode format", OFFSET(tc_format), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 8, DEC, "tc_format"}, |
| 53 | { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "tc_format"}, | 63 | { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0}, 0, 0, DEC, "tc_format"}, |
| 54 | { "rp188vitc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "tc_format"}, | 64 | { "rp188vitc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1}, 0, 0, DEC, "tc_format"}, |
| @@ -31,10 +31,20 @@ static const AVOption options[] = { · 30 unmodified lines | |||
| 31 | { "list_devices", "use ffmpeg -sinks decklink instead", OFFSET(list_devices), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED}, | 31 | { "list_devices", "use ffmpeg -sinks decklink instead", OFFSET(list_devices), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED}, |
| 32 | { "list_formats", "list supported formats" , OFFSET(list_formats), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 1, ENC }, | 32 | { "list_formats", "list supported formats" , OFFSET(list_formats), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 1, ENC }, |
| 33 | { "preroll" , "video preroll in seconds", OFFSET(preroll ), AV_OPT_TYPE_DOUBLE, { .dbl = 0.5 }, 0, 5, ENC }, | 33 | { "preroll" , "video preroll in seconds", OFFSET(preroll ), AV_OPT_TYPE_DOUBLE, { .dbl = 0.5 }, 0, 5, ENC }, |
| 34 | #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 | ||
| 35 | { "duplex_mode" , "duplex mode" , OFFSET(duplex_mode ), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 5, ENC, "duplex_mode"}, | ||
| 36 | #else | ||
| 34 | { "duplex_mode" , "duplex mode" , OFFSET(duplex_mode ), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 2, ENC, "duplex_mode"}, | 37 | { "duplex_mode" , "duplex mode" , OFFSET(duplex_mode ), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 2, ENC, "duplex_mode"}, |
| 38 | #endif | ||
| 35 | { "unset" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 0 }, 0, 0, ENC, "duplex_mode"}, | 39 | { "unset" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 0 }, 0, 0, ENC, "duplex_mode"}, |
| 36 | { "half" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 1 }, 0, 0, ENC, "duplex_mode"}, | 40 | { "half" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 1 }, 0, 0, ENC, "duplex_mode"}, |
| 37 | { "full" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 2 }, 0, 0, ENC, "duplex_mode"}, | 41 | { "full" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 2 }, 0, 0, ENC, "duplex_mode"}, |
| 42 | #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 | ||
| 43 | { "one_sub_device_full", NULL ,0 , AV_OPT_TYPE_CONST , { .i64 = 2 }, 0, 0, ENC, "duplex_mode"}, | ||
| 44 | { "one_sub_device_half", NULL ,0 , AV_OPT_TYPE_CONST , { .i64 = 3 }, 0, 0, ENC, "duplex_mode"}, | ||
| 45 | { "two_sub_device_full", NULL ,0 , AV_OPT_TYPE_CONST , { .i64 = 4 }, 0, 0, ENC, "duplex_mode"}, | ||
| 46 | { "four_sub_device_half", NULL ,0 , AV_OPT_TYPE_CONST , { .i64 = 5 }, 0, 0, ENC, "duplex_mode"}, | ||
| 47 | #endif | ||
| 38 | { "link" , "single/dual/quad SDI link configuration", OFFSET(link), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, ENC, "link"}, | 48 | { "link" , "single/dual/quad SDI link configuration", OFFSET(link), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, ENC, "link"}, |
| 39 | { "unset" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 0 }, 0, 0, ENC, "link"}, | 49 | { "unset" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 0 }, 0, 0, ENC, "link"}, |
| 40 | { "single" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 1 }, 0, 0, ENC, "link"}, | 50 | { "single" , NULL , 0 , AV_OPT_TYPE_CONST , { .i64 = 1 }, 0, 0, ENC, "link"}, |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | |||
| 29 | 29 | ||
| 30 | #define LIBAVDEVICE_VERSION_MAJOR 59 | 30 | #define LIBAVDEVICE_VERSION_MAJOR 59 |
| 31 | #define LIBAVDEVICE_VERSION_MINOR 0 | 31 | #define LIBAVDEVICE_VERSION_MINOR 0 |
| 32 | #define LIBAVDEVICE_VERSION_MICRO 100 | 32 | #define LIBAVDEVICE_VERSION_MICRO 101 |
| 33 | 33 | ||
| 34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ | 34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ |
| 35 | LIBAVDEVICE_VERSION_MINOR, \ | 35 | LIBAVDEVICE_VERSION_MINOR, \ |