feat: implement thread-safe image saving with mutex and update save logic

This commit is contained in:
ob-yalian
2026-08-20 17:12:20 +08:00
parent 54d29f15d8
commit ada0122f98
3 changed files with 22 additions and 8 deletions
@@ -809,6 +809,7 @@ class OBCameraNode {
std::unique_ptr<D2CViewer> d2c_viewer_ = nullptr;
std::map<stream_index_pair, std::atomic_bool> save_images_;
std::map<stream_index_pair, int> save_images_count_;
std::mutex save_images_mutex_;
int max_save_images_count_ = 10;
std::atomic_bool save_point_cloud_{false};
std::atomic_bool save_colored_point_cloud_{false};