Prefer dlopen() for dynamic library loading
oliv3r opened this issue · 0 comments
oliv3r commented
Dynamically loading libraries has as an advantage that we do not have a hard list of dependencies. This is especially true for snapclient on embedded devices, where there may not be enough room for all the decoders. but bandwidth might be less of a concern. Also just having one (small) codec installed would then still be nicer then needing everything.
To achieve this, dlopen() could be used, by checking if a library exists/can be found, and if so, load the library. Actually, the library could only be loaded when a server actually requests a stream in that format, reducing memory by not loading all libraries into ram as well.