Chris@1229
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@1229
|
2
|
Chris@1229
|
3 /*
|
Chris@1229
|
4 Sonic Visualiser
|
Chris@1229
|
5 An audio file viewer and annotation editor.
|
Chris@1229
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@1229
|
7 This file copyright 2006-2016 Chris Cannam and QMUL.
|
Chris@1229
|
8
|
Chris@1229
|
9 This program is free software; you can redistribute it and/or
|
Chris@1229
|
10 modify it under the terms of the GNU General Public License as
|
Chris@1229
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@1229
|
12 License, or (at your option) any later version. See the file
|
Chris@1229
|
13 COPYING included with this distribution for more information.
|
Chris@1229
|
14 */
|
Chris@1229
|
15
|
Chris@1229
|
16 #ifndef SV_FEATURE_EXTRACTION_PLUGIN_FACTORY_H
|
Chris@1229
|
17 #define SV_FEATURE_EXTRACTION_PLUGIN_FACTORY_H
|
Chris@1229
|
18
|
Chris@1229
|
19 #include <vamp-hostsdk/Plugin.h>
|
Chris@1229
|
20
|
Chris@1229
|
21 #include "vamp-support/PluginStaticData.h"
|
Chris@1229
|
22
|
Chris@1229
|
23 #include "base/BaseTypes.h"
|
Chris@1229
|
24
|
Chris@1229
|
25 #include <QString>
|
Chris@1229
|
26
|
Chris@1830
|
27 #include <memory>
|
Chris@1830
|
28
|
Chris@1229
|
29 class FeatureExtractionPluginFactory
|
Chris@1229
|
30 {
|
Chris@1229
|
31 public:
|
Chris@1229
|
32 static FeatureExtractionPluginFactory *instance();
|
Chris@1229
|
33
|
Chris@1229
|
34 virtual ~FeatureExtractionPluginFactory() { }
|
Chris@1229
|
35
|
Chris@1229
|
36 /**
|
Chris@1229
|
37 * Return all installed plugin identifiers.
|
Chris@1229
|
38 */
|
Chris@1464
|
39 virtual std::vector<QString> getPluginIdentifiers(QString &errorMsg) = 0;
|
Chris@1464
|
40
|
Chris@1229
|
41 /**
|
Chris@1229
|
42 * Return static data for the given plugin.
|
Chris@1229
|
43 */
|
Chris@1464
|
44 virtual piper_vamp::PluginStaticData getPluginStaticData(QString ident) = 0;
|
Chris@1464
|
45
|
Chris@1229
|
46 /**
|
Chris@1229
|
47 * Instantiate (load) and return pointer to the plugin with the
|
Chris@1229
|
48 * given identifier, at the given sample rate. We don't set
|
Chris@1229
|
49 * blockSize or channels on this -- they're negotiated and handled
|
Chris@1229
|
50 * via initialize() on the plugin itself after loading.
|
Chris@1229
|
51 */
|
Chris@1830
|
52 virtual std::shared_ptr<Vamp::Plugin> instantiatePlugin(QString identifier,
|
Chris@1830
|
53 sv_samplerate_t inputSampleRate) = 0;
|
Chris@1464
|
54
|
Chris@1229
|
55 /**
|
Chris@1229
|
56 * Get category metadata about a plugin (without instantiating it).
|
Chris@1229
|
57 */
|
Chris@1464
|
58 virtual QString getPluginCategory(QString identifier) = 0;
|
Chris@1464
|
59
|
Chris@1464
|
60 /**
|
Chris@1464
|
61 * Get the full file path (including both directory and filename)
|
Chris@1464
|
62 * of the library file that provides a given plugin
|
Chris@1464
|
63 * identifier. Note getPluginIdentifiers() must have been called
|
Chris@1464
|
64 * before this has access to the necessary information.
|
Chris@1464
|
65 */
|
Chris@1464
|
66 virtual QString getPluginLibraryPath(QString identifier) = 0;
|
Chris@1229
|
67 };
|
Chris@1229
|
68
|
Chris@1229
|
69 #endif
|