DeckLink cap/disp: added full-duplex parameter

It actually sets `profile=1dfd`. This is a complement to already
existing `half-duplex` option (that has on the other hand more more
complex semantic - it chooses the profile tailored for the device, since
the right one differs for eg. 8K Pro /4dhd/ and Duo/Quad 2 /2dhd/).
This commit is contained in:
Martin Pulec
2023-04-17 12:34:13 +02:00
parent bc30735929
commit cf825ecea2
3 changed files with 10 additions and 7 deletions

View File

@@ -372,7 +372,6 @@ class ProfileCallback : public IDeckLinkProfileCallback
bool decklink_set_profile(IDeckLink *deckLink, uint32_t profileID, bool stereo) {
if (profileID == BMD_OPT_DEFAULT && !stereo) {
return true;
profileID = bmdProfileOneSubDeviceFullDuplex;
}
bool ret = true;

View File

@@ -499,8 +499,8 @@ decklink_help(bool full)
col() << "\tPrint description of all available options.\n";
col() << "\n";
col() << SBOLD("half-duplex") << "\n";
col() << "\tSet a profile that allows maximal number of simultaneous IOs.\n";
col() << SBOLD("half-duplex | full-duplex") << "\n";
col() << "\tSet a profile that allows maximal number of simultaneous IOs / set device to better compatibility (3D, dual-link).\n";
col() << "\n";
if (full) {
@@ -700,6 +700,8 @@ static bool parse_option(struct vidcap_decklink_state *s, const char *opt)
} else {
s->profile = (BMDProfileID) bmd_read_fourcc(mode);
}
} else if (strstr(opt, "full-duplex") == opt) {
s->profile = bmdProfileOneSubDeviceFullDuplex;
} else if (strstr(opt, "half-duplex") == opt) {
s->profile = bmdDuplexHalf;
} else if (strcasecmp(opt, "nosig-send") == 0) {
@@ -707,7 +709,7 @@ static bool parse_option(struct vidcap_decklink_state *s, const char *opt)
} else if (strstr(opt, "keep-settings") == opt) {
s->keep_device_defaults = true;
} else {
log_msg(LOG_LEVEL_WARNING, "[DeckLink] Warning, unrecognized trailing options in init string: %s\n", opt);
log_msg(LOG_LEVEL_WARNING, "[DeckLink] Warning, unrecognized options in init string: %s\n", opt);
return false;
}

View File

@@ -380,8 +380,8 @@ static void show_help(bool full)
col() << SBOLD("\tLevelA/LevelB") << "\tspecifies 3G-SDI output level\n";
col() << SBOLD("\t3D") << "\t\t3D stream will be received (see also HDMI3DPacking option)\n";
col() << SBOLD("\taudio_level") << "\tset maximum attenuation for mic\n";
col() << SBOLD("\thalf-duplex")
<< "\tset a profile that allows maximal number of simultaneous IOs\n";
col() << SBOLD("\thalf-duplex | full-duplex")
<< "\tset a profile that allows maximal number of simultaneous IOs / set device to better compatibility (3D, dual-link)\n";
col() << SBOLD("\tHDR[=HDR|PQ|HLG|<int>|help]") << " - enable HDR metadata (optionally specifying EOTF, int 0-7 as per CEA 861.), help for extended help\n";
col() << SBOLD("\tdrift_fix") << " activates a time drift fix for the Decklink cards with resampler (experimental)\n";
if (!full) {
@@ -1013,6 +1013,8 @@ static bool settings_init(struct state_decklink *s, const char *fmt,
} else {
s->profile_req = (BMDProfileID) bmd_read_fourcc(ptr);
}
} else if (strcasecmp(ptr, "full-duplex") == 0) {
s->profile_req = bmdProfileOneSubDeviceFullDuplex;
} else if (strcasecmp(ptr, "half-duplex") == 0) {
s->profile_req = bmdDuplexHalf;
} else if (strcasecmp(ptr, "LevelA") == 0) {
@@ -1080,7 +1082,7 @@ static bool settings_init(struct state_decklink *s, const char *fmt,
} else if (strncasecmp(ptr, "targetbuffer=", strlen("targetbuffer=")) == 0) {
s->audio_drift_fixer.set_target_buffer(parse_uint32(strchr(ptr, '=') + 1));
} else {
log_msg(LOG_LEVEL_ERROR, MOD_NAME "Warning: unknown options in config string.\n");
log_msg(LOG_LEVEL_ERROR, MOD_NAME "Warning: unknown option in config string: %s\n", ptr);
return false;
}
ptr = strtok_r(nullptr, ":", &save_ptr);