refactor(zed): remove extracted offline helper tooling
Drop the offline ZED helper implementations that were moved into zed-offline-tools.\n\nThis removes the standalone conversion binaries, batch/index/inspection scripts, related configs and tests, and the tool-specific support code that no longer belongs in cvmmap-streamer.\n\nThe build files and docs are updated to point at the standalone repo while keeping the streamer runtime surface intact.
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
namespace cvmmap_streamer::zed_tools {
|
||||
|
||||
[[nodiscard]]
|
||||
bool stderr_supports_progress_bar();
|
||||
|
||||
class ProgressBar {
|
||||
public:
|
||||
explicit ProgressBar(std::uint64_t total_frames);
|
||||
~ProgressBar();
|
||||
|
||||
[[nodiscard]]
|
||||
bool enabled() const;
|
||||
|
||||
void update(std::uint64_t completed_frames);
|
||||
void update_fraction(double fraction, std::string_view detail = {});
|
||||
void finish(std::uint64_t completed_frames, bool success);
|
||||
void finish_fraction(double fraction, bool success, std::string_view detail = {});
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl_{};
|
||||
};
|
||||
|
||||
} // namespace cvmmap_streamer::zed_tools
|
||||
@@ -1,104 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "cvmmap_streamer/config/runtime_config.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace cvmmap_streamer::zed_tools {
|
||||
|
||||
using cvmmap_streamer::CodecType;
|
||||
using cvmmap_streamer::EncoderDeviceType;
|
||||
|
||||
inline constexpr std::uint32_t kDefaultGopSize = 30;
|
||||
inline constexpr std::uint32_t kDefaultBFrames = 0;
|
||||
inline constexpr int kDefaultQuality = 23;
|
||||
inline constexpr std::uint64_t kNanosPerSecond = 1'000'000'000ull;
|
||||
|
||||
enum class PresetKind : std::uint8_t {
|
||||
Fast,
|
||||
Balanced,
|
||||
Quality,
|
||||
};
|
||||
|
||||
enum class TuneKind : std::uint8_t {
|
||||
LowLatency,
|
||||
Balanced,
|
||||
};
|
||||
|
||||
struct EncodeTuning {
|
||||
PresetKind preset{PresetKind::Fast};
|
||||
TuneKind tune{TuneKind::LowLatency};
|
||||
int quality{kDefaultQuality};
|
||||
std::uint32_t gop{kDefaultGopSize};
|
||||
std::uint32_t b_frames{kDefaultBFrames};
|
||||
};
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<CodecType, std::string> parse_codec(std::string_view raw);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<EncoderDeviceType, std::string> parse_encoder_device(std::string_view raw);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<PresetKind, std::string> parse_preset(std::string_view raw);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<TuneKind, std::string> parse_tune(std::string_view raw);
|
||||
|
||||
[[nodiscard]]
|
||||
std::string_view codec_name(CodecType codec);
|
||||
|
||||
[[nodiscard]]
|
||||
std::string_view preset_name(PresetKind preset);
|
||||
|
||||
[[nodiscard]]
|
||||
std::string_view tune_name(TuneKind tune);
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint64_t frame_period_ns(float fps);
|
||||
|
||||
[[nodiscard]]
|
||||
std::filesystem::path derive_output_path(const std::filesystem::path &input_path);
|
||||
|
||||
class Mp4Writer {
|
||||
public:
|
||||
Mp4Writer();
|
||||
Mp4Writer(const Mp4Writer &) = delete;
|
||||
Mp4Writer &operator=(const Mp4Writer &) = delete;
|
||||
Mp4Writer(Mp4Writer &&) noexcept;
|
||||
Mp4Writer &operator=(Mp4Writer &&) noexcept;
|
||||
~Mp4Writer();
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> open(
|
||||
const std::filesystem::path &output_path,
|
||||
CodecType codec,
|
||||
EncoderDeviceType encoder_device,
|
||||
std::uint32_t width,
|
||||
std::uint32_t height,
|
||||
float fps,
|
||||
const EncodeTuning &tuning);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_bgr_frame(
|
||||
const std::uint8_t *data,
|
||||
std::size_t row_stride_bytes,
|
||||
std::uint64_t relative_timestamp_ns);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> flush();
|
||||
|
||||
[[nodiscard]]
|
||||
bool using_hardware() const;
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl_{};
|
||||
};
|
||||
|
||||
} // namespace cvmmap_streamer::zed_tools
|
||||
Reference in New Issue
Block a user