Chris@1229: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@1229: Chris@1229: /* Chris@1229: Sonic Visualiser Chris@1229: An audio file viewer and annotation editor. Chris@1229: Centre for Digital Music, Queen Mary, University of London. Chris@1229: This file copyright 2006-2016 Chris Cannam and QMUL. Chris@1229: Chris@1229: This program is free software; you can redistribute it and/or Chris@1229: modify it under the terms of the GNU General Public License as Chris@1229: published by the Free Software Foundation; either version 2 of the Chris@1229: License, or (at your option) any later version. See the file Chris@1229: COPYING included with this distribution for more information. Chris@1229: */ Chris@1229: Chris@1229: #ifndef SV_FEATURE_EXTRACTION_PLUGIN_FACTORY_H Chris@1229: #define SV_FEATURE_EXTRACTION_PLUGIN_FACTORY_H Chris@1229: Chris@1229: #include Chris@1229: Chris@1229: #include "vamp-support/PluginStaticData.h" Chris@1229: Chris@1229: #include "base/BaseTypes.h" Chris@1229: Chris@1229: #include Chris@1229: Chris@1830: #include Chris@1830: Chris@1229: class FeatureExtractionPluginFactory Chris@1229: { Chris@1229: public: Chris@1229: static FeatureExtractionPluginFactory *instance(); Chris@1229: Chris@1229: virtual ~FeatureExtractionPluginFactory() { } Chris@1229: Chris@1229: /** Chris@1229: * Return all installed plugin identifiers. Chris@1229: */ Chris@1464: virtual std::vector getPluginIdentifiers(QString &errorMsg) = 0; Chris@1464: Chris@1229: /** Chris@1229: * Return static data for the given plugin. Chris@1229: */ Chris@1464: virtual piper_vamp::PluginStaticData getPluginStaticData(QString ident) = 0; Chris@1464: Chris@1229: /** Chris@1229: * Instantiate (load) and return pointer to the plugin with the Chris@1229: * given identifier, at the given sample rate. We don't set Chris@1229: * blockSize or channels on this -- they're negotiated and handled Chris@1229: * via initialize() on the plugin itself after loading. Chris@1229: */ Chris@1830: virtual std::shared_ptr instantiatePlugin(QString identifier, Chris@1830: sv_samplerate_t inputSampleRate) = 0; Chris@1464: Chris@1229: /** Chris@1229: * Get category metadata about a plugin (without instantiating it). Chris@1229: */ Chris@1464: virtual QString getPluginCategory(QString identifier) = 0; Chris@1464: Chris@1464: /** Chris@1464: * Get the full file path (including both directory and filename) Chris@1464: * of the library file that provides a given plugin Chris@1464: * identifier. Note getPluginIdentifiers() must have been called Chris@1464: * before this has access to the necessary information. Chris@1464: */ Chris@1464: virtual QString getPluginLibraryPath(QString identifier) = 0; Chris@1229: }; Chris@1229: Chris@1229: #endif