Commit 8555d64f95b154df07ce3bafaa842d90e72ea075
1 parent
cf35daeb
修复点播超时的事件设置
Showing
2 changed files
with
5 additions
and
4 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
| @@ -235,7 +235,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | @@ -235,7 +235,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | ||
| 235 | String username = sdp.getOrigin().getUsername(); | 235 | String username = sdp.getOrigin().getUsername(); |
| 236 | String addressStr = sdp.getOrigin().getAddress(); | 236 | String addressStr = sdp.getOrigin().getAddress(); |
| 237 | 237 | ||
| 238 | - logger.info("[上级点播]用户:{}, 地址:{}:{}, ssrc:{}", username, addressStr, port, ssrc); | 238 | + logger.info("[上级点播]用户:{}, 通道:{}, 地址:{}:{}, ssrc:{}", username, channelId, addressStr, port, ssrc); |
| 239 | Device device = null; | 239 | Device device = null; |
| 240 | // 通过 channel 和 gbStream 是否为null 值判断来源是直播流合适国标 | 240 | // 通过 channel 和 gbStream 是否为null 值判断来源是直播流合适国标 |
| 241 | if (channel != null) { | 241 | if (channel != null) { |
| @@ -377,6 +377,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | @@ -377,6 +377,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | ||
| 377 | // 写入redis, 超时时回复 | 377 | // 写入redis, 超时时回复 |
| 378 | redisCatchStorage.updateSendRTPSever(sendRtpItem); | 378 | redisCatchStorage.updateSendRTPSever(sendRtpItem); |
| 379 | playService.play(mediaServerItem, ssrcInfo, device, channelId, hookEvent, errorEvent, (code, msg)->{ | 379 | playService.play(mediaServerItem, ssrcInfo, device, channelId, hookEvent, errorEvent, (code, msg)->{ |
| 380 | + logger.info("[上级点播]超时, 用户:{}, 通道:{}", username, channelId); | ||
| 380 | redisCatchStorage.deleteSendRTPServer(platform.getServerGBId(), channelId, callIdHeader.getCallId(), null); | 381 | redisCatchStorage.deleteSendRTPServer(platform.getServerGBId(), channelId, callIdHeader.getCallId(), null); |
| 381 | }, null); | 382 | }, null); |
| 382 | }else { | 383 | }else { |
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
| @@ -257,7 +257,7 @@ public class PlayServiceImpl implements IPlayService { | @@ -257,7 +257,7 @@ public class PlayServiceImpl implements IPlayService { | ||
| 257 | mediaServerService.closeRTPServer(device.getDeviceId(), channelId, finalSsrcInfo.getStream()); | 257 | mediaServerService.closeRTPServer(device.getDeviceId(), channelId, finalSsrcInfo.getStream()); |
| 258 | streamSession.remove(device.getDeviceId(), channelId, finalSsrcInfo.getStream()); | 258 | streamSession.remove(device.getDeviceId(), channelId, finalSsrcInfo.getStream()); |
| 259 | } | 259 | } |
| 260 | - }, userSetting.getPlayTimeout()*1000); | 260 | + }, userSetting.getPlayTimeout()); |
| 261 | final String ssrc = ssrcInfo.getSsrc(); | 261 | final String ssrc = ssrcInfo.getSsrc(); |
| 262 | final String stream = ssrcInfo.getStream(); | 262 | final String stream = ssrcInfo.getStream(); |
| 263 | cmder.playStreamCmd(mediaServerItem, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInuse, JSONObject response) -> { | 263 | cmder.playStreamCmd(mediaServerItem, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInuse, JSONObject response) -> { |
| @@ -433,7 +433,7 @@ public class PlayServiceImpl implements IPlayService { | @@ -433,7 +433,7 @@ public class PlayServiceImpl implements IPlayService { | ||
| 433 | cmder.streamByeCmd(device.getDeviceId(), channelId, ssrcInfo.getStream(), null); | 433 | cmder.streamByeCmd(device.getDeviceId(), channelId, ssrcInfo.getStream(), null); |
| 434 | // 回复之前所有的点播请求 | 434 | // 回复之前所有的点播请求 |
| 435 | playBackCallback.call(playBackResult); | 435 | playBackCallback.call(playBackResult); |
| 436 | - }, userSetting.getPlayTimeout()*1000); | 436 | + }, userSetting.getPlayTimeout()); |
| 437 | 437 | ||
| 438 | cmder.playbackStreamCmd(mediaServerItem, ssrcInfo, device, channelId, startTime, endTime, infoCallBack, | 438 | cmder.playbackStreamCmd(mediaServerItem, ssrcInfo, device, channelId, startTime, endTime, infoCallBack, |
| 439 | (InviteStreamInfo inviteStreamInfo) -> { | 439 | (InviteStreamInfo inviteStreamInfo) -> { |
| @@ -522,7 +522,7 @@ public class PlayServiceImpl implements IPlayService { | @@ -522,7 +522,7 @@ public class PlayServiceImpl implements IPlayService { | ||
| 522 | cmder.streamByeCmd(device.getDeviceId(), channelId, ssrcInfo.getStream(), null); | 522 | cmder.streamByeCmd(device.getDeviceId(), channelId, ssrcInfo.getStream(), null); |
| 523 | // 回复之前所有的点播请求 | 523 | // 回复之前所有的点播请求 |
| 524 | hookCallBack.call(downloadResult); | 524 | hookCallBack.call(downloadResult); |
| 525 | - }, userSetting.getPlayTimeout()*1000); | 525 | + }, userSetting.getPlayTimeout()); |
| 526 | cmder.downloadStreamCmd(mediaServerItem, ssrcInfo, device, channelId, startTime, endTime, downloadSpeed, infoCallBack, | 526 | cmder.downloadStreamCmd(mediaServerItem, ssrcInfo, device, channelId, startTime, endTime, downloadSpeed, infoCallBack, |
| 527 | inviteStreamInfo -> { | 527 | inviteStreamInfo -> { |
| 528 | logger.info("收到订阅消息: " + inviteStreamInfo.getResponse().toJSONString()); | 528 | logger.info("收到订阅消息: " + inviteStreamInfo.getResponse().toJSONString()); |