Drip Plugin HOWTO
Since version 0.8.1 Drip supports plugins for audio and video
processing. The system is very basic for now, and might change in the future.
Plugins are supported to make it more easy to extent Drip's functionality,
without the need to understand the internal code. All that needs to be done
is to take the example plugin, rename it and add it to compilation. For people
that can code C this should be all very straidforward.
1. Start a new Drip plug.
Get the lastest Drip sourcecode, preferably from CVS, and compile it
to make sure all is working OK. Next go to the directory '
plug-ins/'. There the file 'testfilter.cpp' is of interest, this
is the skeleton source for new plug-ins and it's highly commented, and should
contain all the info a programmer needs to create a new plugin.
2. Things of interest while coding a new plugin.
In the sourcefile 'testfilter.cpp' there's a lot of comments guiding
you how to code a new plugin. I'll name here the most important todo's and
the order in which you should work:
2A. Naming: Naming of the new filter is very important, a typo probably
makes the new plugin unusable. Let's presume the new filter is to be named
'newfilter', in that case ALL occurances of 'testfilter' in
the source 'testfiler.cpp' must become 'newfilter', AND the
sourcefile of newfilter MUST become 'newfilter.cpp'.
2B. Types: The plugin you're making can be only 1 of 2 types: AUDIO
or VIDEO. Besides this, the plugin is 1 of 3 subtypes: PRE, NORMAL or POST,
which defines in which phase the plugin is applied. (Pre filters are applied
1st, Normal 2nd and POST 3th)
2C. Filter code: Now comes the actual code that processes the content..
nothing much to be said about it, only that plugins of Drip run in the application
as normal code, so crashes in the plugin will make Drip crash.
3. Getting the new Plugin to be compiled with Drip.
Edit ./plug-ins/Makefile.am and add the new plugin. Also add the new
plugin to ./encoder/plugin-loader.cpp in the function init_plugins()
. (Yeah, crappy yet, this will change very soon). Compile, install, and run...
4. Send your work to the Drip project.
When your plugin is working OK, please send it to the Drip project. When
it's passed testing, we'll be happy to bundle your work in the official code!
Jarl van Katwijk