Mercurial > hg > svcore
comparison plugin/FeatureExtractionPluginFactory.h @ 1223:c2207877689d piper
Avoid instantiating all plugins (in piper client) on startup, using plugin static data instead. Problem of where to get the units field from is still pending.
author | Chris Cannam |
---|---|
date | Thu, 20 Oct 2016 14:06:58 +0100 |
parents | 8dc7ab20e847 |
children | 9ae2ce9190e6 |
comparison
equal
deleted
inserted
replaced
1222:771a17925576 | 1223:c2207877689d |
---|---|
24 #include <vamp-hostsdk/Plugin.h> | 24 #include <vamp-hostsdk/Plugin.h> |
25 | 25 |
26 #include "base/Debug.h" | 26 #include "base/Debug.h" |
27 #include "base/BaseTypes.h" | 27 #include "base/BaseTypes.h" |
28 | 28 |
29 #include "vamp-client/ProcessQtTransport.h" | 29 #include "vamp-support/PluginStaticData.h" |
30 #include "vamp-client/CapnpRRClient.h" | |
31 | 30 |
32 class FeatureExtractionPluginFactory | 31 class FeatureExtractionPluginFactory |
33 { | 32 { |
34 public: | 33 public: |
35 FeatureExtractionPluginFactory(); | 34 FeatureExtractionPluginFactory(); |
39 static FeatureExtractionPluginFactory *instanceFor(QString identifier); | 38 static FeatureExtractionPluginFactory *instanceFor(QString identifier); |
40 static std::vector<QString> getAllPluginIdentifiers(); | 39 static std::vector<QString> getAllPluginIdentifiers(); |
41 | 40 |
42 virtual std::vector<QString> getPluginIdentifiers(); | 41 virtual std::vector<QString> getPluginIdentifiers(); |
43 | 42 |
43 virtual piper_vamp::PluginStaticData getPluginStaticData(QString identifier); | |
44 | |
44 // We don't set blockSize or channels on this -- they're | 45 // We don't set blockSize or channels on this -- they're |
45 // negotiated and handled via initialize() on the plugin | 46 // negotiated and handled via initialize() on the plugin |
46 virtual Vamp::Plugin *instantiatePlugin(QString identifier, | 47 virtual Vamp::Plugin *instantiatePlugin(QString identifier, |
47 sv_samplerate_t inputSampleRate); | 48 sv_samplerate_t inputSampleRate); |
48 | 49 |
51 */ | 52 */ |
52 virtual QString getPluginCategory(QString identifier); | 53 virtual QString getPluginCategory(QString identifier); |
53 | 54 |
54 protected: | 55 protected: |
55 std::string m_serverName; | 56 std::string m_serverName; |
56 | |
57 piper_vamp::client::ProcessQtTransport m_transport; | |
58 piper_vamp::client::CapnpRRClient m_client; | |
59 | |
60 QMutex m_mutex; | 57 QMutex m_mutex; |
61 std::vector<piper_vamp::PluginStaticData> m_pluginData; | 58 std::vector<piper_vamp::PluginStaticData> m_pluginData; |
62 std::map<QString, QString> m_taxonomy; | 59 std::map<QString, QString> m_taxonomy; |
63 void populate(); | 60 void populate(); |
64 }; | 61 }; |