snapcast icon indicating copy to clipboard operation
snapcast copied to clipboard

Prefer dlopen() for dynamic library loading

Open oliv3r opened this issue 2 months ago • 0 comments

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.

oliv3r avatar Apr 29 '24 15:04 oliv3r