Add front camera field to ar recording
This commit is contained in:
@@ -61,7 +61,7 @@ namespace OpenVulkano::AR
|
||||
Math::Range<uint8_t>(meta["MinConfidence"].as<uint8_t>(), meta["MaxConfidence"].as<uint8_t>()),
|
||||
meta["Resolution"].as<Math::Vector2ui>(), meta["FrameRate"].as<float>(60),
|
||||
meta["Device"].as<std::string>("Unknown"), meta["OS"].as<std::string>("Unknown"),
|
||||
meta["Version"].as<uint32_t>(2)
|
||||
meta["Version"].as<uint32_t>(3)
|
||||
};
|
||||
|
||||
auto recNode = meta["Recording"];
|
||||
@@ -71,6 +71,7 @@ namespace OpenVulkano::AR
|
||||
metadata.recFrameCount = recNode["FrameCount"].as<int64_t>(-1);
|
||||
metadata.recSkippedFrames = recNode["SkippedFrames"].as<int32_t>(-1);
|
||||
}
|
||||
metadata.frontSensor = meta["FrontSensor"].as<bool>(false);
|
||||
|
||||
return metadata;
|
||||
}
|
||||
@@ -108,23 +109,6 @@ namespace OpenVulkano::AR
|
||||
playback = true;
|
||||
}
|
||||
|
||||
std::string ArSessionMetadata::ToXML() const
|
||||
{
|
||||
return fmt::format(R"(<arPlatformInfo>
|
||||
<type>{}</type>
|
||||
<minConfidence>{}</minConfidence>
|
||||
<maxConfidence>{}</maxConfidence>
|
||||
<depthType>{}</depthType>
|
||||
<imageResolution><width>{}</width><height>{}</height></imageResolution>
|
||||
<frameRate>{}</frameRate>
|
||||
<device>{}</device>
|
||||
<os>{}</os>
|
||||
<version>{}</version>
|
||||
</arPlatformInfo>)",
|
||||
type.GetHumanReadableName(), static_cast<int>(confidenceRange.min), static_cast<int>(confidenceRange.max),
|
||||
depthFormat.GetAltName(), imageResolution.x, imageResolution.y, frameRate, device, os, version);
|
||||
}
|
||||
|
||||
std::string ArSessionMetadata::FinishedRecordingInfoToYaml() const
|
||||
{
|
||||
if (recFrameCount < 1 && recDuration < 1 && recSkippedFrames < 1) return "";
|
||||
@@ -146,10 +130,11 @@ Resolution: '({},{})'
|
||||
FrameRate: {}
|
||||
Device: {}
|
||||
OS: {}
|
||||
FrontSensor: {}
|
||||
Version: {}
|
||||
{}
|
||||
)",
|
||||
type.GetName(), depthFormat.GetName(), static_cast<int>(confidenceRange.min), static_cast<int>(confidenceRange.max),
|
||||
imageResolution.x, imageResolution.y, frameRate, device, os, version, FinishedRecordingInfoToYaml());
|
||||
imageResolution.x, imageResolution.y, frameRate, device, os, frontSensor, version, FinishedRecordingInfoToYaml());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user