#pragma once #include #include #include 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_{}; }; } // namespace cvmmap_streamer::zed_tools