Add ArRecorder logic
This commit is contained in:
40
openVulkanoCpp/AR/Provider/Playback/ArSessionPlayback.hpp
Normal file
40
openVulkanoCpp/AR/Provider/Playback/ArSessionPlayback.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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]] ArSessionType GetSessionType() override { return ArSessionType::PLAYBACK; }
|
||||
|
||||
[[nodiscard]] ArType GetArType() override;
|
||||
|
||||
private:
|
||||
Math::Timestamp lastTimestamp;
|
||||
const std::string recordingPath;
|
||||
const bool autoAdvance;
|
||||
ArPlaybackReader playbackReader;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user