mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-28 17:42:28 +08:00
libobs: Rename MODULE_FILE_NOT_FOUND code to MODULE_FAILED_TO_OPEN
This code is returned if os_dlopen returns NULL. This can happen for
multiple reasons, not just because the file can't be found. Since [1]
other causes are getting more common, but this could also happen before.
[1]: 62429135ba
This commit is contained in:
committed by
Ryan Foster
parent
9a3fe95211
commit
fd214a9c6e
+2
-1
@@ -28,7 +28,8 @@
|
||||
|
||||
#define MODULE_SUCCESS 0
|
||||
#define MODULE_ERROR -1
|
||||
#define MODULE_FILE_NOT_FOUND -2
|
||||
#define MODULE_FAILED_TO_OPEN -2
|
||||
#define MODULE_FILE_NOT_FOUND MODULE_FAILED_TO_OPEN /* DEPRECATED! */
|
||||
#define MODULE_MISSING_EXPORTS -3
|
||||
#define MODULE_INCOMPATIBLE_VER -4
|
||||
#define MODULE_HARDCODED_SKIP -5
|
||||
|
||||
+3
-3
@@ -160,7 +160,7 @@ int obs_open_module(obs_module_t **module, const char *path, const char *data_pa
|
||||
mod.module = os_dlopen(path);
|
||||
if (!mod.module) {
|
||||
blog(LOG_WARNING, "Module '%s' not loaded", path);
|
||||
return MODULE_FILE_NOT_FOUND;
|
||||
return MODULE_FAILED_TO_OPEN;
|
||||
}
|
||||
|
||||
errorcode = load_module_exports(&mod, path);
|
||||
@@ -522,8 +522,8 @@ static void load_all_callback(void *param, const struct obs_module_info2 *info)
|
||||
case MODULE_MISSING_EXPORTS:
|
||||
blog(LOG_DEBUG, "Failed to load module file '%s', not an OBS plugin", info->bin_path);
|
||||
return;
|
||||
case MODULE_FILE_NOT_FOUND:
|
||||
blog(LOG_DEBUG, "Failed to load module file '%s', file not found", info->bin_path);
|
||||
case MODULE_FAILED_TO_OPEN:
|
||||
blog(LOG_DEBUG, "Failed to load module file '%s', module failed to open", info->bin_path);
|
||||
return;
|
||||
case MODULE_ERROR:
|
||||
blog(LOG_DEBUG, "Failed to load module file '%s'", info->bin_path);
|
||||
|
||||
+1
-1
@@ -482,7 +482,7 @@ EXPORT bool obs_get_audio_info2(struct obs_audio_info2 *oai2);
|
||||
* data files are stored.
|
||||
* @returns MODULE_SUCCESS if successful
|
||||
* MODULE_ERROR if a generic error occurred
|
||||
* MODULE_FILE_NOT_FOUND if the module was not found
|
||||
* MODULE_FAILED_TO_OPEN if the module failed to open, e.g. because it was not found or had missing symbols
|
||||
* MODULE_MISSING_EXPORTS if required exports are missing
|
||||
* MODULE_INCOMPATIBLE_VER if incompatible version
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user