调整
This commit is contained in:
parent
2bb56f5bbc
commit
7528fdbb4b
@ -41,6 +41,7 @@ import gov.nist.javax.sdp.fields.TimeField;
|
|||||||
import gov.nist.javax.sdp.fields.URIField;
|
import gov.nist.javax.sdp.fields.URIField;
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
import gov.nist.javax.sip.message.SIPRequest;
|
||||||
import gov.nist.javax.sip.message.SIPResponse;
|
import gov.nist.javax.sip.message.SIPResponse;
|
||||||
|
import jakarta.annotation.PreDestroy;
|
||||||
import jakarta.servlet.AsyncContext;
|
import jakarta.servlet.AsyncContext;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@ -254,6 +255,8 @@ public class Gb28181DownloadService {
|
|||||||
String url = StringUtils.isNotBlank(proxySipConfig.getProxyMediaUrl()) ?
|
String url = StringUtils.isNotBlank(proxySipConfig.getProxyMediaUrl()) ?
|
||||||
StringUtils.replace(videoInfo.getUrl(), zlmMediaConfig.getUrl(), proxySipConfig.getProxyMediaUrl()):
|
StringUtils.replace(videoInfo.getUrl(), zlmMediaConfig.getUrl(), proxySipConfig.getProxyMediaUrl()):
|
||||||
videoInfo.getUrl();
|
videoInfo.getUrl();
|
||||||
|
|
||||||
|
realtimeVideo.put(deviceCode, url);
|
||||||
result.setResult(JsonResponse.success(url));
|
result.setResult(JsonResponse.success(url));
|
||||||
});
|
});
|
||||||
}, 200, TimeUnit.MILLISECONDS);
|
}, 200, TimeUnit.MILLISECONDS);
|
||||||
@ -299,6 +302,7 @@ public class Gb28181DownloadService {
|
|||||||
|
|
||||||
public void closeRealtimeVideoNow(WvpProxyDocking docking, WvpProxyDevice device, Gb28181DownloadService.VideoInfo videoInfo, String cacheKey, String existCallId){
|
public void closeRealtimeVideoNow(WvpProxyDocking docking, WvpProxyDevice device, Gb28181DownloadService.VideoInfo videoInfo, String cacheKey, String existCallId){
|
||||||
log.info("结束实时视频 发送 bye 关闭 {} {}", videoInfo.getDevice().getGbDeviceChannelId(), videoInfo.getCallId());
|
log.info("结束实时视频 发送 bye 关闭 {} {}", videoInfo.getDevice().getGbDeviceChannelId(), videoInfo.getCallId());
|
||||||
|
realtimeVideo.remove(device.getDeviceCode());
|
||||||
String deviceIp = docking.getIp();
|
String deviceIp = docking.getIp();
|
||||||
int devicePort = Integer.parseInt(docking.getPort());
|
int devicePort = Integer.parseInt(docking.getPort());
|
||||||
if (StringUtils.isNotBlank(existCallId)) {
|
if (StringUtils.isNotBlank(existCallId)) {
|
||||||
@ -628,4 +632,11 @@ public class Gb28181DownloadService {
|
|||||||
}
|
}
|
||||||
return subscriber;
|
return subscriber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreDestroy
|
||||||
|
private void destroy(){
|
||||||
|
realtimeVideo.forEach((key,item)->{
|
||||||
|
closeRealtimeVideoNow(key);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user