From b726dc97538b7d4ba71fd06c14161017dd67c2b7 Mon Sep 17 00:00:00 2001
From: xubinbin <1323875150@qq.com>
Date: 星期三, 10 五月 2023 15:38:22 +0800
Subject: [PATCH] "@schedule"是Spring框架提供的一种定时任务执行机制,默认情况下它是单线程执行,项目中多次使用fixedRate按指定频率执行任务(不管前面任务是否已经完成),在同时执行多个定时任务时可能会出现阻塞和性能问题,为了解决这种单线程瓶颈问题,将定时任务的执行机制改为支持多线程

---
 src/main/java/com/genersoft/iot/vmp/jt1078/config/JT1078Controller.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/config/JT1078Controller.java b/src/main/java/com/genersoft/iot/vmp/jt1078/config/JT1078Controller.java
index cffb147..0c71d26 100644
--- a/src/main/java/com/genersoft/iot/vmp/jt1078/config/JT1078Controller.java
+++ b/src/main/java/com/genersoft/iot/vmp/jt1078/config/JT1078Controller.java
@@ -1,7 +1,7 @@
 package com.genersoft.iot.vmp.jt1078.config;
 
 import com.genersoft.iot.vmp.jt1078.cmd.JT1078Template;
-import com.genersoft.iot.vmp.jt1078.proc.response.J9101;
+import com.genersoft.iot.vmp.jt1078.proc.response.*;
 import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -26,6 +26,9 @@
     @Resource
     JT1078Template jt1078Template;
 
+    /**
+     * jt1078Template 璋冪敤绀轰緥
+     */
     @GetMapping("/start/live/{deviceId}/{channelId}")
     public WVPResult<?> startLive(@PathVariable String deviceId, @PathVariable String channelId) {
         J9101 j9101 = new J9101();
@@ -35,12 +38,14 @@
         j9101.setTcpPort(7618);
         j9101.setUdpPort(7618);
         j9101.setType(0);
-
+        // TODO 鍒嗛厤ZLM,鑾峰彇IP銆佺鍙�
         String s = jt1078Template.startLive(deviceId, j9101, 6);
+        // TODO 璁惧鍝嶅簲鎴愬姛鍚�,灏佽鎷夋祦缁撴灉闆�
         WVPResult<String> wvpResult = new WVPResult<>();
         wvpResult.setCode(200);
         wvpResult.setData(String.format("http://192.168.1.1/rtp/%s_%s.live.mp4", deviceId, channelId));
         return wvpResult;
     }
+
 }
 

--
Gitblit v1.8.0