diff --git a/plugins/decklink/const.h b/plugins/decklink/const.h index 7c4afaeac27a56..65a711be81c50f 100644 --- a/plugins/decklink/const.h +++ b/plugins/decklink/const.h @@ -14,6 +14,7 @@ #define KEYER "keyer" #define SWAP "swap" #define ALLOW_10_BIT "allow_10_bit" +#define ASYNC_COMPENSATION "async_compensation" #define TEXT_DEVICE obs_module_text("Device") #define TEXT_VIDEO_CONNECTION obs_module_text("VideoConnection") @@ -57,3 +58,4 @@ #define TEXT_SWAP obs_module_text("SwapFC-LFE") #define TEXT_SWAP_TOOLTIP obs_module_text("SwapFC-LFE.Tooltip") #define TEXT_ALLOW_10_BIT obs_module_text("Allow10Bit") +#define TEXT_ASYNC_COMPENSATION obs_module_text("AsyncCompensation") diff --git a/plugins/decklink/data/locale/en-US.ini b/plugins/decklink/data/locale/en-US.ini index 1a69fe01d7fa29..86d0f9a4b2809c 100644 --- a/plugins/decklink/data/locale/en-US.ini +++ b/plugins/decklink/data/locale/en-US.ini @@ -39,4 +39,5 @@ SwapFC-LFE="Swap FC and LFE" SwapFC-LFE.Tooltip="Swap Front Center Channel and LFE Channel" VideoConnection="Video Connection" AudioConnection="Audio Connection" -Allow10Bit="Allow 10 Bit (Required for SDI captions, may cause performance overhead)" \ No newline at end of file +Allow10Bit="Allow 10 Bit (Required for SDI captions, may cause performance overhead)" +AsyncCompensation="Enable Asynchronous Compensation" diff --git a/plugins/decklink/decklink-source.cpp b/plugins/decklink/decklink-source.cpp index d086cebbe12d61..005b09b8f1709e 100644 --- a/plugins/decklink/decklink-source.cpp +++ b/plugins/decklink/decklink-source.cpp @@ -76,6 +76,10 @@ static void decklink_update(void *data, obs_data_t *settings) decklink->swap = obs_data_get_bool(settings, SWAP); decklink->allow10Bit = obs_data_get_bool(settings, ALLOW_10_BIT); decklink->Activate(device, id, videoConnection, audioConnection); + + obs_source_set_async_compensation( + decklink->GetSource(), + obs_data_get_bool(settings, ASYNC_COMPENSATION)); } static void decklink_show(void *data) @@ -106,6 +110,7 @@ static void decklink_get_defaults(obs_data_t *settings) obs_data_set_default_int(settings, COLOR_RANGE, VIDEO_RANGE_DEFAULT); obs_data_set_default_int(settings, CHANNEL_FORMAT, SPEAKERS_STEREO); obs_data_set_default_bool(settings, SWAP, false); + obs_data_set_default_bool(settings, ASYNC_COMPENSATION, true); } static const char *decklink_get_name(void *) @@ -399,6 +404,9 @@ static obs_properties_t *decklink_get_properties(void *data) obs_properties_add_bool(props, ALLOW_10_BIT, TEXT_ALLOW_10_BIT); + obs_properties_add_bool(props, ASYNC_COMPENSATION, + TEXT_ASYNC_COMPENSATION); + UNUSED_PARAMETER(data); return props; }