]> git.sesse.net Git - vlc/commit
Lazily resolve plugins during scanning
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 12 May 2011 20:07:44 +0000 (23:07 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 12 May 2011 20:59:33 +0000 (23:59 +0300)
commit8277183cd5250e0ce5fef2528cf7e4e35eea2bd6
tree5de209c64190646e0bf55f09deea727814fc3314
parenta9093a20bc8cc92a00df6fd865e0908f609da7ab
Lazily resolve plugins during scanning

There are two advantages:
 - scanning uncached plugins is much faster,
 - plugins with broken dependencies are visible in the modules list.

Plugins are still resolved "now" if they are probed by module_need().
This is a safety feature (the run-time linker would exit silently if it
hit an unresolved symbol). As the previous commit unloads all uncached
plugins, we can reload the plugins with different flags as needed.

Plugins with broken/missing underlying libraries will trigger an error
only when used, rather than when scanned. vlc-cache-gen is then a bit
more robust against messed up packages installation (it will not skip
plugins anymore). Also, dialog_Fatal() could be used to report run-time
errors. This was not possible previously: the error would occur before
the UI was started.

Note that this is not implemented on Windows, as there is no support
(that I know) for lazy resolution of DLLs.
src/modules/modules.c
src/modules/modules.h
src/posix/plugin.c
src/win32/plugin.c