Use constant for AR metadata file
This commit is contained in:
@@ -25,6 +25,8 @@ namespace openVulkanoCpp::AR
|
||||
{
|
||||
namespace
|
||||
{
|
||||
constexpr std::string_view RECORDING_METADATA_FILENAME = "ArRecording.xml";
|
||||
|
||||
std::filesystem::path GeneratePath(const std::filesystem::path& baseDir, std::string_view name)
|
||||
{
|
||||
std::stringstream ss;
|
||||
@@ -164,7 +166,7 @@ namespace openVulkanoCpp::AR
|
||||
m_metadataWriter = std::make_unique<MultiPartArchiveWriter>(m_settings.path, "meta_{:05d}.tar.gz", ArchiveConfig::TAR_GZ, m_settings.archiveSize, true);
|
||||
m_highResWriter = std::make_unique<MultiPartArchiveWriter>(m_settings.path, "highres_{:05d}.tar", ArchiveConfig::TAR, m_settings.archiveSize, true);
|
||||
|
||||
std::ofstream platformInfoStream(m_settings.path / "ArRecording.xml");
|
||||
std::ofstream platformInfoStream(m_settings.path / RECORDING_METADATA_FILENAME);
|
||||
platformInfoStream << m_session->GetSessionMetadata().ToXML();
|
||||
platformInfoStream.close();
|
||||
}
|
||||
@@ -189,8 +191,8 @@ namespace openVulkanoCpp::AR
|
||||
{
|
||||
if (writer) writer->Move(path);
|
||||
}
|
||||
if (std::filesystem::exists(m_settings.path / "ArRecording.xml"))
|
||||
std::filesystem::rename(m_settings.path / "ArRecording.xml", path + "/ArRecording.xml");
|
||||
if (std::filesystem::exists(m_settings.path / RECORDING_METADATA_FILENAME))
|
||||
std::filesystem::rename(m_settings.path / RECORDING_METADATA_FILENAME, path + "/" + RECORDING_METADATA_FILENAME);
|
||||
}
|
||||
|
||||
m_persistent = true;
|
||||
|
||||
Reference in New Issue
Block a user