feat(streamer): add ffmpeg encoder and mcap recording
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "cvmmap_streamer/config/runtime_config.hpp"
|
||||
#include "cvmmap_streamer/encode/encoded_access_unit.hpp"
|
||||
|
||||
#include <expected>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace cvmmap_streamer::record {
|
||||
|
||||
class McapRecordSink {
|
||||
public:
|
||||
McapRecordSink() = default;
|
||||
~McapRecordSink();
|
||||
|
||||
McapRecordSink(const McapRecordSink &) = delete;
|
||||
McapRecordSink &operator=(const McapRecordSink &) = delete;
|
||||
|
||||
McapRecordSink(McapRecordSink &&other) noexcept;
|
||||
McapRecordSink &operator=(McapRecordSink &&other) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
static std::expected<McapRecordSink, std::string> create(const RuntimeConfig &config);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_access_unit(const encode::EncodedAccessUnit &access_unit);
|
||||
|
||||
[[nodiscard]]
|
||||
bool is_open() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::string_view path() const;
|
||||
|
||||
void close();
|
||||
|
||||
private:
|
||||
struct State;
|
||||
State *state_{nullptr};
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user