Fix issue with loading ArSessionMetadata
This commit is contained in:
@@ -83,7 +83,7 @@ namespace OpenVulkano::AR
|
||||
std::filesystem::exists(dirPath / RECORDING_METADATA_FILENAME);
|
||||
}
|
||||
|
||||
ArSessionMetadata::ArSessionMetadata(const std::filesystem::path& dirPath)
|
||||
ArSessionMetadata ArSessionMetadata::FromFile(const std::filesystem::path& dirPath)
|
||||
{
|
||||
std::optional<ArSessionMetadata> metaFromFile;
|
||||
if (!is_directory(dirPath)) throw std::runtime_error("Ar recording path must be a directory!");
|
||||
@@ -103,10 +103,8 @@ namespace OpenVulkano::AR
|
||||
metaFromFile = FromYaml(ymlInfoPath.string());
|
||||
}
|
||||
if (!metaFromFile) throw std::runtime_error("Ar recording dir is missing platform metadata file!");
|
||||
type = metaFromFile->type;
|
||||
depthFormat = metaFromFile->depthFormat;
|
||||
confidenceRange = metaFromFile->confidenceRange;
|
||||
playback = true;
|
||||
metaFromFile->playback = true;
|
||||
return *metaFromFile;
|
||||
}
|
||||
|
||||
std::string ArSessionMetadata::FinishedRecordingInfoToYaml() const
|
||||
|
||||
Reference in New Issue
Block a user