Skip to content

Commit

Permalink
ndi_common.h: lib loading debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Oct 11, 2024
1 parent 9bc284f commit fe439f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ndi_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ static const NDIlib_t *NDIlib_load(LIB_HANDLE *lib) {
"[NDI] " NDILIB_REDIST_FOLDER " environment variable not defined. "
"Trying fallback folder: %s\n",
FALLBACK_NDI_PATH);
} else {
debug_msg("NDILIB_REDIST_FOLDER env set to %s\n",
p_ndi_runtime);
}

// We now load the DLL as it is installed
Expand All @@ -101,6 +104,9 @@ static const NDIlib_t *NDIlib_load(LIB_HANDLE *lib) {
if (hNDILib) {
*((FARPROC*)&NDIlib_load) = GetProcAddress(hNDILib, NDILIB_NDI_LOAD);
}
verbose_msg("NDI lib loaded from %s - open: %s, load: %s\n", ndi_path,
hNDILib == NULL ? "NOK" : "OK",
NDIlib_load == NULL ? "NOK" : "OK");

// If we failed to load the library then we tell people to re-install it
if (!NDIlib_load) { // Unload the DLL if we loaded it
Expand Down Expand Up @@ -132,6 +138,8 @@ static const NDIlib_t *NDIlib_load(LIB_HANDLE *lib) {
strncat(ndi_path, NDILIB_LIBRARY_NAME, path_len - strlen(ndi_path) - 1);
// Try to load the library
hNDILib = dlopen(ndi_path, RTLD_LOCAL | RTLD_LAZY);
debug_msg("Trying to open NDI lib %s: %s\n",
ndi_path, hNDILib == NULL ? "NOK" : "OK");
if (hNDILib) {
break;
}
Expand Down

0 comments on commit fe439f4

Please sign in to comment.