mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-26 09:28:48 -04:00
decklink: Log decklink API version on plugin load
This commit is contained in:
@@ -14,8 +14,43 @@ 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()
|
||||
{
|
||||
IDeckLinkIterator *deckLinkIterator;
|
||||
IDeckLinkAPIInformation *deckLinkAPIInformation;
|
||||
HRESULT result;
|
||||
|
||||
deckLinkIterator = CreateDeckLinkIteratorInstance();
|
||||
if (deckLinkIterator == NULL) {
|
||||
blog(LOG_WARNING,
|
||||
"A DeckLink iterator could not be created. The DeckLink drivers may not be installed");
|
||||
return;
|
||||
}
|
||||
|
||||
result = deckLinkIterator->QueryInterface(
|
||||
IID_IDeckLinkAPIInformation, (void **)&deckLinkAPIInformation);
|
||||
if (result == S_OK) {
|
||||
decklink_string_t deckLinkVersion;
|
||||
deckLinkAPIInformation->GetString(BMDDeckLinkAPIVersion,
|
||||
&deckLinkVersion);
|
||||
|
||||
blog(LOG_INFO, "Decklink API Compiled version %s",
|
||||
BLACKMAGIC_DECKLINK_API_VERSION_STRING);
|
||||
|
||||
std::string versionString;
|
||||
DeckLinkStringToStdString(deckLinkVersion, versionString);
|
||||
|
||||
blog(LOG_INFO, "Decklink API Installed version %s",
|
||||
versionString.c_str());
|
||||
|
||||
deckLinkAPIInformation->Release();
|
||||
}
|
||||
}
|
||||
|
||||
bool obs_module_load(void)
|
||||
{
|
||||
log_sdk_version();
|
||||
|
||||
deviceEnum = new DeckLinkDeviceDiscovery();
|
||||
if (!deviceEnum->Init())
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user