feat(record): add depth RVL recording to MCAP

This commit is contained in:
2026-03-11 21:15:25 +08:00
parent 782af9481c
commit 59ff8b79d9
15 changed files with 826 additions and 35 deletions
+19
View File
@@ -45,6 +45,12 @@ enum class PixelFormat : std::uint8_t {
YUYV,
};
enum class DepthUnit : std::uint8_t {
Unknown = 0,
Millimeter = 1,
Meter = 2,
};
enum class ModuleStatus : std::int32_t {
Online = 0xa1,
Offline = 0xa0,
@@ -57,6 +63,7 @@ enum class ParseError {
InvalidMagic,
UnsupportedVersion,
InvalidDepth,
InvalidDepthUnit,
InvalidPixelFormat,
InvalidModuleStatus,
PayloadLengthMismatch,
@@ -155,11 +162,23 @@ struct ControlResponseMessage {
struct ValidatedShmView {
FrameMetadata metadata;
DepthUnit depth_unit{DepthUnit::Unknown};
std::span<const std::uint8_t> payload;
std::span<const std::uint8_t> left;
std::optional<FrameInfo> depth_info{};
std::span<const std::uint8_t> depth{};
std::optional<FrameInfo> confidence_info{};
std::span<const std::uint8_t> confidence{};
};
struct CoherentSnapshot {
FrameMetadata metadata;
DepthUnit depth_unit{DepthUnit::Unknown};
std::span<const std::uint8_t> left;
std::optional<FrameInfo> depth_info{};
std::span<const std::uint8_t> depth{};
std::optional<FrameInfo> confidence_info{};
std::span<const std::uint8_t> confidence{};
std::size_t bytes_copied;
};