From 80bfd9ce026e67dd2eb86c519b5b1b70e3cc7d12 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 17 十一月 2021 17:03:48 +0800
Subject: [PATCH] 使用@Async多线程处理sip消息

---
 src/main/java/com/genersoft/iot/vmp/web/ApiStreamController.java |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/web/ApiStreamController.java b/src/main/java/com/genersoft/iot/vmp/web/ApiStreamController.java
index dff6d72..ae7e921 100644
--- a/src/main/java/com/genersoft/iot/vmp/web/ApiStreamController.java
+++ b/src/main/java/com/genersoft/iot/vmp/web/ApiStreamController.java
@@ -1,28 +1,25 @@
 package com.genersoft.iot.vmp.web;
 
 import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.genersoft.iot.vmp.common.StreamInfo;
 import com.genersoft.iot.vmp.gb28181.bean.Device;
 import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
 import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
-import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
 import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
 import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
-import com.genersoft.iot.vmp.vmanager.play.PlayController;
+import com.genersoft.iot.vmp.vmanager.gb28181.play.PlayController;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.context.request.async.DeferredResult;
 
 /**
- * 鍏煎LiveGBS鐨凙PI锛氬疄鏃剁洿鎾�
+ * API鍏煎锛氬疄鏃剁洿鎾�
  */
+@SuppressWarnings(value = {"rawtypes", "unchecked"})
 @CrossOrigin
 @RestController
 @RequestMapping(value = "/api/v1/stream")
@@ -39,11 +36,9 @@
     @Autowired
     private IRedisCatchStorage redisCatchStorage;
 
-    private boolean closeWaitRTPInfo = false;
 
-
-    @Autowired
-    private ZLMRESTfulUtils zlmresTfulUtils;
+    // @Autowired
+    // private ZLMRESTfulUtils zlmresTfulUtils;
 
 
     @Autowired
@@ -168,7 +163,7 @@
             result.put("error","鏈壘鍒版祦淇℃伅");
             return result;
         }
-        cmder.streamByeCmd(streamInfo.getStreamId());
+        cmder.streamByeCmd(serial, code);
         redisCatchStorage.stopPlay(streamInfo);
         storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
         return null;

--
Gitblit v1.8.0