gst-indent
[platform/upstream/gst-plugins-good.git] / ext / ladspa / utils.h
1 /* utils.h
2
3    Free software by Richard W.E. Furse. Do with as you will. No
4    warranty. */
5
6 #ifndef LADSPA_SDK_LOAD_PLUGIN_LIB
7 #define LADSPA_SDK_LOAD_PLUGIN_LIB
8
9 /*****************************************************************************/
10
11 #include <ladspa.h>
12
13 /*****************************************************************************/
14
15 /* Functions in load.c: */
16
17 /* This function call takes a plugin library filename, searches for
18    the library along the LADSPA_PATH, loads it with dlopen() and
19    returns a plugin handle for use with findPluginDescriptor() or
20    unloadLADSPAPluginLibrary(). Errors are handled by writing a
21    message to stderr and calling exit(1). It is alright (although
22    inefficient) to call this more than once for the same file. */
23 void *loadLADSPAPluginLibrary (const char *pcPluginFilename);
24
25 /* This function unloads a LADSPA plugin library. */
26 void unloadLADSPAPluginLibrary (void *pvLADSPAPluginLibrary);
27
28 /* This function locates a LADSPA plugin within a plugin library
29    loaded with loadLADSPAPluginLibrary(). Errors are handled by
30    writing a message to stderr and calling exit(1). Note that the
31    plugin library filename is only included to help provide
32    informative error messages. */
33 const LADSPA_Descriptor *findLADSPAPluginDescriptor (void
34     *pvLADSPAPluginLibrary, const char *pcPluginLibraryFilename,
35     const char *pcPluginLabel);
36
37 /*****************************************************************************/
38
39 /* Functions in search.c: */
40
41 /* Callback function for use with LADSPAPluginSearch(). The callback
42    function passes the filename (full path), a plugin handle (dlopen()
43    style) and a LADSPA_DescriptorFunction (from which
44    LADSPA_Descriptors can be acquired). */
45 typedef void LADSPAPluginSearchCallbackFunction
46     (const char *pcFullFilename,
47     void *pvPluginHandle, LADSPA_Descriptor_Function fDescriptorFunction);
48
49 /* Search through the $(LADSPA_PATH) (or a default path) for any
50    LADSPA plugin libraries. Each plugin library is tested using
51    dlopen() and dlsym(,"ladspa_descriptor"). After loading each
52    library, the callback function is called to process it. This
53    function leaves items passed to the callback function open. */
54 void LADSPAPluginSearch (LADSPAPluginSearchCallbackFunction fCallbackFunction);
55
56 /*****************************************************************************/
57
58 #endif
59
60 /* EOF */