Chris@18: Chris@18: package org.vamp_plugins; Chris@18: Chris@28: /** Chris@28: * Feature contains a single result returned from Plugin.process() or Chris@28: * Plugin.getRemainingFeatures(). Chris@28: */ Chris@18: public class Feature { Chris@28: /** Chris@28: * True if an output feature has its own timestamp. This is Chris@28: * mandatory if the output has VariableSampleRate, optional if Chris@28: * the output has FixedSampleRate, and unused if the output Chris@28: * has OneSamplePerStep. Chris@28: */ Chris@18: public boolean hasTimestamp; Chris@28: Chris@28: /** Chris@28: * Timestamp of the output feature. This is mandatory if the Chris@28: * output has VariableSampleRate or if the output has Chris@28: * FixedSampleRate and hasTimestamp is true, and unused Chris@28: * otherwise. Chris@28: */ Chris@18: public RealTime timestamp; Chris@28: Chris@28: /** Chris@28: * True if an output feature has a specified duration. This Chris@28: * is optional if the output has VariableSampleRate or Chris@28: * FixedSampleRate, and and unused if the output has Chris@28: * OneSamplePerStep. Chris@28: */ Chris@18: public boolean hasDuration; Chris@28: Chris@28: /** Chris@28: * Duration of the output feature. This is mandatory if the Chris@28: * output has VariableSampleRate or FixedSampleRate and Chris@28: * hasDuration is true, and unused otherwise. Chris@28: */ Chris@18: public RealTime duration; Chris@28: Chris@28: /** Chris@28: * Results for a single sample of this feature. If the output Chris@28: * hasFixedBinCount, there must be the same number of values Chris@28: * as the output's binCount count. Chris@28: */ Chris@18: public float[] values; Chris@28: Chris@28: /** Chris@28: * Label for the sample of this feature. Chris@28: */ Chris@18: public String label; Chris@28: Chris@18: Feature() { Chris@18: hasTimestamp = false; hasDuration = false; Chris@18: } Chris@18: }; Chris@18: