修复录像路径设置错误

pull/1217/head
chenghong 2023-12-19 10:09:21 +08:00
parent 964d55431f
commit 8965f95365
1 changed files with 69 additions and 61 deletions

View File

@ -116,7 +116,6 @@ public class MediaServerServiceImpl implements IMediaServerService {
private ThreadPoolTaskExecutor taskExecutor;
/**
*
*/
@ -292,6 +291,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
/**
* zlm
*
* @param mediaServerId id
* @return MediaServerItem
*/
@ -369,6 +369,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
/**
* zlm线
*
* @param zlmServerConfig zlm线
*/
@Override
@ -515,6 +516,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
/**
*
*
* @return MediaServerItem
*/
@Override
@ -558,6 +560,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
/**
* zlm
*
* @param mediaServerItem ID
* @param restart zlm
*/
@ -609,8 +612,11 @@ public class MediaServerServiceImpl implements IMediaServerService {
if (userSetting.getRecordPath() != null) {
File recordPathFile = new File(userSetting.getRecordPath());
File mp4SavePathFile = recordPathFile.getParentFile().getAbsoluteFile();
param.put("protocol.mp4_save_path", mp4SavePathFile.getAbsoluteFile());
// File mp4SavePathFile = recordPathFile.getParentFile().getAbsoluteFile();
// param.put("protocol.mp4_save_path", mp4SavePathFile.getAbsoluteFile());
// 如果使用mp4SavePathFile.getAbsoluteFile() 当wvp部署在windows服务器时会添加盘符
// 导致ZLM设置mp4_save_path路径时出错
param.put("protocol.mp4_save_path", userSetting.getRecordPath());
param.put("record.appName", recordPathFile.getName());
}
@ -683,7 +689,8 @@ public class MediaServerServiceImpl implements IMediaServerService {
if (response != null) {
result = true;
}
} catch (Exception e) {}
} catch (Exception e) {
}
return result;
}
@ -694,6 +701,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId() + "_" + id;
redisTemplate.delete(key);
}
@Override
public void deleteDb(String id) {
//同步删除数据库中的数据