Commit c5f2aba9b20089f184ce175b58a33a881ea9e0b1

Authored by panlinlin
1 parent 2dacd7d7

修复 流已经关闭后,再次调用关闭流的接口,返回超时

src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
@@ -44,5 +44,6 @@ public class VideoStreamSessionManager { @@ -44,5 +44,6 @@ public class VideoStreamSessionManager {
44 sessionMap.remove(deviceId + "_" + channelId); 44 sessionMap.remove(deviceId + "_" + channelId);
45 SsrcUtil.releaseSsrc(ssrcMap.get(deviceId + "_" + channelId)); 45 SsrcUtil.releaseSsrc(ssrcMap.get(deviceId + "_" + channelId));
46 ssrcMap.remove(deviceId + "_" + channelId); 46 ssrcMap.remove(deviceId + "_" + channelId);
  47 + streamIdMap.remove(deviceId + "_" + channelId);
47 } 48 }
48 } 49 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
@@ -581,8 +581,9 @@ public class SIPCommander implements ISIPCommander { @@ -581,8 +581,9 @@ public class SIPCommander implements ISIPCommander {
581 if (transaction == null) { 581 if (transaction == null) {
582 StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId); 582 StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId);
583 if (streamInfo != null) { 583 if (streamInfo != null) {
584 - 584 + redisCatchStorage.stopPlay(streamInfo);
585 } 585 }
  586 + okEvent.response(null);
586 return; 587 return;
587 } 588 }
588 589
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
@@ -99,8 +99,8 @@ public class PlayController { @@ -99,8 +99,8 @@ public class PlayController {
99 StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId); 99 StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId);
100 if (streamInfo == null) { 100 if (streamInfo == null) {
101 RequestMessage msg = new RequestMessage(); 101 RequestMessage msg = new RequestMessage();
102 - msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid);  
103 - msg.setData("streamId not found"); 102 + msg.setId(DeferredResultHolder.CALLBACK_CMD_STOP + uuid);
  103 + msg.setData("点播未找到");
104 resultHolder.invokeResult(msg); 104 resultHolder.invokeResult(msg);
105 }else { 105 }else {
106 redisCatchStorage.stopPlay(streamInfo); 106 redisCatchStorage.stopPlay(streamInfo);