Mercurial > hg > svcore
diff transform/FeatureWriter.h @ 625:608b4dc5ff34
* Improve behaviour when output file write fails (i.e. fail earlier)
author | Chris Cannam |
---|---|
date | Fri, 21 May 2010 10:21:18 +0000 |
parents | 4541581067f3 |
children | 06579b8ffb7b |
line wrap: on
line diff
--- a/transform/FeatureWriter.h Fri May 21 10:20:52 2010 +0000 +++ b/transform/FeatureWriter.h Fri May 21 10:21:18 2010 +0000 @@ -85,6 +85,16 @@ const Vamp::Plugin::FeatureList &features, std::string summaryType = "") = 0; + /** + * Throw FailedToOpenOutputStream if we can already tell that we + * will be unable to write to the output file. This is called to + * test the output stream before processing begins. The writer + * may legitimately succeed here but still fail later -- this is + * really an optimisation to ensure that easy-to-recognise failure + * cases fail early. + */ + virtual void testOutputFile(QString trackId, TransformId transformId) { } + virtual void flush() { } // whatever the last stream was virtual void finish() = 0;