diff vamp-hostsdk/PluginLoader.h @ 460:b409560a805b

Merge from branch vampipe
author Chris Cannam
date Mon, 10 Oct 2016 15:48:35 +0100
parents 2819b5c9a395
children 86624d166f88
line wrap: on
line diff
--- a/vamp-hostsdk/PluginLoader.h	Thu Aug 18 12:00:24 2016 +0100
+++ b/vamp-hostsdk/PluginLoader.h	Mon Oct 10 15:48:35 2016 +0100
@@ -43,6 +43,7 @@
 
 #include "hostguard.h"
 #include "PluginWrapper.h"
+#include "RequestResponse.h"
 
 _VAMP_SDK_HOSTSPACE_BEGIN(PluginLoader.h)
 
@@ -122,12 +123,28 @@
     typedef std::vector<std::string> PluginCategoryHierarchy;
 
     /**
+     * PluginStaticDataList is a list containing static information
+     * about a set of Vamp plugins.
+     *
+     * \see PluginStaticData, listPluginData()
+     */
+    typedef std::vector<PluginStaticData> PluginStaticDataList;
+    
+    /**
      * Search for all available Vamp plugins, and return a list of
      * them in the order in which they were found.
      */
     PluginKeyList listPlugins();
 
     /**
+     * Search for all available Vamp plugins, and return a list of
+     * static data about each plugin in the order in which they were
+     * found. This is slower but returns more comprehensive
+     * information than listPlugins().
+     */
+    PluginStaticDataList listPluginData();
+
+    /**
      * AdapterFlags contains a set of values that may be OR'd together
      * to indicate in which circumstances PluginLoader should use a
      * plugin adapter to make a plugin easier to use for a host that
@@ -202,6 +219,33 @@
                        int adapterFlags = 0);
 
     /**
+     * Load a Vamp plugin, given its key, inputSampleRate and the
+     * adapter flags, bundled into a LoadRequest structure. The loaded
+     * plugin is returned along with its static data and default
+     * configuration in a LoadResponse.
+     * 
+     * \see AdapterFlags, PluginInputDomainAdapter, PluginChannelAdapter, LoadRequest, LoadResponse
+     */
+    LoadResponse loadPlugin(LoadRequest req);
+
+    /**
+     * Configure and initialise a Vamp plugin. This applies the
+     * parameter and program settings found in the PluginConfiguration
+     * part of the supplied ConfigurationRequest and initialises the
+     * plugin. (Many hosts will prefer to do this themselves in
+     * stages, by calling methods on the plugin directly.)
+     *
+     * Return a ConfigurationResponse containing the result of calling
+     * getOutputDescriptors() on the configured and initialised
+     * plugin, representing the outputs of the plugin following
+     * configuration (since output ranges etc can depend on the
+     * parameters). If initialisation fails, returns an empty list.
+     *
+     * \see PluginConfiguration, ConfigurationRequest, ConfigurationResponse
+     */
+    ConfigurationResponse configurePlugin(ConfigurationRequest req);
+    
+    /**
      * Given a Vamp plugin library name and plugin identifier, return
      * the corresponding plugin key in a form suitable for passing in to
      * loadPlugin().