Mercurial > hg > svcore
comparison plugin/FeatureExtractionPluginFactory.h @ 1229:e699bdeef63c piper
Add files that I forgot to track on Friday (sigh)
author | Chris Cannam |
---|---|
date | Tue, 25 Oct 2016 10:53:12 +0100 |
parents | |
children | 9ae2ce9190e6 |
comparison
equal
deleted
inserted
replaced
1227:5d886b7b4029 | 1229:e699bdeef63c |
---|---|
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_FEATURE_EXTRACTION_PLUGIN_FACTORY_H | |
17 #define SV_FEATURE_EXTRACTION_PLUGIN_FACTORY_H | |
18 | |
19 #include <vamp-hostsdk/Plugin.h> | |
20 | |
21 #include "vamp-support/PluginStaticData.h" | |
22 | |
23 #include "base/BaseTypes.h" | |
24 | |
25 #include <QString> | |
26 | |
27 class FeatureExtractionPluginFactory | |
28 { | |
29 public: | |
30 static FeatureExtractionPluginFactory *instance(); | |
31 | |
32 virtual ~FeatureExtractionPluginFactory() { } | |
33 | |
34 /** | |
35 * Return all installed plugin identifiers. | |
36 */ | |
37 virtual std::vector<QString> getPluginIdentifiers(QString &errorMessage) { | |
38 return instance()->getPluginIdentifiers(errorMessage); | |
39 } | |
40 | |
41 /** | |
42 * Return static data for the given plugin. | |
43 */ | |
44 virtual piper_vamp::PluginStaticData getPluginStaticData(QString identifier) { | |
45 return instance()->getPluginStaticData(identifier); | |
46 } | |
47 | |
48 /** | |
49 * Instantiate (load) and return pointer to the plugin with the | |
50 * given identifier, at the given sample rate. We don't set | |
51 * blockSize or channels on this -- they're negotiated and handled | |
52 * via initialize() on the plugin itself after loading. | |
53 */ | |
54 virtual Vamp::Plugin *instantiatePlugin(QString identifier, | |
55 sv_samplerate_t inputSampleRate) { | |
56 return instance()->instantiatePlugin(identifier, inputSampleRate); | |
57 } | |
58 | |
59 /** | |
60 * Get category metadata about a plugin (without instantiating it). | |
61 */ | |
62 virtual QString getPluginCategory(QString identifier) { | |
63 return instance()->getPluginCategory(identifier); | |
64 } | |
65 }; | |
66 | |
67 #endif |