将录像存储路径迁移至wvp中配置,assist以有在需要视频合成的时候才会用

This commit is contained in:
648540858
2023-11-01 14:07:32 +08:00
parent 75fccfaf17
commit 5d3f307b44
13 changed files with 69 additions and 66 deletions

View File

@@ -295,24 +295,6 @@ public class ZLMHttpHookListener {
result.setEnable_mp4(true);
}
}
if (mediaInfo.getRecordAssistPort() > 0 && userSetting.getRecordPath() == null) {
logger.info("推流时发现尚未设置录像路径从assist服务中读取");
JSONObject info = assistRESTfulUtils.getInfo(mediaInfo, null);
if (info != null && info.getInteger("code") != null && info.getInteger("code") == 0 ) {
JSONObject dataJson = info.getJSONObject("data");
if (dataJson != null) {
String recordPath = dataJson.getString("record");
userSetting.setRecordPath(recordPath);
result.setMp4_save_path(recordPath);
// 修改zlm中的录像路径
if (mediaInfo.isAutoConfig()) {
taskExecutor.execute(() -> {
mediaServerService.setZLMConfig(mediaInfo, false);
});
}
}
}
}
if (param.getApp().equalsIgnoreCase("rtp")) {
String receiveKey = VideoManagerConstants.WVP_OTHER_RECEIVE_RTP_INFO + userSetting.getServerId() + "_" + param.getStream();
OtherRtpSendInfo otherRtpSendInfo = (OtherRtpSendInfo)redisTemplate.opsForValue().get(receiveKey);

View File

@@ -81,7 +81,10 @@ public class MediaServerItem{
private boolean defaultServer;
@Schema(description = "录像存储时长")
private int recordDate;
private int recordDay;
@Schema(description = "录像存储路径")
private String recordPath;
public MediaServerItem() {
}
@@ -300,11 +303,19 @@ public class MediaServerItem{
this.sendRtpPortRange = sendRtpPortRange;
}
public int getRecordDate() {
return recordDate;
public int getRecordDay() {
return recordDay;
}
public void setRecordDate(int recordDate) {
this.recordDate = recordDate;
public void setRecordDay(int recordDay) {
this.recordDay = recordDay;
}
public String getRecordPath() {
return recordPath;
}
public void setRecordPath(String recordPath) {
this.recordPath = recordPath;
}
}