comparison rdf/RDFExporter.cpp @ 1658:5b7b01da430a single-point

Start updating SparseOneDimensionalModel
author Chris Cannam
date Wed, 20 Mar 2019 16:22:13 +0000
parents 7a56bb85030f
children 353a2d15f213
comparison
equal deleted inserted replaced
1657:31b46a5647db 1658:5b7b01da430a
118 { 118 {
119 SparseOneDimensionalModel *m = dynamic_cast<SparseOneDimensionalModel *>(m_model); 119 SparseOneDimensionalModel *m = dynamic_cast<SparseOneDimensionalModel *>(m_model);
120 if (m) { 120 if (m) {
121 f.hasTimestamp = true; 121 f.hasTimestamp = true;
122 f.hasDuration = false; 122 f.hasDuration = false;
123 const SparseOneDimensionalModel::PointList &pl(m->getPoints()); 123 EventVector ee(m->getAllEvents());
124 for (SparseOneDimensionalModel::PointList::const_iterator i = pl.begin(); 124 for (auto e: ee) {
125 i != pl.end(); ++i) { 125 f.timestamp = RealTime::frame2RealTime(e.getFrame(), sr).toVampRealTime();
126 f.timestamp = RealTime::frame2RealTime(i->frame, sr).toVampRealTime();
127 f.values.clear(); 126 f.values.clear();
128 f.label = i->label.toStdString(); 127 f.label = e.getLabel().toStdString();
129 m_fw->write(trackId, transform, output, features, summaryType); 128 m_fw->write(trackId, transform, output, features, summaryType);
130 } 129 }
131 return; 130 return;
132 } 131 }
133 } 132 }