From fe439f425bb5de30a99f563fbaf0f83e23ce6f12 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 11 Oct 2024 13:02:02 +0200 Subject: [PATCH] ndi_common.h: lib loading debug messages --- src/ndi_common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ndi_common.h b/src/ndi_common.h index 464ef1aa9..c1ded4ee7 100644 --- a/src/ndi_common.h +++ b/src/ndi_common.h @@ -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 @@ -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 @@ -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; }