The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/dai, st/gui, t/common: Make DepthAI frameserver work with multicam sinks

+18 -18
+5 -5
src/xrt/drivers/depthai/depthai_driver.cpp
··· 894 894 struct depthai_fs *depthai = depthai_fs(xfs); 895 895 DEPTHAI_DEBUG(depthai, "DepthAI: SLAM stream start called"); 896 896 897 - depthai->sink[0] = nullptr; // 0 == CamA-4L / RGB 898 - depthai->sink[1] = sinks->left; // 1 == CamB-2L / Left Gray 899 - depthai->sink[2] = sinks->right; // 2 == CamC-2L / Right Gray 900 - depthai->sink[3] = nullptr; // 3 == CamD-4L 901 - if (depthai->want_cameras && sinks->left != NULL && sinks->right != NULL) { 897 + depthai->sink[0] = nullptr; // 0 == CamA-4L / RGB 898 + depthai->sink[1] = sinks->cams[0]; // 1 == CamB-2L / Left Gray 899 + depthai->sink[2] = sinks->cams[1]; // 2 == CamC-2L / Right Gray 900 + depthai->sink[3] = nullptr; // 3 == CamD-4L 901 + if (depthai->want_cameras && sinks->cams[0] != NULL && sinks->cams[1] != NULL) { 902 902 os_thread_helper_start(&depthai->image_thread, depthai_mainloop, depthai); 903 903 } 904 904 if (depthai->want_imu && sinks->imu != NULL) {
+4 -4
src/xrt/state_trackers/gui/gui_scene_hand_tracking_demo.c
··· 94 94 struct xrt_slam_sinks gen_lock = {0}; 95 95 u_sink_force_genlock_create( // 96 96 &usysd->xfctx, // 97 - hand_sinks->left, // 98 - hand_sinks->right, // 99 - &gen_lock.left, // 100 - &gen_lock.right); // 97 + hand_sinks->cams[0], // 98 + hand_sinks->cams[1], // 99 + &gen_lock.cams[0], // 100 + &gen_lock.cams[1]); // 101 101 102 102 xrt_fs_slam_stream_start(the_fs, &gen_lock); 103 103
+1 -1
src/xrt/state_trackers/gui/gui_scene_record.c
··· 224 224 struct xrt_frame_sink *tmp = &cw->base.sink; 225 225 226 226 struct xrt_slam_sinks sinks; 227 - u_sink_combiner_create(&cw->camera.xfctx, tmp, &sinks.left, &sinks.right); 227 + u_sink_combiner_create(&cw->camera.xfctx, tmp, &sinks.cams[0], &sinks.cams[1]); 228 228 229 229 // Now that we have setup a node graph, start it. 230 230 xrt_fs_slam_stream_start(cw->camera.xfs, &sinks);
+8 -8
src/xrt/targets/common/target_builder_north_star.c
··· 313 313 struct xrt_frame_sink *entry_right_sink = NULL; 314 314 315 315 #ifdef XRT_BUILD_DRIVER_HANDTRACKING 316 - u_sink_split_create(&usysd->xfctx, slam_sinks->left, hand_sinks->left, &entry_left_sink); 317 - u_sink_split_create(&usysd->xfctx, slam_sinks->right, hand_sinks->right, &entry_right_sink); 316 + u_sink_split_create(&usysd->xfctx, slam_sinks->cams[0], hand_sinks->cams[0], &entry_left_sink); 317 + u_sink_split_create(&usysd->xfctx, slam_sinks->cams[1], hand_sinks->cams[1], &entry_right_sink); 318 318 #else 319 - entry_left_sink = slam_sinks->left; 320 - entry_right_sink = slam_sinks->right; 319 + entry_left_sink = slam_sinks->cams[0]; 320 + entry_right_sink = slam_sinks->cams[1]; 321 321 #endif 322 322 323 323 entry_sinks = (struct xrt_slam_sinks){ 324 - .left = entry_left_sink, 325 - .right = entry_right_sink, 324 + .cams[0] = entry_left_sink, 325 + .cams[1] = entry_right_sink, 326 326 .imu = slam_sinks->imu, 327 327 .gt = slam_sinks->gt, 328 328 }; ··· 330 330 struct xrt_slam_sinks dummy_slam_sinks = {0}; 331 331 dummy_slam_sinks.imu = entry_sinks.imu; 332 332 333 - u_sink_force_genlock_create(&usysd->xfctx, entry_sinks.left, entry_sinks.right, &dummy_slam_sinks.left, 334 - &dummy_slam_sinks.right); 333 + u_sink_force_genlock_create(&usysd->xfctx, entry_sinks.cams[0], entry_sinks.cams[1], &dummy_slam_sinks.cams[0], 334 + &dummy_slam_sinks.cams[1]); 335 335 336 336 xrt_fs_slam_stream_start(the_fs, &dummy_slam_sinks); 337 337