feat: add shared TTY progress bars for ZED offline tools

Extract the tqdm-like stderr progress bar into a shared helper and reuse it across zed_svo_to_mp4, zed_svo_grid_to_mp4, and zed_svo_to_mcap.

For zed_svo_to_mcap, single-source exports now report exact frame totals and bundled multi-camera exports report exact synced-group totals on TTY. When bundled mode runs without --end-frame, the tool performs a counting pass first so the progress total remains exact instead of estimated.

Also document the bundled MCAP progress behavior in the README and record the current third_party dependency state in third_party/README. That note now makes it explicit that CLI11 and proxy are the active submodules, while tomlplusplus and mcap are vendored source drops, and adds a TODO to revisit converting mcap into a submodule later.

Verified with the Debug build during implementation, including single-camera and bundled zed_svo_to_mcap runs that rendered clean progress output to a TTY.
This commit is contained in:
2026-03-20 10:19:19 +00:00
parent 039379f5fe
commit 1369f5235d
10 changed files with 307 additions and 135 deletions
@@ -0,0 +1,27 @@
#pragma once
#include <cstdint>
#include <memory>
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 finish(std::uint64_t completed_frames, bool success);
private:
struct Impl;
std::unique_ptr<Impl> impl_{};
};
} // namespace cvmmap_streamer::zed_tools