annotate plugin/FeatureExtractionPluginFactory.h @ 1464:91bb68146dfc

Add getPluginLibraryPath throughout, in order to provide diagnostic about which plugins were loaded from where
author Chris Cannam
date Fri, 11 May 2018 14:11:04 +0100
parents 9ae2ce9190e6
children 5f8fbbde08ff
rev   line source
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@1229 27 class FeatureExtractionPluginFactory
Chris@1229 28 {
Chris@1229 29 public:
Chris@1229 30 static FeatureExtractionPluginFactory *instance();
Chris@1229 31
Chris@1229 32 virtual ~FeatureExtractionPluginFactory() { }
Chris@1229 33
Chris@1229 34 /**
Chris@1229 35 * Return all installed plugin identifiers.
Chris@1229 36 */
Chris@1464 37 virtual std::vector<QString> getPluginIdentifiers(QString &errorMsg) = 0;
Chris@1464 38
Chris@1229 39 /**
Chris@1229 40 * Return static data for the given plugin.
Chris@1229 41 */
Chris@1464 42 virtual piper_vamp::PluginStaticData getPluginStaticData(QString ident) = 0;
Chris@1464 43
Chris@1229 44 /**
Chris@1229 45 * Instantiate (load) and return pointer to the plugin with the
Chris@1229 46 * given identifier, at the given sample rate. We don't set
Chris@1229 47 * blockSize or channels on this -- they're negotiated and handled
Chris@1229 48 * via initialize() on the plugin itself after loading.
Chris@1229 49 */
Chris@1229 50 virtual Vamp::Plugin *instantiatePlugin(QString identifier,
Chris@1464 51 sv_samplerate_t inputSampleRate) = 0;
Chris@1464 52
Chris@1229 53 /**
Chris@1229 54 * Get category metadata about a plugin (without instantiating it).
Chris@1229 55 */
Chris@1464 56 virtual QString getPluginCategory(QString identifier) = 0;
Chris@1464 57
Chris@1464 58 /**
Chris@1464 59 * Get the full file path (including both directory and filename)
Chris@1464 60 * of the library file that provides a given plugin
Chris@1464 61 * identifier. Note getPluginIdentifiers() must have been called
Chris@1464 62 * before this has access to the necessary information.
Chris@1464 63 */
Chris@1464 64 virtual QString getPluginLibraryPath(QString identifier) = 0;
Chris@1229 65 };
Chris@1229 66
Chris@1229 67 #endif