代码优化
parent
1fe9569af2
commit
cdcb116aa2
|
@ -163,6 +163,7 @@ public class ZLMRESTfulUtils {
|
|||
param.put("type", 1);
|
||||
param.put("app", "rtp");
|
||||
param.put("stream", stream);
|
||||
param.put("vhost", "__defaultVhost__");
|
||||
return sendPost(mediaServerIp, "startRecord", param);
|
||||
}
|
||||
|
||||
|
@ -178,6 +179,7 @@ public class ZLMRESTfulUtils {
|
|||
param.put("type", 1);
|
||||
param.put("app", "rtp");
|
||||
param.put("stream", stream);
|
||||
param.put("vhost", "__defaultVhost__");
|
||||
return sendPost(mediaServerIp, "stopRecord", param);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ public class DeviceControlController {
|
|||
* 录像控制命令API接口
|
||||
*
|
||||
* @param deviceId
|
||||
* @param recordCmdStr Record:手动录像,StopRecord:停止手动录像
|
||||
* @param channelId 通道编码(可选)
|
||||
* @param recordCmdStr Record:手动录像,StopRecord:停止手动录像
|
||||
* @param channelId 通道编码(可选)
|
||||
*/
|
||||
@GetMapping("/control/{deviceId}/record/{recordCmdStr}")
|
||||
public DeferredResult<ResponseEntity<String>> recordApi(@PathVariable String deviceId,
|
||||
|
@ -101,8 +101,8 @@ public class DeviceControlController {
|
|||
/**
|
||||
* 报警布防/撤防命令API接口
|
||||
*
|
||||
* @param deviceId
|
||||
* @param guardCmdStr SetGuard:布防,ResetGuard:撤防
|
||||
* @param deviceId
|
||||
* @param guardCmdStr SetGuard:布防,ResetGuard:撤防
|
||||
*/
|
||||
@GetMapping("/control/{deviceId}/guard/{guardCmdStr}")
|
||||
public DeferredResult<ResponseEntity<String>> guardApi(@PathVariable String deviceId, @PathVariable String guardCmdStr) {
|
||||
|
@ -133,9 +133,9 @@ public class DeviceControlController {
|
|||
/**
|
||||
* 报警复位API接口
|
||||
*
|
||||
* @param deviceId
|
||||
* @param alarmMethod 报警方式(可选)
|
||||
* @param alarmType 报警类型(可选)
|
||||
* @param deviceId
|
||||
* @param alarmMethod 报警方式(可选)
|
||||
* @param alarmType 报警类型(可选)
|
||||
*/
|
||||
@GetMapping("/control/{deviceId}/resetAlarm")
|
||||
public DeferredResult<ResponseEntity<String>> resetAlarmApi(@PathVariable String deviceId,
|
||||
|
@ -168,8 +168,8 @@ public class DeviceControlController {
|
|||
/**
|
||||
* 强制关键帧API接口
|
||||
*
|
||||
* @param deviceId
|
||||
* @param channelId
|
||||
* @param deviceId
|
||||
* @param channelId
|
||||
*/
|
||||
@GetMapping("/control/{deviceId}/iFrame")
|
||||
@PostMapping("/control/{deviceId}/iFrame")
|
||||
|
@ -196,10 +196,10 @@ public class DeviceControlController {
|
|||
* 看守位控制命令API接口
|
||||
*
|
||||
* @param deviceId
|
||||
* @param enabled 看守位使能1:开启,0:关闭
|
||||
* @param resetTime 自动归位时间间隔(可选)
|
||||
* @param presetIndex 调用预置位编号(可选)
|
||||
* @param channelId 通道编码(可选)
|
||||
* @param enabled 看守位使能1:开启,0:关闭
|
||||
* @param resetTime 自动归位时间间隔(可选)
|
||||
* @param presetIndex 调用预置位编号(可选)
|
||||
* @param channelId 通道编码(可选)
|
||||
*/
|
||||
@GetMapping("/control/{deviceId}/homePosition/{enabled}")
|
||||
public DeferredResult<ResponseEntity<String>> homePositionApi(@PathVariable String deviceId,
|
||||
|
|
|
@ -8,7 +8,7 @@ spring:
|
|||
# [可选] 数据库 DB
|
||||
database: 6
|
||||
# [可选] 访问密码,若你的redis服务器没有设置密码,就不需要用密码去连接
|
||||
password: 111111
|
||||
password:
|
||||
# [可选] 超时时间
|
||||
timeout: 10000
|
||||
poolMaxTotal: 1000
|
||||
|
@ -38,7 +38,7 @@ server:
|
|||
# 作为28181服务器的配置
|
||||
sip:
|
||||
# [必须修改] 本机的内网IP, 必须是网卡上的IP
|
||||
ip: 192.168.1.105
|
||||
ip: 192.168.0.100
|
||||
# [可选] 28181服务监听的端口
|
||||
port: 5060
|
||||
# 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007)
|
||||
|
@ -61,7 +61,7 @@ auth:
|
|||
#zlm服务器配置
|
||||
media:
|
||||
# [必须修改] zlm服务器的IP(内网公网IP均可),配置多台时IP用逗号隔开
|
||||
ip: 192.168.1.105
|
||||
ip: 192.168.0.100
|
||||
# [可选] zlm服务器的公网IP, 内网部署置空即可
|
||||
wanIp:
|
||||
# [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip
|
||||
|
|
Loading…
Reference in New Issue