瀏覽代碼

Streamer supports variable image size.

jcsyshc 1 年之前
父節點
當前提交
e0b54febc2
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/impl/apps/remote_ar/remote_ar.cpp

+ 7 - 0
src/impl/apps/remote_ar/remote_ar.cpp

@@ -2,6 +2,10 @@
 #include "core/imgui_utility.hpp"
 #include "core/yaml_utility.hpp"
 
+#include <boost/asio/post.hpp>
+
+using boost::asio::post;
+
 app_remote_ar::app_remote_ar(const create_config &_conf) {
     conf = _conf.ext_conf;
     asio_ctx = _conf.asio_ctx;
@@ -103,6 +107,9 @@ app_remote_ar::app_remote_ar(const create_config &_conf) {
             .cuda_ctx = cuda_ctx, .stream = default_cuda_stream
     };
     out_streamer = std::make_unique<image_streamer>(streamer_conf);
+    out_streamer->sig_req_size.connect([this](auto size) {
+        post(*asio_ctx, [=, this] { stereo_aug->resize(size); });
+    });
 
     auto bg_viewer_conf = image_viewer::create_config{
             .mode = VIEW_STEREO, .flip_y = false,