old mode 100644
new mode 100755
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.sip.InvalidArgumentException; |
| | | import javax.sip.SipException; |
| | | import java.net.MalformedURLException; |
| | | import java.net.URL; |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | |
| | | 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); |
| | | }); |
| | |
| | | if (data != null) { |
| | | StreamInfo streamInfo = (StreamInfo)data; |
| | | if (userSetting.getUseSourceIpAsStreamIp()) { |
| | | streamInfo.channgeStreamIp(request.getLocalAddr()); |
| | | streamInfo=streamInfo.clone();//深拷贝 |
| | | String host; |
| | | try { |
| | | URL url=new URL(request.getRequestURL().toString()); |
| | | host=url.getHost(); |
| | | } catch (MalformedURLException e) { |
| | | host=request.getLocalAddr(); |
| | | } |
| | | streamInfo.channgeStreamIp(host); |
| | | } |
| | | wvpResult.setData(new StreamContent(streamInfo)); |
| | | } |
| | |
| | | } |
| | | 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("[命令发送失败] 停止点播, 发送BYE: {}", e.getMessage()); |