summaryrefslogtreecommitdiffstats
path: root/ext/ladspa/utils.h
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2001-12-23 15:26:43 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2001-12-23 15:26:43 +0000
commitba954374496502524ccd4b96731ecb16ff8ab5d9 (patch)
tree47e5cf456e3400b6cdebe051bc4b5268e5ed7041 /ext/ladspa/utils.h
parentba961327f3ea65e5fbe137b7357f21345c2b6e8e (diff)
downloadgst-plugins-bad-ba954374496502524ccd4b96731ecb16ff8ab5d9.tar.gz
gst-plugins-bad-ba954374496502524ccd4b96731ecb16ff8ab5d9.tar.bz2
gst-plugins-bad-ba954374496502524ccd4b96731ecb16ff8ab5d9.zip
added ladspa, doesn't have checks yet though
Original commit message from CVS: added ladspa, doesn't have checks yet though
Diffstat (limited to 'ext/ladspa/utils.h')
-rw-r--r--ext/ladspa/utils.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/ext/ladspa/utils.h b/ext/ladspa/utils.h
new file mode 100644
index 00000000..1be64d09
--- /dev/null
+++ b/ext/ladspa/utils.h
@@ -0,0 +1,62 @@
+/* utils.h
+
+ Free software by Richard W.E. Furse. Do with as you will. No
+ warranty. */
+
+#ifndef LADSPA_SDK_LOAD_PLUGIN_LIB
+#define LADSPA_SDK_LOAD_PLUGIN_LIB
+
+/*****************************************************************************/
+
+#include "ladspa.h"
+
+/*****************************************************************************/
+
+/* Functions in load.c: */
+
+/* This function call takes a plugin library filename, searches for
+ the library along the LADSPA_PATH, loads it with dlopen() and
+ returns a plugin handle for use with findPluginDescriptor() or
+ unloadLADSPAPluginLibrary(). Errors are handled by writing a
+ message to stderr and calling exit(1). It is alright (although
+ inefficient) to call this more than once for the same file. */
+void * loadLADSPAPluginLibrary(const char * pcPluginFilename);
+
+/* This function unloads a LADSPA plugin library. */
+void unloadLADSPAPluginLibrary(void * pvLADSPAPluginLibrary);
+
+/* This function locates a LADSPA plugin within a plugin library
+ loaded with loadLADSPAPluginLibrary(). Errors are handled by
+ writing a message to stderr and calling exit(1). Note that the
+ plugin library filename is only included to help provide
+ informative error messages. */
+const LADSPA_Descriptor *
+findLADSPAPluginDescriptor(void * pvLADSPAPluginLibrary,
+ const char * pcPluginLibraryFilename,
+ const char * pcPluginLabel);
+
+/*****************************************************************************/
+
+/* Functions in search.c: */
+
+/* Callback function for use with LADSPAPluginSearch(). The callback
+ function passes the filename (full path), a plugin handle (dlopen()
+ style) and a LADSPA_DescriptorFunction (from which
+ LADSPA_Descriptors can be acquired). */
+typedef void LADSPAPluginSearchCallbackFunction
+(const char * pcFullFilename,
+ void * pvPluginHandle,
+ LADSPA_Descriptor_Function fDescriptorFunction);
+
+/* Search through the $(LADSPA_PATH) (or a default path) for any
+ LADSPA plugin libraries. Each plugin library is tested using
+ dlopen() and dlsym(,"ladspa_descriptor"). After loading each
+ library, the callback function is called to process it. This
+ function leaves items passed to the callback function open. */
+void LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction);
+
+/*****************************************************************************/
+
+#endif
+
+/* EOF */