comparison rdf/RDFExporter.cpp @ 1651:7a56bb85030f single-point

Introduce deferred notifier, + start converting sparse time-value model (perhaps we should rename it too)
author Chris Cannam
date Mon, 18 Mar 2019 14:17:20 +0000
parents 1cc9a0d4b1b6
children 5b7b01da430a
comparison
equal deleted inserted replaced
1650:bbfb5a1e4b84 1651:7a56bb85030f
134 { 134 {
135 SparseTimeValueModel *m = dynamic_cast<SparseTimeValueModel *>(m_model); 135 SparseTimeValueModel *m = dynamic_cast<SparseTimeValueModel *>(m_model);
136 if (m) { 136 if (m) {
137 f.hasTimestamp = true; 137 f.hasTimestamp = true;
138 f.hasDuration = false; 138 f.hasDuration = false;
139 const SparseTimeValueModel::PointList &pl(m->getPoints()); 139 EventVector ee(m->getAllEvents());
140 for (SparseTimeValueModel::PointList::const_iterator i = pl.begin(); 140 for (auto e: ee) {
141 i != pl.end(); ++i) { 141 f.timestamp = RealTime::frame2RealTime(e.getFrame(), sr).toVampRealTime();
142 f.timestamp = RealTime::frame2RealTime(i->frame, sr).toVampRealTime();
143 f.values.clear(); 142 f.values.clear();
144 f.values.push_back(i->value); 143 f.values.push_back(e.getValue());
145 f.label = i->label.toStdString(); 144 f.label = e.getLabel().toStdString();
146 m_fw->write(trackId, transform, output, features, summaryType); 145 m_fw->write(trackId, transform, output, features, summaryType);
147 } 146 }
148 return; 147 return;
149 } 148 }
150 } 149 }