[Accueil]
Accueil
[Blog]
Blog
[GNU/Linux]
GNU/Linux
[Pierre L.]
Pierre L.
[Whist]
Whist
[Nous]
Nous
[Jabberwocky]
Jabberwocky
[LaTeX]
LaTeX


Previous Up


5 Developing a plugin

5.1 Implementation

The plugin SHOULD at least implement an initial method :

5.1.1 Initial method

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

5.1.1.1 Parameter

5.1.1.1.1 The festplugin_open schedule

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

5.1.1.1.2 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.

5.1.1.2 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 (4.2) method. In this case object storing the handle should inherit from the FP_MANAGER class declared in festplugin.H to allow ’handle’ retrieval.

5.2 Examples


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

Second one 5.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. 4.3 .)

5.2.1 Hello world

See in examples/hello_world directory.

5.2.2 The logger

See in examples/logger directory.


Previous Up



l'imperatore il papa la temperanza il diavolo


Copyright (©) 2009 -- 2024 Pierre L. Nageoire


Apache/2.4.52 (Unix) PHP/8.1.3 SVN/1.14.1 Hevea 2.36