Expose internal ar playback reader

This commit is contained in:
Georg Hagen
2025-02-18 20:56:04 +01:00
parent b644a200ce
commit 1522009cba
3 changed files with 6 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ namespace OpenVulkano::AR::Playback
void ArPlaybackReader::ReadColorImage(ColorImg& img)
{
//BlockProfiler profiler("Load jpeg");
auto file = m_archiveColor.GetNextFile();
std::optional<std::pair<FileDescription, Array<char>>> file = ReadColorImageRaw();
long unsigned int jpegSize = file->second.Size();
unsigned char* compressedImage = reinterpret_cast<uint8_t*>(file->second.Data());

View File

@@ -75,6 +75,8 @@ namespace OpenVulkano::AR::Playback
return img;
}
std::optional<std::pair<FileDescription, Array<char>>> ReadColorImageRaw() { return m_archiveColor.GetNextFile(); }
void ReadColorImage(ColorImg& img);
DepthImage ReadDepthImage()

View File

@@ -36,6 +36,8 @@ class ArSessionPlayback final : public ArSession, public std::enable_shared_from
[[nodiscard]] bool IsLoadColorEnabled() const { return loadImages; }
[[nodiscard]] bool IsLoadDepthEnabled() const { return loadDepth; }
[[nodiscard]] const ArPlaybackReader& GetInternalReader() const { return playbackReader; }
void SetRenderer(IRenderer* renderer) override;
Event<double> OnPlaybackProgress;