Mercurial > hg > vamp-plugin-sdk
comparison vamp/vamp.h @ 192:d4fbd4e6fdbf
* Add hasDuration to output descriptor as well as the features themselves
author | cannam |
---|---|
date | Thu, 18 Sep 2008 16:08:28 +0000 |
parents | 006a775133b1 |
children | 4ec736a36546 |
comparison
equal
deleted
inserted
replaced
191:d1bdcd4a226f | 192:d4fbd4e6fdbf |
---|---|
158 | 158 |
159 /** Sample rate of returned results, if sampleType is vampFixedSampleRate. | 159 /** Sample rate of returned results, if sampleType is vampFixedSampleRate. |
160 "Resolution" of result, if sampleType is vampVariableSampleRate. */ | 160 "Resolution" of result, if sampleType is vampVariableSampleRate. */ |
161 float sampleRate; | 161 float sampleRate; |
162 | 162 |
163 /** 1 if the returned results for this output are known to have a | |
164 duration field. | |
165 | |
166 This field is new in Vamp API version 2; it must not be tested | |
167 for plugins that report an older API version in their plugin | |
168 descriptor. | |
169 */ | |
170 int hasDuration; | |
171 | |
163 } VampOutputDescriptor; | 172 } VampOutputDescriptor; |
164 | 173 |
165 typedef struct _VampFeature | 174 typedef struct _VampFeature |
166 { | 175 { |
167 /** 1 if the feature has a timestamp (i.e. if vampVariableSampleRate). */ | 176 /** 1 if the feature has a timestamp (i.e. if vampVariableSampleRate). */ |
212 | 221 |
213 /** Features in this feature list. May be NULL if featureCount is | 222 /** Features in this feature list. May be NULL if featureCount is |
214 zero. | 223 zero. |
215 | 224 |
216 If present, this array must contain featureCount feature | 225 If present, this array must contain featureCount feature |
217 structures for a Vamp 1.0 plugin, or 2*featureCount feature | 226 structures for a Vamp API version 1 plugin, or 2*featureCount |
218 unions for a Vamp 2.0 plugin. | 227 feature unions for a Vamp API version 2 plugin. |
219 | 228 |
220 The features returned by a Vamp 2.0 plugin must consist of the | 229 The features returned by an API version 2 plugin must consist |
221 same feature structures as in 1.0 for the first featureCount | 230 of the same feature structures as in API version 1 for the |
222 array elements, followed by featureCount unions that contain | 231 first featureCount array elements, followed by featureCount |
223 pointers to V2 feature structures (or NULL pointers if no V2 | 232 unions that contain VampFeatureV2 structures (or NULL pointers |
224 feature structures are present). | 233 if no V2 feature structures are present). |
225 */ | 234 */ |
226 VampFeatureUnion *features; | 235 VampFeatureUnion *features; |
227 | 236 |
228 } VampFeatureList; | 237 } VampFeatureList; |
229 | 238 |
320 /** Get a descriptor for a given feature output. Returned pointer | 329 /** Get a descriptor for a given feature output. Returned pointer |
321 is valid only until next call to getOutputDescriptor for this | 330 is valid only until next call to getOutputDescriptor for this |
322 handle, or releaseOutputDescriptor for this descriptor. Host | 331 handle, or releaseOutputDescriptor for this descriptor. Host |
323 must call releaseOutputDescriptor after use. */ | 332 must call releaseOutputDescriptor after use. */ |
324 VampOutputDescriptor *(*getOutputDescriptor)(VampPluginHandle, | 333 VampOutputDescriptor *(*getOutputDescriptor)(VampPluginHandle, |
325 unsigned int); | 334 unsigned int); |
326 | 335 |
327 /** Destroy a descriptor for a feature output. */ | 336 /** Destroy a descriptor for a feature output. */ |
328 void (*releaseOutputDescriptor)(VampOutputDescriptor *); | 337 void (*releaseOutputDescriptor)(VampOutputDescriptor *); |
329 | 338 |
330 /** Process an input block and return a set of features. Returned | 339 /** Process an input block and return a set of features. Returned |