1、新增视频回放、视频回放控制Template

2、修复直播控制指令BUG
This commit is contained in:
QingObject
2023-04-28 14:39:50 +08:00
parent 97b673d6ad
commit b1fb1c4616
12 changed files with 744 additions and 13 deletions

View File

@@ -16,7 +16,7 @@ import org.springframework.core.annotation.Order;
@Order(Integer.MIN_VALUE)
@Configuration
@ConditionalOnProperty(value = "jt1078.enable", havingValue = "true")
public class TcpAutoConfiguration {
public class JT1078AutoConfiguration {
@Bean(initMethod = "start", destroyMethod = "stop")
public TcpServer jt1078Server(@Value("${jt1078.port}") Integer port) {

View File

@@ -1,7 +1,7 @@
package com.genersoft.iot.vmp.jt1078.config;
import com.genersoft.iot.vmp.jt1078.cmd.JT1078Template;
import com.genersoft.iot.vmp.jt1078.proc.response.J9101;
import com.genersoft.iot.vmp.jt1078.proc.response.*;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.GetMapping;
@@ -26,6 +26,9 @@ public class JT1078Controller {
@Resource
JT1078Template jt1078Template;
/**
* jt1078Template 调用示例
*/
@GetMapping("/start/live/{deviceId}/{channelId}")
public WVPResult<?> startLive(@PathVariable String deviceId, @PathVariable String channelId) {
J9101 j9101 = new J9101();
@@ -35,12 +38,14 @@ public class JT1078Controller {
j9101.setTcpPort(7618);
j9101.setUdpPort(7618);
j9101.setType(0);
// TODO 分配ZLM,获取IP、端口
String s = jt1078Template.startLive(deviceId, j9101, 6);
// TODO 设备响应成功后,封装拉流结果集
WVPResult<String> wvpResult = new WVPResult<>();
wvpResult.setCode(200);
wvpResult.setData(String.format("http://192.168.1.1/rtp/%s_%s.live.mp4", deviceId, channelId));
return wvpResult;
}
}