Improve playback reader

This commit is contained in:
Georg Hagen
2025-11-13 13:13:13 +01:00
parent 72733eb801
commit 357766f615

View File

@@ -59,9 +59,9 @@ namespace OpenVulkano::AR::Playback
m_hasConfidence = m_archiveConfidence.Open(recDir, ".*conf(idence)?" + extensions); m_hasConfidence = m_archiveConfidence.Open(recDir, ".*conf(idence)?" + extensions);
} }
int GetNextFrameId() int GetNextFrameId() const
{ {
std::string name = m_archiveMetadata.GetDescription().path; const std::string& name = m_archiveMetadata.GetDescription().path;
return std::stoi(name.substr(0, name.length() - 5)); return std::stoi(name.substr(0, name.length() - 5));
} }
@@ -87,6 +87,10 @@ namespace OpenVulkano::AR::Playback
std::optional<std::pair<FileDescription, Array<char>>> ReadColorImageRaw() { return m_archiveColor.GetNextFile(); } std::optional<std::pair<FileDescription, Array<char>>> ReadColorImageRaw() { return m_archiveColor.GetNextFile(); }
auto ReadDepthImageRaw() { return m_archiveDepth.GetNextFile(); }
auto ReadConfidenceRaw() { return m_archiveConfidence.GetNextFile(); }
DepthImage ReadDepthImage() DepthImage ReadDepthImage()
{ {
DepthImage img; DepthImage img;