changeset 176:59abb58b1855

TransformId is not sufficient -- it could be ambiguous (same transform id, different parameters etc). Use the whole transform
author Chris Cannam
date Wed, 15 Oct 2014 17:02:48 +0100
parents 977b7007071f
children 795d67a5e266
files .hgsubstate runner/LabFeatureWriter.cpp runner/LabFeatureWriter.h
diffstat 3 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Wed Oct 15 16:58:00 2014 +0100
+++ b/.hgsubstate	Wed Oct 15 17:02:48 2014 +0100
@@ -1,3 +1,3 @@
 d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay
 879bdc878826bebec67130326f99397c430419b1 sv-dependency-builds
-6b2a8b34e9d3d9a573af2ae303f33362e4c17784 svcore
+d954e03274e84ecfa1d1e6a4600e96497d5ad53d svcore
--- a/runner/LabFeatureWriter.cpp	Wed Oct 15 16:58:00 2014 +0100
+++ b/runner/LabFeatureWriter.cpp	Wed Oct 15 17:02:48 2014 +0100
@@ -96,7 +96,7 @@
 
     if (n == 0) return;
 
-    TrackTransformPair tt(trackId, transformId);
+    DataId tt(trackId, transform);
 
     if (m_pending.find(tt) != m_pending.end()) {
         writeFeature(stream, m_pending[tt], &features[0]);
@@ -119,11 +119,11 @@
 {
     for (PendingFeatures::const_iterator i = m_pending.begin();
          i != m_pending.end(); ++i) {
-        TrackTransformPair tt = i->first;
+        DataId tt = i->first;
         Plugin::Feature f = i->second;
-        QTextStream *sptr = getOutputStream(tt.first, tt.second);
+        QTextStream *sptr = getOutputStream(tt.first, tt.second.getIdentifier());
         if (!sptr) {
-            throw FailedToOpenOutputStream(tt.first, tt.second);
+            throw FailedToOpenOutputStream(tt.first, tt.second.getIdentifier());
         }
         QTextStream &stream = *sptr;
         // final feature has its own time as end time (we can't
--- a/runner/LabFeatureWriter.h	Wed Oct 15 16:58:00 2014 +0100
+++ b/runner/LabFeatureWriter.h	Wed Oct 15 17:02:48 2014 +0100
@@ -57,8 +57,9 @@
 
 private:
     bool m_forceEnd;
-    
-    typedef map<TrackTransformPair, Vamp::Plugin::Feature> PendingFeatures;
+
+    typedef pair<QString, Transform> DataId; // track id, transform
+    typedef map<DataId, Vamp::Plugin::Feature> PendingFeatures;
     PendingFeatures m_pending;
 
     void writeFeature(QTextStream &,