From 7e755f405dd1112a201b9dbde7e2d6cff8abc8f4 Mon Sep 17 00:00:00 2001 From: 648540858 <456panlinlin> Date: 星期五, 01 四月 2022 16:45:29 +0800 Subject: [PATCH] 支持国标移动位置订阅,收到新位置发送redis消息;支持通道redis消息拉起第三方推流;云台控制添加ControlPriority字段;处理sql的bug --- src/main/java/com/genersoft/iot/vmp/conf/runner/SipDeviceRunner.java | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/runner/SipDeviceRunner.java b/src/main/java/com/genersoft/iot/vmp/conf/runner/SipDeviceRunner.java index f944b11..2c2ea6d 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/runner/SipDeviceRunner.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/runner/SipDeviceRunner.java @@ -1,7 +1,10 @@ package com.genersoft.iot.vmp.conf.runner; +import com.genersoft.iot.vmp.conf.UserSetting; +import com.genersoft.iot.vmp.gb28181.bean.Device; +import com.genersoft.iot.vmp.service.IDeviceService; import com.genersoft.iot.vmp.storager.IRedisCatchStorage; -import com.genersoft.iot.vmp.storager.IVideoManagerStorager; +import com.genersoft.iot.vmp.storager.IVideoManagerStorage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; @@ -18,10 +21,16 @@ public class SipDeviceRunner implements CommandLineRunner { @Autowired - private IVideoManagerStorager storager; + private IVideoManagerStorage storager; @Autowired private IRedisCatchStorage redisCatchStorage; + + @Autowired + private UserSetting userSetting; + + @Autowired + private IDeviceService deviceService; @Override public void run(String... args) throws Exception { @@ -31,8 +40,16 @@ List<String> onlineForAll = redisCatchStorage.getOnlineForAll(); for (String deviceId : onlineForAll) { storager.online(deviceId); + Device device = redisCatchStorage.getDevice(deviceId); + if (device != null && device.getSubscribeCycleForCatalog() > 0) { + // 鏌ヨ鍦ㄧ嚎璁惧閭d簺寮�鍚簡璁㈤槄锛屼负璁惧寮�鍚畾鏃剁殑鐩綍璁㈤槄 + deviceService.addCatalogSubscribe(device); + deviceService.addMobilePositionSubscribe(device); + } } + // 閲嶇疆cseq璁℃暟 + redisCatchStorage.resetAllCSEQ(); - // TODO 鏌ヨ鍦ㄧ嚎璁惧閭d簺寮�鍚簡璁㈤槄锛屼负璁惧寮�鍚畾鏃剁殑鐩綍璁㈤槄 + } } -- Gitblit v1.8.0