decklink: Don't load modules if Decklink not found
This also modifies decklink-captions and decklink-output-ui.
This commit is contained in:
parent
93c2e681ca
commit
8510731f2b
3 changed files with 25 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue