Files
OpenVulkano/openVulkanoCpp/AR/Provider/Playback/ArSessionPlayback.h
2021-06-21 16:12:31 +02:00

43 lines
1.0 KiB
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "AR/ArSession.hpp"
#include "ArPlaybackReader.hpp"
#include "Math/Timestamp.hpp"
namespace openVulkanoCpp::AR::Playback
{
class ArSessionPlayback final : public ArSession, public std::enable_shared_from_this<ArSessionPlayback>
{
public:
ArSessionPlayback(const std::string& recordingPath, bool autoAdvance);
~ArSessionPlayback() override;
void Start() override;
void Stop() override;
void Pause() override;
[[nodiscard]] std::shared_ptr<ArFrame> GetFrame() override;
[[nodiscard]] ArRecorder* GetRecorder() override;
[[nodiscard]] ArSessionType GetSessionType() override { return ArSessionType::PLAYBACK; }
[[nodiscard]] ArType GetArType() override;
private:
Math::Timestamp lastTimestamp;
const std::string recordingPath;
const bool autoAdvance;
ArPlaybackReader playbackReader;
};
}