From c11db7e49ffcd88d41d3d14f0cfc6940ffb5e6ad Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 1 Apr 2022 13:09:00 +0200 Subject: [PATCH] DeckLink cap.: deprecated link The option actually sets output, not input link configuration. Do not set anything by default but leave it as an option for now. --- src/video_capture/decklink.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/video_capture/decklink.cpp b/src/video_capture/decklink.cpp index 74ca43693..9dac1550e 100644 --- a/src/video_capture/decklink.cpp +++ b/src/video_capture/decklink.cpp @@ -188,7 +188,7 @@ struct vidcap_decklink_state { int use1080psf = BMD_OPT_KEEP; // capture PsF instead of progressive uint32_t profile{}; // BMD_OPT_DEFAULT, BMD_OPT_KEEP, bmdDuplexHalf or one of BMDProfileID - uint32_t link = 0; + uint32_t link = 0; /// @deprecated TOREMOVE? It sets output link configuration, not input thus it should not be used here. bool nosig_send = false; ///< send video even when no signal detected }; @@ -1210,11 +1210,10 @@ vidcap_decklink_init(struct vidcap_params *params, void **state) BMDVideoInputConversionMode supported_conversion_mode = s->conversion_mode ? s->conversion_mode : (BMDVideoInputConversionMode) bmdNoVideoInputConversion; BMD_CONFIG_SET_INT(bmdDeckLinkConfigCapturePassThroughMode, s->passthrough); - if (s->link == 0) { - LOG(LOG_LEVEL_NOTICE) << MOD_NAME "Setting single link by default.\n"; - s->link = bmdLinkConfigurationSingleLink; + if (s->link != 0) { + LOG(LOG_LEVEL_WARNING) << MOD_NAME << "Setting output link configuration on capture is deprecated and will be removed in future, let us know if this is needed!\n"; + CALL_AND_CHECK( deckLinkConfiguration->SetInt(bmdDeckLinkConfigSDIOutputLinkConfiguration, s->link), "Unable set output SDI link mode"); } - CALL_AND_CHECK( deckLinkConfiguration->SetInt(bmdDeckLinkConfigSDIOutputLinkConfiguration, s->link), "Unable set output SDI link mode"); if (s->use1080psf != BMD_OPT_KEEP) { CALL_AND_CHECK(deckLinkConfiguration->SetFlag(bmdDeckLinkConfigCapture1080pAsPsF, s->use1080psf != 0), "Unable to set output as PsF"); }