Mercurial > hg > svcore
comparison plugin/PiperVampPluginFactory.h @ 1225:ba16388b937d piper
Restore native-Vamp factory and make the choice between Piper and Native a preference
author | Chris Cannam |
---|---|
date | Fri, 21 Oct 2016 11:49:27 +0100 |
parents | plugin/FeatureExtractionPluginFactory.h@c2207877689d |
children | 5d886b7b4029 |
comparison
equal
deleted
inserted
replaced
1224:ab050519c4ba | 1225:ba16388b937d |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Sonic Visualiser | |
5 An audio file viewer and annotation editor. | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 This file copyright 2006-2016 Chris Cannam and QMUL. | |
8 | |
9 This program is free software; you can redistribute it and/or | |
10 modify it under the terms of the GNU General Public License as | |
11 published by the Free Software Foundation; either version 2 of the | |
12 License, or (at your option) any later version. See the file | |
13 COPYING included with this distribution for more information. | |
14 */ | |
15 | |
16 #ifndef SV_PIPER_VAMP_PLUGIN_FACTORY_H | |
17 #define SV_PIPER_VAMP_PLUGIN_FACTORY_H | |
18 | |
19 #include "FeatureExtractionPluginFactory.h" | |
20 | |
21 #include <QMutex> | |
22 #include <vector> | |
23 #include <map> | |
24 | |
25 #include "base/Debug.h" | |
26 | |
27 /** | |
28 * FeatureExtractionPluginFactory type for Vamp plugins hosted in a | |
29 * separate process using Piper protocol. | |
30 */ | |
31 class PiperVampPluginFactory : public FeatureExtractionPluginFactory | |
32 { | |
33 public: | |
34 PiperVampPluginFactory(); | |
35 | |
36 virtual ~PiperVampPluginFactory() { } | |
37 | |
38 virtual std::vector<QString> getPluginIdentifiers() override; | |
39 | |
40 virtual piper_vamp::PluginStaticData getPluginStaticData(QString identifier) | |
41 override; | |
42 | |
43 virtual Vamp::Plugin *instantiatePlugin(QString identifier, | |
44 sv_samplerate_t inputSampleRate) | |
45 override; | |
46 | |
47 virtual QString getPluginCategory(QString identifier) override; | |
48 | |
49 protected: | |
50 QMutex m_mutex; | |
51 std::string m_serverName; | |
52 std::map<QString, piper_vamp::PluginStaticData> m_pluginData; // identifier -> data | |
53 std::map<QString, QString> m_taxonomy; // identifier -> category string | |
54 void populate(); | |
55 }; | |
56 | |
57 #endif |