Mercurial > hg > m4-sa
annotate runner/DefaultFeatureWriter.h @ 24:18c42fbc1335
* Various fixes: ensure CSV feature writer closes files when finished with
(rather than at end of run) to avoid running out of fds; bail properly
with an exception with CSV writer can't write to output file; and other
minor things
| author | Chris Cannam |
|---|---|
| date | Tue, 08 Sep 2009 16:51:24 +0000 |
| parents | 92911f967a16 |
| children |
| rev | line source |
|---|---|
| Chris@0 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
| Chris@0 | 2 |
| Chris@0 | 3 /* |
| Chris@0 | 4 Sonic Annotator |
| Chris@0 | 5 A utility for batch feature extraction from audio files. |
| Chris@0 | 6 Mark Levy, Chris Sutton and Chris Cannam, Queen Mary, University of London. |
| Chris@0 | 7 Copyright 2007-2008 QMUL. |
| Chris@0 | 8 |
| Chris@0 | 9 This program is free software; you can redistribute it and/or |
| Chris@0 | 10 modify it under the terms of the GNU General Public License as |
| Chris@0 | 11 published by the Free Software Foundation; either version 2 of the |
| Chris@0 | 12 License, or (at your option) any later version. See the file |
| Chris@0 | 13 COPYING included with this distribution for more information. |
| Chris@0 | 14 */ |
| Chris@0 | 15 |
| Chris@0 | 16 #ifndef _DEFAULT_FEATURE_WRITER_H_ |
| Chris@0 | 17 #define _DEFAULT_FEATURE_WRITER_H_ |
| Chris@0 | 18 |
| Chris@0 | 19 |
| Chris@0 | 20 #include "transform/FeatureWriter.h" |
| Chris@0 | 21 |
| Chris@0 | 22 class DefaultFeatureWriter : public FeatureWriter |
| Chris@0 | 23 { |
| Chris@0 | 24 public: |
| Chris@0 | 25 virtual ~DefaultFeatureWriter() { } |
| Chris@0 | 26 virtual void write(QString trackid, |
| Chris@0 | 27 const Transform &transform, |
| Chris@0 | 28 const Vamp::Plugin::OutputDescriptor &output, |
| Chris@0 | 29 const Vamp::Plugin::FeatureList &features, |
| Chris@0 | 30 std::string summaryType = ""); |
| Chris@0 | 31 virtual void finish() { } |
| Chris@24 | 32 virtual QString getWriterTag() const { return "default"; } |
| Chris@0 | 33 }; |
| Chris@0 | 34 |
| Chris@0 | 35 #endif |
