Every Hollywood plugin needs to export the functions InitPlugin() and ClosePlugin(). As their names imply, these two functions initialize and close a plugin. By calling InitPlugin() Hollywood asks your plugin to identify itself, i.e. it needs to report certain information back to Hollywood, e.g. its feature set, author, version, minimum required Hollywood version and so on. Depending on this information, Hollywood will then import other function pointers from the plugin, depending on the feature set the plugin has reported to Hollywood.
To describe its feature set, the plugin sets the
to a combination of capability bits taken from the
hollywood/plugin.h. Hollywood then knows what this plugin can do and will
import the needed function pointers. For example, if
HWPLUG_CAPS_SOUND|HWPLUG_CAPS_SAVESAMPLE, Hollywood will know that
this plugin can load sound files and save sample files. Hollywood will therefore import
the following additional function pointers from the plugin:
OpenStream() CloseStream() SeekStream() StreamSamples() GetFormatName() RegisterSampleSaver() SaveSample()
If one of the function pointers listed above cannot be resolved, Hollywood won't load this plugin.
See InitPlugin() for details.
See ClosePlugin() for details.