FeatureExtractionPluginFactory.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file copyright 2006 Chris Cannam.
00008     
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef _FEATURE_EXTRACTION_PLUGIN_FACTORY_H_
00017 #define _FEATURE_EXTRACTION_PLUGIN_FACTORY_H_
00018 
00019 #include <QString>
00020 #include <vector>
00021 #include <map>
00022 
00023 namespace Vamp { class Plugin; }
00024 
00025 class FeatureExtractionPluginFactory
00026 {
00027 public:
00028     virtual ~FeatureExtractionPluginFactory() { }
00029 
00030     static FeatureExtractionPluginFactory *instance(QString pluginType);
00031     static FeatureExtractionPluginFactory *instanceFor(QString identifier);
00032     static std::vector<QString> getAllPluginIdentifiers();
00033 
00034     virtual std::vector<QString> getPluginPath();
00035 
00036     virtual std::vector<QString> getPluginIdentifiers();
00037 
00038     virtual QString findPluginFile(QString soname, QString inDir = "");
00039 
00040     // We don't set blockSize or channels on this -- they're
00041     // negotiated and handled via initialize() on the plugin
00042     virtual Vamp::Plugin *instantiatePlugin(QString identifier,
00043                                             float inputSampleRate);
00044 
00048     virtual QString getPluginCategory(QString identifier);
00049 
00050 protected:
00051     std::vector<QString> m_pluginPath;
00052     std::map<QString, QString> m_taxonomy;
00053 
00054     friend class PluginDeletionNotifyAdapter;
00055     void pluginDeleted(Vamp::Plugin *);
00056     std::map<Vamp::Plugin *, void *> m_handleMap;
00057 
00058     void generateTaxonomy();
00059 };
00060 
00061 #endif

Generated on Wed Feb 20 15:45:25 2008 for SonicVisualiser by  doxygen 1.5.1