优化录像路径的设置
parent
1af6324a09
commit
0c10c77a56
|
@ -84,7 +84,7 @@ public class MediaConfig{
|
||||||
@Value("${media.record-day:7}")
|
@Value("${media.record-day:7}")
|
||||||
private Integer recordDay;
|
private Integer recordDay;
|
||||||
|
|
||||||
@Value("${media.record-path}")
|
@Value("${media.record-path:}")
|
||||||
private String recordPath;
|
private String recordPath;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
|
|
|
@ -731,6 +731,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
dynamicTask.startDelay(callIdHeader.getCallId(), () -> {
|
dynamicTask.startDelay(callIdHeader.getCallId(), () -> {
|
||||||
logger.info("[ app={}, stream={} ] 等待设备开始推流超时", gbStream.getApp(), gbStream.getStream());
|
logger.info("[ app={}, stream={} ] 等待设备开始推流超时", gbStream.getApp(), gbStream.getStream());
|
||||||
try {
|
try {
|
||||||
|
redisPushStreamResponseListener.removeEvent(gbStream.getApp(), gbStream.getStream());
|
||||||
mediaListManager.removedChannelOnlineEventLister(gbStream.getApp(), gbStream.getStream());
|
mediaListManager.removedChannelOnlineEventLister(gbStream.getApp(), gbStream.getStream());
|
||||||
responseAck(request, Response.REQUEST_TIMEOUT); // 超时
|
responseAck(request, Response.REQUEST_TIMEOUT); // 超时
|
||||||
} catch (SipException e) {
|
} catch (SipException e) {
|
||||||
|
@ -748,6 +749,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
// 添加在本机上线的通知
|
// 添加在本机上线的通知
|
||||||
mediaListManager.addChannelOnlineEventLister(gbStream.getApp(), gbStream.getStream(), (app, stream, serverId) -> {
|
mediaListManager.addChannelOnlineEventLister(gbStream.getApp(), gbStream.getStream(), (app, stream, serverId) -> {
|
||||||
dynamicTask.stop(callIdHeader.getCallId());
|
dynamicTask.stop(callIdHeader.getCallId());
|
||||||
|
redisPushStreamResponseListener.removeEvent(gbStream.getApp(), gbStream.getStream());
|
||||||
if (serverId.equals(userSetting.getServerId())) {
|
if (serverId.equals(userSetting.getServerId())) {
|
||||||
SendRtpItem sendRtpItem = zlmServerFactory.createSendRtpItem(mediaServerItem, addressStr, finalPort, ssrc, requesterId,
|
SendRtpItem sendRtpItem = zlmServerFactory.createSendRtpItem(mediaServerItem, addressStr, finalPort, ssrc, requesterId,
|
||||||
app, stream, channelId, mediaTransmissionTCP, platform.isRtcp());
|
app, stream, channelId, mediaTransmissionTCP, platform.isRtcp());
|
||||||
|
|
|
@ -591,7 +591,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
||||||
param.put("rtp_proxy.port_range", mediaServerItem.getRtpPortRange().replace(",", "-"));
|
param.put("rtp_proxy.port_range", mediaServerItem.getRtpPortRange().replace(",", "-"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaServerItem.getRecordPath() != null) {
|
if (!ObjectUtils.isEmpty(mediaServerItem.getRecordPath())) {
|
||||||
File recordPathFile = new File(mediaServerItem.getRecordPath());
|
File recordPathFile = new File(mediaServerItem.getRecordPath());
|
||||||
param.put("protocol.mp4_save_path", recordPathFile.getParentFile().getPath());
|
param.put("protocol.mp4_save_path", recordPathFile.getParentFile().getPath());
|
||||||
param.put("protocol.downloadRoot", recordPathFile.getParentFile().getPath());
|
param.put("protocol.downloadRoot", recordPathFile.getParentFile().getPath());
|
||||||
|
|
Loading…
Reference in New Issue