Files
cvmmap-streamer/include/cvmmap_streamer/tools/zed_progress_bar.hpp
T
crosstyan 7808b89a03 feat: support bundled frame-window offsets in zed_svo_to_mcap
Implement bundled multi-camera --start-frame semantics as synced-group\nindices from the common synced start, inclusive with --end-frame.\n\nUpdate zed_svo_to_mcap to skip synced groups before writing, keep\nsingle-camera raw SVO frame semantics unchanged, and adjust exact\nprogress totals for selected bundled windows.\n\nReplace the expensive bundled exact pre-count path with approximate\ntime-window progress when --end-frame is not set, and update the\nshared TTY progress bar helper to support fraction-based rendering.\n\nExpose --start-frame in the batch MCAP wrapper and document the\nbundled frame-window semantics and approximate progress behavior in\nthe README.
2026-03-24 16:01:46 +08:00

31 lines
666 B
C++

#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