jp9000/obs-studio — pull request #205 by jp9000 (2014-07-24 21:58:35+00:00)
Title: Improve module path handling

Changed API:
char *obs_find_plugin_file(const char *sub_path);
To:
char *obs_find_module_file(const char *module_name, const char *file);

I changed the name to make it a bit more consistent. It will now
automatically handle finding the path for the file associated with the
module.

Added new API:
void obs_add_module_path(const char *bin, const char *data);

This function will allow you to specify new module search paths to add.
If the string %module% is included, it will replace it with the module's
name when that string is used as a lookup. Data paths are now directly
added to the module's internal storage structure, and when
obs_find_module_file is used, it will look up the pointer to the
obs_module structure and get its data directory that way.

Example:
obs_add_module_path("/opt/obs/my-modules/%module%/bin",
"/opt/obs/my-modules/%module%/data");

This would cause it to additionally look for the binary of a module
named "foo" to /opt/obs/my-modules/foo/bin/foo.so, and then look for the
data in /opt/obs/my-modules/foo/data.

This gives the front-end more flexibility for handling third-party
plugin modules, or handling all plugin modules in a custom way.