feat(record): add depth RVL recording to MCAP
This commit is contained in:
@@ -2,13 +2,30 @@
|
||||
|
||||
#include "cvmmap_streamer/config/runtime_config.hpp"
|
||||
#include "cvmmap_streamer/encode/encoded_access_unit.hpp"
|
||||
#include "cvmmap_streamer/ipc/contracts.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace cvmmap_streamer::record {
|
||||
|
||||
enum class DepthEncoding {
|
||||
RvlU16Lossless,
|
||||
RvlF32,
|
||||
};
|
||||
|
||||
struct RawDepthMapView {
|
||||
std::uint64_t timestamp_ns{0};
|
||||
std::uint32_t width{0};
|
||||
std::uint32_t height{0};
|
||||
ipc::DepthUnit source_unit{ipc::DepthUnit::Unknown};
|
||||
std::span<const float> pixels{};
|
||||
};
|
||||
|
||||
class McapRecordSink {
|
||||
public:
|
||||
McapRecordSink() = default;
|
||||
@@ -31,6 +48,9 @@ public:
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_access_unit(const encode::EncodedAccessUnit &access_unit);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_depth_map(const RawDepthMapView &depth_map);
|
||||
|
||||
[[nodiscard]]
|
||||
bool is_open() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user