|
@@ -161,13 +161,15 @@ class Coordinator:
|
|
|
else:
|
|
else:
|
|
|
print("PTZ 球机功能已禁用")
|
|
print("PTZ 球机功能已禁用")
|
|
|
|
|
|
|
|
- # 启动视频流
|
|
|
|
|
- if not self.panorama.start_stream():
|
|
|
|
|
- print("启动视频流失败")
|
|
|
|
|
- self.panorama.disconnect()
|
|
|
|
|
- if self.enable_ptz_camera:
|
|
|
|
|
- self.ptz.disconnect()
|
|
|
|
|
- return False
|
|
|
|
|
|
|
+ # 启动视频流(优先RTSP,SDK回调不可用时回退)
|
|
|
|
|
+ if not self.panorama.start_stream_rtsp():
|
|
|
|
|
+ print("RTSP视频流启动失败,尝试SDK方式...")
|
|
|
|
|
+ if not self.panorama.start_stream():
|
|
|
|
|
+ print("启动视频流失败")
|
|
|
|
|
+ self.panorama.disconnect()
|
|
|
|
|
+ if self.enable_ptz_camera:
|
|
|
|
|
+ self.ptz.disconnect()
|
|
|
|
|
+ return False
|
|
|
|
|
|
|
|
# 启动联动线程
|
|
# 启动联动线程
|
|
|
self.running = True
|
|
self.running = True
|