mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-18 13:33:27 -04:00
decklink: Don't load modules if Decklink not found
This also modifies decklink-captions and decklink-output-ui.
This commit is contained in:
@@ -14,7 +14,7 @@ struct obs_source_info decklink_source_info;
|
||||
extern struct obs_output_info create_decklink_output_info();
|
||||
struct obs_output_info decklink_output_info;
|
||||
|
||||
void log_sdk_version()
|
||||
bool log_sdk_version()
|
||||
{
|
||||
IDeckLinkIterator *deckLinkIterator;
|
||||
IDeckLinkAPIInformation *deckLinkAPIInformation;
|
||||
@@ -24,7 +24,7 @@ void log_sdk_version()
|
||||
if (deckLinkIterator == NULL) {
|
||||
blog(LOG_WARNING,
|
||||
"A DeckLink iterator could not be created. The DeckLink drivers may not be installed");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
result = deckLinkIterator->QueryInterface(
|
||||
@@ -45,15 +45,18 @@ void log_sdk_version()
|
||||
|
||||
deckLinkAPIInformation->Release();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool obs_module_load(void)
|
||||
{
|
||||
log_sdk_version();
|
||||
if (!log_sdk_version())
|
||||
return false;
|
||||
|
||||
deviceEnum = new DeckLinkDeviceDiscovery();
|
||||
if (!deviceEnum->Init())
|
||||
return true;
|
||||
return false;
|
||||
|
||||
decklink_source_info = create_decklink_source_info();
|
||||
obs_register_source(&decklink_source_info);
|
||||
|
||||
Reference in New Issue
Block a user