annotate plugin/FeatureExtractionPluginFactory.h @ 1448:8305d442d1f7 streaming-csv-writer

Remove anonymous namespace
author Lucas Thompson <dev@lucas.im>
date Tue, 17 Apr 2018 10:03:50 +0100
parents 9ae2ce9190e6
children 91bb68146dfc
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@1229 37 virtual std::vector<QString> getPluginIdentifiers(QString &errorMessage) {
Chris@1229 38 return instance()->getPluginIdentifiers(errorMessage);
Chris@1229 39 }
Chris@1229 40
Chris@1229 41 /**
Chris@1229 42 * Return static data for the given plugin.
Chris@1229 43 */
Chris@1229 44 virtual piper_vamp::PluginStaticData getPluginStaticData(QString identifier) {
Chris@1229 45 return instance()->getPluginStaticData(identifier);
Chris@1229 46 }
Chris@1229 47
Chris@1229 48 /**
Chris@1229 49 * Instantiate (load) and return pointer to the plugin with the
Chris@1229 50 * given identifier, at the given sample rate. We don't set
Chris@1229 51 * blockSize or channels on this -- they're negotiated and handled
Chris@1229 52 * via initialize() on the plugin itself after loading.
Chris@1229 53 */
Chris@1229 54 virtual Vamp::Plugin *instantiatePlugin(QString identifier,
Chris@1229 55 sv_samplerate_t inputSampleRate) {
Chris@1229 56 return instance()->instantiatePlugin(identifier, inputSampleRate);
Chris@1229 57 }
Chris@1229 58
Chris@1229 59 /**
Chris@1229 60 * Get category metadata about a plugin (without instantiating it).
Chris@1229 61 */
Chris@1229 62 virtual QString getPluginCategory(QString identifier) {
Chris@1229 63 return instance()->getPluginCategory(identifier);
Chris@1229 64 }
Chris@1229 65 };
Chris@1229 66
Chris@1229 67 #endif