How does one go about creating C plugins?
Example Scenario:
I have an application which generates rgb16 files.
I have a number libraries with a particular interface that output in various formats
This is the interface:
int encode(void* buffer, int width, int height, int depth)
There is a settings.conf which is parsed at startup or SIGHUP that looks like this:
jpeg: rgb16tojpeg.so
png: rgb16topng.so
// bmp: rgb16tobmp.so
By default none of the modules are loaded.
In this case the modules jpeg and png are going to be loaded (and used), but bmp will not.
In this fashion I only load the module into memory if I plan to use it. Otherwise I do not.
More importantly, if I come up with a new format I should be able to put the .so into the plugins directory and update the settings file and voila, the output should suddenly also be encoded in the new format.
Any ideas?
AJ ONeal