Mercurial > hg > svcore
comparison rdf/RDFExporter.cpp @ 1649:1cc9a0d4b1b6 single-point
Update RegionModel following NoteModel, er, model. They have quite a bit in common that we should now pull out some of
author | Chris Cannam |
---|---|
date | Fri, 15 Mar 2019 14:23:50 +0000 |
parents | 513192aa9b03 |
children | 7a56bb85030f |
comparison
equal
deleted
inserted
replaced
1648:86bbccb79c9b | 1649:1cc9a0d4b1b6 |
---|---|
83 { | 83 { |
84 RegionModel *m = dynamic_cast<RegionModel *>(m_model); | 84 RegionModel *m = dynamic_cast<RegionModel *>(m_model); |
85 if (m) { | 85 if (m) { |
86 f.hasTimestamp = true; | 86 f.hasTimestamp = true; |
87 f.hasDuration = true; | 87 f.hasDuration = true; |
88 const RegionModel::PointList &pl(m->getPoints()); | 88 EventVector ee(m->getAllEvents()); |
89 for (RegionModel::PointList::const_iterator i = pl.begin(); | 89 for (auto e: ee) { |
90 i != pl.end(); ++i) { | 90 f.timestamp = RealTime::frame2RealTime(e.getFrame(), sr).toVampRealTime(); |
91 f.timestamp = RealTime::frame2RealTime(i->frame, sr).toVampRealTime(); | 91 f.duration = RealTime::frame2RealTime(e.getDuration(), sr).toVampRealTime(); |
92 f.duration = RealTime::frame2RealTime(i->duration, sr).toVampRealTime(); | |
93 f.values.clear(); | 92 f.values.clear(); |
94 f.values.push_back(i->value); | 93 f.values.push_back(e.getValue()); |
95 f.label = i->label.toStdString(); | 94 f.label = e.getLabel().toStdString(); |
96 m_fw->write(trackId, transform, output, features, summaryType); | 95 m_fw->write(trackId, transform, output, features, summaryType); |
97 } | 96 } |
98 return; | 97 return; |
99 } | 98 } |
100 } | 99 } |