Chris@49: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@0: 
Chris@0: /*
Chris@52:     Sonic Visualiser
Chris@52:     An audio file viewer and annotation editor.
Chris@52:     Centre for Digital Music, Queen Mary, University of London.
Chris@52:     This file copyright 2006 Chris Cannam.
Chris@0:     
Chris@52:     This program is free software; you can redistribute it and/or
Chris@52:     modify it under the terms of the GNU General Public License as
Chris@52:     published by the Free Software Foundation; either version 2 of the
Chris@52:     License, or (at your option) any later version.  See the file
Chris@52:     COPYING included with this distribution for more information.
Chris@0: */
Chris@0: 
Chris@0: #ifndef _FEATURE_EXTRACTION_PLUGIN_FACTORY_H_
Chris@0: #define _FEATURE_EXTRACTION_PLUGIN_FACTORY_H_
Chris@0: 
Chris@0: #include <QString>
Chris@0: #include <vector>
Chris@165: #include <map>
Chris@0: 
Chris@66: namespace Vamp { class Plugin; }
Chris@0: 
Chris@0: class FeatureExtractionPluginFactory
Chris@0: {
Chris@0: public:
Chris@161:     virtual ~FeatureExtractionPluginFactory() { }
Chris@161: 
Chris@0:     static FeatureExtractionPluginFactory *instance(QString pluginType);
Chris@0:     static FeatureExtractionPluginFactory *instanceFor(QString identifier);
Chris@0:     static std::vector<QString> getAllPluginIdentifiers();
Chris@0: 
Chris@66:     virtual std::vector<QString> getPluginPath();
Chris@66: 
Chris@66:     virtual std::vector<QString> getPluginIdentifiers();
Chris@66: 
Chris@66:     virtual QString findPluginFile(QString soname, QString inDir = "");
Chris@0: 
Chris@0:     // We don't set blockSize or channels on this -- they're
Chris@0:     // negotiated and handled via initialize() on the plugin
Chris@66:     virtual Vamp::Plugin *instantiatePlugin(QString identifier,
Chris@66:                                             float inputSampleRate);
Chris@0: 
Chris@165:     /**
Chris@165:      * Get category metadata about a plugin (without instantiating it).
Chris@165:      */
Chris@165:     virtual QString getPluginCategory(QString identifier);
Chris@165: 
Chris@0: protected:
Chris@117:     std::vector<QString> m_pluginPath;
Chris@165:     std::map<QString, QString> m_taxonomy;
Chris@165: 
Chris@165:     void generateTaxonomy();
Chris@0: };
Chris@0: 
Chris@0: #endif