Skip to content

Commit cac114d

Browse files
committed
vdisp,vcap/decklink: do not fail if insuff drv ver
The motivation is to allow (although not recommend) running even with old drivers - it will usually work and just the DeckLink IP features won't be available (and warnings about that). + print it again at the beginning (== print also when :help requested) + change the message not_inst-or-outdated jus to outdated because in that place it is obvious that the drivers are present
1 parent 9e736df commit cac114d

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/blackmagic_common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ bool blackmagic_api_version_check()
238238
}
239239

240240
if (BLACKMAGIC_DECKLINK_API_VERSION > value) { // this is safe comparision, for internal structure please see SDK documentation
241-
log_msg(LOG_LEVEL_ERROR, "The DeckLink drivers may not be installed or are outdated.\n");
241+
log_msg(LOG_LEVEL_ERROR, "The DeckLink drivers are be outdated.\n");
242242
log_msg(LOG_LEVEL_ERROR, "You should have at least the version UltraGrid has been linked with.\n");
243243
log_msg(LOG_LEVEL_ERROR, "Vendor download page is http://www.blackmagic-design.com/support\n");
244244
print_decklink_version();

src/video_capture/decklink.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,8 @@ vidcap_decklink_init(struct vidcap_params *params, void **state)
14261426
{
14271427
const char *fmt = vidcap_params_get_fmt(params);
14281428

1429+
blackmagic_api_version_check();
1430+
14291431
if (strcmp(fmt, "help") == 0 || strcmp(fmt, "fullhelp") == 0) {
14301432
decklink_help(strcmp(fmt, "fullhelp") == 0);
14311433
return VIDCAP_INIT_NOERR;
@@ -1459,11 +1461,6 @@ vidcap_decklink_init(struct vidcap_params *params, void **state)
14591461
return VIDCAP_INIT_FAIL;
14601462
}
14611463

1462-
if (!blackmagic_api_version_check()) {
1463-
delete s;
1464-
return VIDCAP_INIT_FAIL;
1465-
}
1466-
14671464
switch (get_bits_per_component(s->codec)) {
14681465
case 0: s->requested_bit_depth = 0; break;
14691466
case 8: s->requested_bit_depth = bmdDetectedVideoInput8BitDepth; break;

src/video_display/decklink.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,8 @@ static void *display_decklink_init(struct module *parent, const char *fmt, unsig
14161416
IDeckLinkConfiguration* deckLinkConfiguration = NULL;
14171417
// for Decklink Studio which has switchable XLR - analog 3 and 4 or AES/EBU 3,4 and 5,6
14181418

1419+
blackmagic_api_version_check();
1420+
14191421
if (strcmp(fmt, "help") == 0 || strcmp(fmt, "fullhelp") == 0) {
14201422
show_help(strcmp(fmt, "fullhelp") == 0);
14211423
return INIT_NOERR;
@@ -1444,11 +1446,6 @@ static void *display_decklink_init(struct module *parent, const char *fmt, unsig
14441446
return NULL;
14451447
}
14461448

1447-
if (!blackmagic_api_version_check()) {
1448-
delete s;
1449-
return NULL;
1450-
}
1451-
14521449
// Connect to the first DeckLink instance
14531450
for (auto &d : bmd_get_sorted_devices(&s->com_initialized, true)) {
14541451
s->deckLink = get<0>(d).release(); // unmanage

0 commit comments

Comments
 (0)