comparison plugin/FeatureExtractionPluginFactory.h @ 1830:5f8fbbde08ff audio-source-refactor

Use shared_ptr for plugin instances throughout
author Chris Cannam
date Fri, 20 Mar 2020 16:30:33 +0000
parents 91bb68146dfc
children
comparison
equal deleted inserted replaced
1829:51fd27fbce9a 1830:5f8fbbde08ff
22 22
23 #include "base/BaseTypes.h" 23 #include "base/BaseTypes.h"
24 24
25 #include <QString> 25 #include <QString>
26 26
27 #include <memory>
28
27 class FeatureExtractionPluginFactory 29 class FeatureExtractionPluginFactory
28 { 30 {
29 public: 31 public:
30 static FeatureExtractionPluginFactory *instance(); 32 static FeatureExtractionPluginFactory *instance();
31 33
45 * Instantiate (load) and return pointer to the plugin with the 47 * Instantiate (load) and return pointer to the plugin with the
46 * given identifier, at the given sample rate. We don't set 48 * given identifier, at the given sample rate. We don't set
47 * blockSize or channels on this -- they're negotiated and handled 49 * blockSize or channels on this -- they're negotiated and handled
48 * via initialize() on the plugin itself after loading. 50 * via initialize() on the plugin itself after loading.
49 */ 51 */
50 virtual Vamp::Plugin *instantiatePlugin(QString identifier, 52 virtual std::shared_ptr<Vamp::Plugin> instantiatePlugin(QString identifier,
51 sv_samplerate_t inputSampleRate) = 0; 53 sv_samplerate_t inputSampleRate) = 0;
52 54
53 /** 55 /**
54 * Get category metadata about a plugin (without instantiating it). 56 * Get category metadata about a plugin (without instantiating it).
55 */ 57 */
56 virtual QString getPluginCategory(QString identifier) = 0; 58 virtual QString getPluginCategory(QString identifier) = 0;