[*] 修改描述

This commit is contained in:
acgist
2023-06-08 17:26:26 +08:00
parent c12b1d6f7b
commit 1d8fd815fa
3 changed files with 8 additions and 8 deletions

View File

@@ -908,7 +908,7 @@ class Taoyao {
console.warn("请求录像关键帧视频关闭", filepath); console.warn("请求录像关键帧视频关闭", filepath);
return; return;
} }
// 判断文件大小验证是否已经开始录:创建文件 -> 视频信息 -> 视频数据 -> 封装视频 // 判断文件大小验证是否已经开始录:创建文件 -> 视频信息 -> 视频数据 -> 封装视频
if(fs.existsSync(filepath) && fs.statSync(filepath).size >= 128 * 1024) { if(fs.existsSync(filepath) && fs.statSync(filepath).size >= 128 * 1024) {
console.debug("请求录像关键帧已经开始录像", filepath); console.debug("请求录像关键帧已经开始录像", filepath);
return; return;

View File

@@ -93,7 +93,7 @@ public class Recorder {
*/ */
private String videoTransportId; private String videoTransportId;
/** /**
* 录线程 * 录线程
*/ */
private Thread thread; private Thread thread;
/** /**
@@ -172,7 +172,7 @@ public class Recorder {
} }
/** /**
* 录视频 * 录视频
*/ */
private void record() { private void record() {
final String recordScript = String.format( final String recordScript = String.format(

View File

@@ -102,7 +102,7 @@ public class ControlServerRecordProtocol extends ProtocolControlAdapter implemen
} }
/** /**
* 开始录 * 开始录
* *
* @param room 房间 * @param room 房间
* @param clientWrapper 终端 * @param clientWrapper 终端
@@ -118,11 +118,11 @@ public class ControlServerRecordProtocol extends ProtocolControlAdapter implemen
} }
} }
final String name = UUID.randomUUID().toString(); final String name = UUID.randomUUID().toString();
// 打开录线程 // 打开录线程
final Recorder recorder = new Recorder(name, room, clientWrapper, this.ffmpegProperties); final Recorder recorder = new Recorder(name, room, clientWrapper, this.ffmpegProperties);
recorder.start(); recorder.start();
clientWrapper.setRecorder(recorder); clientWrapper.setRecorder(recorder);
// 打开媒体录 // 打开媒体录
final Message message = this.build(); final Message message = this.build();
final Map<String, Object> body = new HashMap<>(); final Map<String, Object> body = new HashMap<>();
body.put(Constant.HOST, this.ffmpegProperties.getHost()); body.put(Constant.HOST, this.ffmpegProperties.getHost());
@@ -175,10 +175,10 @@ public class ControlServerRecordProtocol extends ProtocolControlAdapter implemen
return null; return null;
} }
} }
// 关闭录线程 // 关闭录线程
recorder.stop(); recorder.stop();
clientWrapper.setRecorder(null); clientWrapper.setRecorder(null);
// 关闭媒体录 // 关闭媒体录
final Message message = this.build(); final Message message = this.build();
final Map<String, Object> body = new HashMap<>(); final Map<String, Object> body = new HashMap<>();
body.put(Constant.AUDIO_STREAM_ID, recorder.getAudioStreamId()); body.put(Constant.AUDIO_STREAM_ID, recorder.getAudioStreamId());