From fd0ff18a71c2ba714fca7a0ca4ec8cec9048a5a3 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 06 九月 2023 09:32:15 +0800
Subject: [PATCH] Merge pull request #1055 from lunasaw/dev-wvp-0905
---
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
old mode 100644
new mode 100755
index 86450f4..3d233dc
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
@@ -92,6 +92,7 @@
public DeferredResult<WVPResult<StreamContent>> play(HttpServletRequest request, @PathVariable String deviceId,
@PathVariable String channelId) {
+ logger.info("[寮�濮嬬偣鎾璢 deviceId锛歿}, channelId锛歿}, ", deviceId, channelId);
// 鑾峰彇鍙敤鐨剒lm
Device device = storager.queryVideoDevice(deviceId);
MediaServerItem newMediaServerItem = playService.getNewMediaServerItem(device);
@@ -104,13 +105,15 @@
DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
result.onTimeout(()->{
- logger.info("鐐规挱鎺ュ彛绛夊緟瓒呮椂");
+ logger.info("[鐐规挱绛夊緟瓒呮椂] deviceId锛歿}, channelId锛歿}, ", deviceId, channelId);
// 閲婃斁rtpserver
WVPResult<StreamInfo> wvpResult = new WVPResult<>();
wvpResult.setCode(ErrorCode.ERROR100.getCode());
wvpResult.setMsg("鐐规挱瓒呮椂");
requestMessage.setData(wvpResult);
- resultHolder.invokeResult(requestMessage);
+ resultHolder.invokeAllResult(requestMessage);
+ inviteStreamService.removeInviteInfoByDeviceAndChannel(InviteSessionType.PLAY, deviceId, channelId);
+ storager.stopPlay(deviceId, channelId);
});
// 褰曞儚鏌ヨ浠hannelId浣滀负deviceId鏌ヨ
@@ -163,7 +166,7 @@
}
if (InviteSessionStatus.ok == inviteInfo.getStatus()) {
try {
- logger.warn("[鍋滄鐐规挱] {}/{}", device.getDeviceId(), channelId);
+ logger.info("[鍋滄鐐规挱] {}/{}", device.getDeviceId(), channelId);
cmder.streamByeCmd(device, channelId, inviteInfo.getStream(), null, null);
} catch (InvalidArgumentException | SipException | ParseException | SsrcTransactionNotFoundException e) {
logger.error("[鍛戒护鍙戦�佸け璐 鍋滄鐐规挱锛� 鍙戦�丅YE: {}", e.getMessage());
@@ -359,7 +362,7 @@
message.setKey(key);
message.setId(uuid);
- String fileName = deviceId + "_" + channelId + "_" + DateUtil.getNowForUrl() + "jpg";
+ String fileName = deviceId + "_" + channelId + "_" + DateUtil.getNowForUrl() + ".jpg";
playService.getSnap(deviceId, channelId, fileName, (code, msg, data) -> {
if (code == InviteErrorCode.SUCCESS.getCode()) {
message.setData(data);
--
Gitblit v1.8.0