PluginSummarisingAdapter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _VAMP_PLUGIN_SUMMARISING_ADAPTER_H_
00038 #define _VAMP_PLUGIN_SUMMARISING_ADAPTER_H_
00039
00040 #include "hostguard.h"
00041 #include "PluginWrapper.h"
00042
00043 #include <set>
00044
00045 _VAMP_SDK_HOSTSPACE_BEGIN(PluginSummarisingAdapter.h)
00046
00047 namespace Vamp {
00048
00049 namespace HostExt {
00050
00086 class PluginSummarisingAdapter : public PluginWrapper
00087 {
00088 public:
00094 PluginSummarisingAdapter(Plugin *plugin);
00095 virtual ~PluginSummarisingAdapter();
00096
00097 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
00098
00099 FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
00100 FeatureSet getRemainingFeatures();
00101
00102 typedef std::set<RealTime> SegmentBoundaries;
00103
00117 void setSummarySegmentBoundaries(const SegmentBoundaries &);
00118
00119 enum SummaryType {
00120 Minimum = 0,
00121 Maximum = 1,
00122 Mean = 2,
00123 Median = 3,
00124 Mode = 4,
00125 Sum = 5,
00126 Variance = 6,
00127 StandardDeviation = 7,
00128 Count = 8,
00129
00130 UnknownSummaryType = 999
00131 };
00132
00155 enum AveragingMethod {
00156 SampleAverage = 0,
00157 ContinuousTimeAverage = 1,
00158 };
00159
00168 FeatureList getSummaryForOutput(int output,
00169 SummaryType type,
00170 AveragingMethod method = SampleAverage);
00171
00181 FeatureSet getSummaryForAllOutputs(SummaryType type,
00182 AveragingMethod method = SampleAverage);
00183
00184 protected:
00185 class Impl;
00186 Impl *m_impl;
00187 };
00188
00189 }
00190
00191 }
00192
00193 _VAMP_SDK_HOSTSPACE_END(PluginSummarisingAdapter.h)
00194
00195 #endif