diff --git a/example2_two_sensor_pipeline.py b/example2_two_sensor_pipeline.py index 082cc2d..75dc749 100644 --- a/example2_two_sensor_pipeline.py +++ b/example2_two_sensor_pipeline.py @@ -113,6 +113,7 @@ def main(): # ========================================================================= # 1. 配置多个传感器 # ========================================================================= + num_sensors = 2 sensor_configs = [ { 'vid_src': './s1.mp4', @@ -127,7 +128,7 @@ def main(): # ========================================================================= # 2. 创建进程间通信对象 # ========================================================================= - result_queues = [Queue(maxsize=2) for _ in sensor_configs] # 每个传感器一个队列 + result_queues = [Queue(maxsize=num_sensors) for _ in sensor_configs] # 每个传感器一个队列 stop_events = [mp.Event() for _ in sensor_configs] # 停止事件 # =========================================================================