zlm 录像api

This commit is contained in:
shikong 2024-02-10 20:56:48 +08:00
parent 14d9a80759
commit 05c00db058

View File

@ -265,27 +265,26 @@ public class MediaServiceTest {
.build()); .build());
log.info("startRecordResp {}", startRecordResp); log.info("startRecordResp {}", startRecordResp);
scheduledExecutorService.schedule(() -> { scheduledExecutorService.schedule(() -> {
zlmMediaService.delFfmpegSource(addFFmpegSourceRespZlmResponse.getData().getKey()); ZlmResponse<DelFFmpegSourceResp> delFFmpegSourceRespZlmResponse = zlmMediaService.delFfmpegSource(addFFmpegSourceRespZlmResponse.getData().getKey());
// log.info("{}", zlmMediaService.delStreamProxy(addedStreamProxy.getData().getKey())); log.info("delFFmpegSourceRespZlmResponse {}", delFFmpegSourceRespZlmResponse);
zlmMediaService.getMp4RecordFile(GetMp4RecordFile.builder() StopRecordResp stopRecordResp = zlmMediaService.stopRecord(StopRecord.builder()
.app("live")
.stream("test")
.period(DateUtil.formatDate(DateUtil.date()))
.customizedPath(customizedPath).build());
zlmMediaService.stopRecord(StopRecord.builder()
.app("live") .app("live")
.stream("test") .stream("test")
.vhost("__defaultVhost__") .vhost("__defaultVhost__")
.build()); .build());
log.info("stopRecordResp {}", stopRecordResp);
GetMp4RecordFileResp mp4RecordFile = zlmMediaService.getMp4RecordFile(GetMp4RecordFile.builder()
.app("live")
.stream("test")
.period(DateUtil.formatDate(DateUtil.date()))
.customizedPath(customizedPath).build());
log.info("mp4RecordFile {}", mp4RecordFile);
countDownLatch.countDown(); countDownLatch.countDown();
}, 15, TimeUnit.SECONDS); }, 15, TimeUnit.SECONDS);
countDownLatch.await(); countDownLatch.await();
} }
} }