PluginLoader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _VAMP_PLUGIN_LOADER_H_
00038 #define _VAMP_PLUGIN_LOADER_H_
00039
00040 #include <vector>
00041 #include <string>
00042 #include <map>
00043
00044 #include "hostguard.h"
00045 #include "PluginWrapper.h"
00046
00047 _VAMP_SDK_HOSTSPACE_BEGIN(PluginLoader.h)
00048
00049 namespace Vamp {
00050
00051 class Plugin;
00052
00053 namespace HostExt {
00054
00072 class PluginLoader
00073 {
00074 public:
00079 static PluginLoader *getInstance();
00080
00101 typedef std::string PluginKey;
00102
00107 typedef std::vector<PluginKey> PluginKeyList;
00108
00119 typedef std::vector<std::string> PluginCategoryHierarchy;
00120
00125 PluginKeyList listPlugins();
00126
00169 enum AdapterFlags {
00170
00171 ADAPT_INPUT_DOMAIN = 0x01,
00172 ADAPT_CHANNEL_COUNT = 0x02,
00173 ADAPT_BUFFER_SIZE = 0x04,
00174
00175 ADAPT_ALL_SAFE = 0x03,
00176
00177 ADAPT_ALL = 0xff
00178 };
00179
00197 Plugin *loadPlugin(PluginKey key,
00198 float inputSampleRate,
00199 int adapterFlags = 0);
00200
00206 PluginKey composePluginKey(std::string libraryName,
00207 std::string identifier);
00208
00218 PluginCategoryHierarchy getPluginCategory(PluginKey plugin);
00219
00224 std::string getLibraryPathForPlugin(PluginKey plugin);
00225
00226 protected:
00227 PluginLoader();
00228 virtual ~PluginLoader();
00229
00230 class Impl;
00231 Impl *m_impl;
00232
00233 static PluginLoader *m_instance;
00234 };
00235
00236 }
00237
00238 }
00239
00240 _VAMP_SDK_HOSTSPACE_END(PluginLoader.h)
00241
00242 #endif
00243