comparison vamp-hostsdk/PluginInputDomainAdapter.h @ 57:09a1aac6c362 host-factory-stuff

* add wrapper base * make loader able to look up categories
author cannam
date Wed, 09 May 2007 15:21:37 +0000
parents 4ab6224110ef
children
comparison
equal deleted inserted replaced
56:4ab6224110ef 57:09a1aac6c362
34 authorization. 34 authorization.
35 */ 35 */
36 36
37 #ifndef _PLUGIN_INPUT_DOMAIN_ADAPTER_H_ 37 #ifndef _PLUGIN_INPUT_DOMAIN_ADAPTER_H_
38 38
39 #include <vamp-sdk/Plugin.h> 39 #include "PluginWrapper.h"
40 40
41 namespace Vamp { 41 namespace Vamp {
42 42
43 /** 43 /**
44 * An adapter that converts time-domain input into frequency-domain 44 * An adapter that converts time-domain input into frequency-domain
60 //input policy selection. Probably this class and that one should 60 //input policy selection. Probably this class and that one should
61 //both inherit a PluginAdapter class which contains a plugin and 61 //both inherit a PluginAdapter class which contains a plugin and
62 //delegates all calls through to it; the subclass can then override 62 //delegates all calls through to it; the subclass can then override
63 //only the ones it needs to handle. 63 //only the ones it needs to handle.
64 64
65 class PluginInputDomainAdapter : public Plugin 65 class PluginInputDomainAdapter : public PluginWrapper
66 { 66 {
67 public: 67 public:
68 PluginInputDomainAdapter(Plugin *plugin); // I take ownership of plugin 68 PluginInputDomainAdapter(Plugin *plugin); // I take ownership of plugin
69 virtual ~PluginInputDomainAdapter(); 69 virtual ~PluginInputDomainAdapter();
70 70
71 bool initialise(size_t channels, size_t stepSize, size_t blockSize); 71 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
72 void reset();
73 72
74 InputDomain getInputDomain() const { return Plugin::TimeDomain; } 73 InputDomain getInputDomain() const;
75
76 unsigned int getVampApiVersion() const;
77 std::string getIdentifier() const;
78 std::string getName() const;
79 std::string getDescription() const;
80 std::string getMaker() const;
81 int getPluginVersion() const;
82 std::string getCopyright() const;
83
84 ParameterList getParameterDescriptors() const;
85 float getParameter(std::string) const;
86 void setParameter(std::string, float);
87
88 ProgramList getPrograms() const;
89 std::string getCurrentProgram() const;
90 void selectProgram(std::string);
91 74
92 size_t getPreferredStepSize() const; 75 size_t getPreferredStepSize() const;
93 size_t getPreferredBlockSize() const; 76 size_t getPreferredBlockSize() const;
94 77
95 size_t getMinChannelCount() const;
96 size_t getMaxChannelCount() const;
97
98 OutputList getOutputDescriptors() const;
99
100 FeatureSet process(const float *const *inputBuffers, RealTime timestamp); 78 FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
101
102 FeatureSet getRemainingFeatures();
103 79
104 protected: 80 protected:
105 Plugin *m_plugin; 81 Plugin *m_plugin;
106 size_t m_channels; 82 size_t m_channels;
107 size_t m_blockSize; 83 size_t m_blockSize;