Previous Up Next
?>
Accueil
Accueil
Blog
Blog
GNU/Linux
GNU/Linux
Pierre L.
Pierre L.
Whist
Whist
Nous
Nous
Jabberwocky
Jabberwocky
LaTeX
LaTeX
l'eremita la forza la luna il mondo

4  Developing a plugin

4.1  Implementation

The plugin SHOULD at least implement an initial method :

4.1.1  Initial method

Name of this method is arbitrary provided you past it as parameter to the festplugin_open method (see 3.1.1) or the festplugin_track method (cf. 3.3 ,) according to the tracking scheme you want to implement. But the initial method should match following specifications :

Parameter

The festplugin_open schedule

Takes only one parameter of type void* which is the plugin handle returned by the dlopen method.

The festplugin_track schedule

Takes two supplementary parameters which are the ‘path’ to the plugin and the ‘mode’ according to which the plugin is open.

Return value

Returns a LISP object that may be used at scheme level to control the plugin. Details of this control and features that might be implemented at this level are completely free and left to the developer. Except if one later want to use the close (3.2) method. In this case object storing the handle should inherit from the FP_MANAGER class declared in festplugin.H to allow ’handle’ retrieval.

4.2  Examples

We give two sample programs. First one 4.2.1 is a very elementary ‘hello world’ program as any project should implement one ! It is implemented following the festplugin_open schedule (cf. 3.1 .)

Second one 4.2.2 is a logger that allows verry flexible logging mechanism and that is used in particular for the audio scheduler or/and franfest that are (or should be) implemented as festival plugins. It is implemented following the festplugin_track schedule (cf. 3.3 .)

4.2.1  Hello world

See in examples/hello_world directory.

4.2.2  The logger

See in examples/logger directory.

Apache/2.4.38 (Unix) PHP/7.3.2 SVN/1.11.1 Hevea

Previous Up Next