[1078] 适配abl的播放1078
This commit is contained in:
@@ -40,7 +40,7 @@ public class Jt808Decoder extends ByteToMessageDecoder {
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
|
||||
Session session = ctx.channel().attr(Session.KEY).get();
|
||||
log.info("> {} hex:{}", session, ByteBufUtil.hexDump(in));
|
||||
log.info("> {} hex: 7e{}7e", session, ByteBufUtil.hexDump(in));
|
||||
|
||||
try {
|
||||
ByteBuf buf = unEscapeAndCheck(in);
|
||||
|
||||
@@ -88,7 +88,7 @@ public class JT1078Controller {
|
||||
}
|
||||
DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
|
||||
result.onTimeout(()->{
|
||||
log.info("[1078-点播等待超时] phoneNumber:{}, channelId:{}, ", phoneNumber, channelId);
|
||||
log.info("[JT-点播等待超时] phoneNumber:{}, channelId:{}, ", phoneNumber, channelId);
|
||||
// 释放rtpserver
|
||||
WVPResult<StreamContent> wvpResult = new WVPResult<>();
|
||||
wvpResult.setCode(ErrorCode.ERROR100.getCode());
|
||||
@@ -152,7 +152,7 @@ public class JT1078Controller {
|
||||
@Parameter(required = false) Boolean onlySend) {
|
||||
DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
|
||||
result.onTimeout(()->{
|
||||
log.info("[1078-语音对讲超时] phoneNumber:{}, channelId:{}, ", phoneNumber, channelId);
|
||||
log.info("[JT-语音对讲超时] phoneNumber:{}, channelId:{}, ", phoneNumber, channelId);
|
||||
// 释放rtpserver
|
||||
WVPResult<StreamContent> wvpResult = new WVPResult<>();
|
||||
wvpResult.setCode(ErrorCode.ERROR100.getCode());
|
||||
@@ -275,7 +275,7 @@ public class JT1078Controller {
|
||||
) {
|
||||
DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
|
||||
result.onTimeout(()->{
|
||||
log.info("[1078-回放-等待超时] phoneNumber:{}, channelId:{}, ", phoneNumber, channelId);
|
||||
log.info("[JT-回放-等待超时] phoneNumber:{}, channelId:{}, ", phoneNumber, channelId);
|
||||
// 释放rtpserver
|
||||
WVPResult<StreamContent> wvpResult = new WVPResult<>();
|
||||
wvpResult.setCode(ErrorCode.ERROR100.getCode());
|
||||
@@ -359,7 +359,7 @@ public class JT1078Controller {
|
||||
@Parameter(required = false) Integer storageType
|
||||
|
||||
) throws IOException {
|
||||
log.info("[1078-录像] 下载,设备:{}, 通道: {}, 开始时间: {}, 结束时间: {},报警标志: {}, 音视频类型: {}, 码流类型: {},存储器类型: {}, ",
|
||||
log.info("[JT-录像] 下载,设备:{}, 通道: {}, 开始时间: {}, 结束时间: {},报警标志: {}, 音视频类型: {}, 码流类型: {},存储器类型: {}, ",
|
||||
phoneNumber, channelId, startTime, endTime, alarmSign, mediaType, streamType, storageType);
|
||||
if (!ftpSetting.getEnable()) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未启用ftp服务,无法下载录像");
|
||||
@@ -403,7 +403,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/ptz")
|
||||
public void ptz(String phoneNumber, Integer channelId, String command, int speed){
|
||||
|
||||
log.info("[1078-云台控制] phoneNumber:{}, channelId:{}, command: {}, speed: {}", phoneNumber, channelId, command, speed);
|
||||
log.info("[JT-云台控制] phoneNumber:{}, channelId:{}, command: {}, speed: {}", phoneNumber, channelId, command, speed);
|
||||
service.ptzControl(phoneNumber, channelId, command, speed);
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/fill-light")
|
||||
public void fillLight(String phoneNumber, Integer channelId, String command){
|
||||
|
||||
log.info("[1078-补光灯开关] phoneNumber:{}, channelId:{}, command: {}", phoneNumber, channelId, command);
|
||||
log.info("[JT-补光灯开关] phoneNumber:{}, channelId:{}, command: {}", phoneNumber, channelId, command);
|
||||
service.supplementaryLight(phoneNumber, channelId, command);
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/wiper")
|
||||
public void wiper(String phoneNumber, Integer channelId, String command){
|
||||
|
||||
log.info("[1078-雨刷开关] phoneNumber:{}, channelId:{}, command: {}", phoneNumber, channelId, command);
|
||||
log.info("[JT-雨刷开关] phoneNumber:{}, channelId:{}, command: {}", phoneNumber, channelId, command);
|
||||
service.wiper(phoneNumber, channelId, command);
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/config")
|
||||
public JTDeviceConfig config(String phoneNumber, String[] params){
|
||||
|
||||
log.info("[1078-查询终端参数] phoneNumber:{}", phoneNumber);
|
||||
log.info("[JT-查询终端参数] phoneNumber:{}", phoneNumber);
|
||||
return service.queryConfig(phoneNumber, params, null);
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/set-config")
|
||||
public void setConfig(@RequestBody SetConfigParam config){
|
||||
|
||||
log.info("[1078-设置终端参数] 参数: {}", config.toString());
|
||||
log.info("[JT-设置终端参数] 参数: {}", config.toString());
|
||||
service.setConfig(config.getPhoneNumber(), config.getConfig());
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/control/connection")
|
||||
public void connectionControl(@RequestBody ConnectionControlParam control){
|
||||
|
||||
log.info("[1078-终端控制] 参数: {}", control.toString());
|
||||
log.info("[JT-终端控制] 参数: {}", control.toString());
|
||||
service.connectionControl(control.getPhoneNumber(), control.getControl());
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/control/reset")
|
||||
public void resetControl(String phoneNumber){
|
||||
|
||||
log.info("[1078-复位] phoneNumber: {}", phoneNumber);
|
||||
log.info("[JT-复位] phoneNumber: {}", phoneNumber);
|
||||
service.resetControl(phoneNumber);
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/control/factory-reset")
|
||||
public void factoryResetControl(String phoneNumber){
|
||||
|
||||
log.info("[1078-恢复出厂设置] phoneNumber: {}", phoneNumber);
|
||||
log.info("[JT-恢复出厂设置] phoneNumber: {}", phoneNumber);
|
||||
service.factoryResetControl(phoneNumber);
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/attribute")
|
||||
public JTDeviceAttribute attribute(String phoneNumber){
|
||||
|
||||
log.info("[1078-查询终端属性] phoneNumber: {}", phoneNumber);
|
||||
log.info("[JT-查询终端属性] phoneNumber: {}", phoneNumber);
|
||||
return service.attribute(phoneNumber);
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/position-info")
|
||||
public JTPositionBaseInfo queryPositionInfo(String phoneNumber){
|
||||
|
||||
log.info("[1078-查询位置信息] phoneNumber: {}", phoneNumber);
|
||||
log.info("[JT-查询位置信息] phoneNumber: {}", phoneNumber);
|
||||
return service.queryPositionInfo(phoneNumber);
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/control/temp-position-tracking")
|
||||
public void tempPositionTrackingControl(String phoneNumber, Integer timeInterval, Long validityPeriod){
|
||||
|
||||
log.info("[1078-临时位置跟踪控制] phoneNumber: {}, 时间间隔 {}秒, 位置跟踪有效期 {}秒", phoneNumber, timeInterval, validityPeriod);
|
||||
log.info("[JT-临时位置跟踪控制] phoneNumber: {}, 时间间隔 {}秒, 位置跟踪有效期 {}秒", phoneNumber, timeInterval, validityPeriod);
|
||||
service.tempPositionTrackingControl(phoneNumber, timeInterval, validityPeriod);
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/confirmation-alarm-message")
|
||||
public void confirmationAlarmMessage(@RequestBody ConfirmationAlarmMessageParam param){
|
||||
|
||||
log.info("[1078-人工确认报警消息] 参数: {}", param);
|
||||
log.info("[JT-人工确认报警消息] 参数: {}", param);
|
||||
service.confirmationAlarmMessage(param.getPhoneNumber(), param.getAlarmPackageNo(), param.getAlarmMessageType());
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/link-detection")
|
||||
public WVPResult<Integer> linkDetection(String phoneNumber){
|
||||
|
||||
log.info("[1078-链路检测] phoneNumber: {}", phoneNumber);
|
||||
log.info("[JT-链路检测] phoneNumber: {}", phoneNumber);
|
||||
int result = service.linkDetection(phoneNumber);
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -536,7 +536,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/text-msg")
|
||||
public WVPResult<Integer> textMessage(@RequestBody TextMessageParam textMessageParam){
|
||||
|
||||
log.info("[1078-文本信息下发] textMessageParam: {}", textMessageParam);
|
||||
log.info("[JT-文本信息下发] textMessageParam: {}", textMessageParam);
|
||||
int result = service.textMessage(textMessageParam.getPhoneNumber(), textMessageParam.getSign(), textMessageParam.getTextType(), textMessageParam.getContent());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -554,7 +554,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/telephone-callback")
|
||||
public WVPResult<Integer> telephoneCallback(String phoneNumber, Integer sign, String destPhoneNumber){
|
||||
|
||||
log.info("[1078-电话回拨] phoneNumber: {}, sign: {}, phoneNumber: {},", phoneNumber, sign, phoneNumber);
|
||||
log.info("[JT-电话回拨] phoneNumber: {}, sign: {}, phoneNumber: {},", phoneNumber, sign, phoneNumber);
|
||||
int result = service.telephoneCallback(phoneNumber, sign, destPhoneNumber);
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -570,7 +570,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/set-phone-book")
|
||||
public WVPResult<Integer> setPhoneBook(@RequestBody SetPhoneBookParam setPhoneBookParam){
|
||||
|
||||
log.info("[1078-设置电话本] setPhoneBookParam: {}", setPhoneBookParam);
|
||||
log.info("[JT-设置电话本] setPhoneBookParam: {}", setPhoneBookParam);
|
||||
int result = service.setPhoneBook(setPhoneBookParam.getPhoneNumber(), setPhoneBookParam.getType(), setPhoneBookParam.getPhoneBookContactList());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -587,7 +587,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/control/door")
|
||||
public WVPResult<Integer> controlDoor(String phoneNumber, Boolean open){
|
||||
|
||||
log.info("[1078-车门控制] phoneNumber: {}, open: {},", phoneNumber, open);
|
||||
log.info("[JT-车门控制] phoneNumber: {}, open: {},", phoneNumber, open);
|
||||
JTPositionBaseInfo positionBaseInfo = service.controlDoor(phoneNumber, open);
|
||||
|
||||
if (open == !positionBaseInfo.getStatus().isDoorLocking()) {
|
||||
@@ -602,7 +602,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/area/circle/update")
|
||||
public WVPResult<Integer> updateAreaForCircle(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-更新圆形区域] areaParam: {},", areaParam);
|
||||
log.info("[JT-更新圆形区域] areaParam: {},", areaParam);
|
||||
int result = service.setAreaForCircle(0, areaParam.getPhoneNumber(), areaParam.getCircleAreaList());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -618,7 +618,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/area/circle/add")
|
||||
public WVPResult<Integer> addAreaForCircle(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-追加圆形区域] areaParam: {},", areaParam);
|
||||
log.info("[JT-追加圆形区域] areaParam: {},", areaParam);
|
||||
int result = service.setAreaForCircle(1, areaParam.getPhoneNumber(), areaParam.getCircleAreaList());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -634,7 +634,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/area/circle/edit")
|
||||
public WVPResult<Integer> editAreaForCircle(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-修改圆形区域] areaParam: {},", areaParam);
|
||||
log.info("[JT-修改圆形区域] areaParam: {},", areaParam);
|
||||
int result = service.setAreaForCircle(2, areaParam.getPhoneNumber(), areaParam.getCircleAreaList());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -651,7 +651,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/area/circle/delete")
|
||||
public WVPResult<Integer> deleteAreaForCircle(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-删除圆形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-删除圆形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
int result = service.deleteAreaForCircle(phoneNumber, ids);
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -667,7 +667,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/area/circle/query")
|
||||
public WVPResult<List<JTAreaOrRoute>> queryAreaForCircle(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-查询圆形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-查询圆形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
List<JTAreaOrRoute> result = service.queryAreaForCircle(phoneNumber, ids);
|
||||
if (result != null) {
|
||||
return WVPResult.success(result);
|
||||
@@ -682,7 +682,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/area/rectangle/update")
|
||||
public WVPResult<Integer> updateAreaForRectangle(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-更新矩形区域] areaParam: {},", areaParam);
|
||||
log.info("[JT-更新矩形区域] areaParam: {},", areaParam);
|
||||
int result = service.setAreaForRectangle(0, areaParam.getPhoneNumber(), areaParam.getRectangleAreas());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -698,7 +698,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/area/rectangle/add")
|
||||
public WVPResult<Integer> addAreaForRectangle(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-追加矩形区域] areaParam: {},", areaParam);
|
||||
log.info("[JT-追加矩形区域] areaParam: {},", areaParam);
|
||||
int result = service.setAreaForRectangle(1, areaParam.getPhoneNumber(), areaParam.getRectangleAreas());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -714,7 +714,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/area/rectangle/edit")
|
||||
public WVPResult<Integer> editAreaForRectangle(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-修改矩形区域] areaParam: {},", areaParam);
|
||||
log.info("[JT-修改矩形区域] areaParam: {},", areaParam);
|
||||
int result = service.setAreaForRectangle(2, areaParam.getPhoneNumber(), areaParam.getRectangleAreas());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -731,7 +731,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/area/rectangle/delete")
|
||||
public WVPResult<Integer> deleteAreaForRectangle(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-删除矩形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-删除矩形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
int result = service.deleteAreaForRectangle(phoneNumber, ids);
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -747,7 +747,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/area/rectangle/query")
|
||||
public WVPResult<List<JTAreaOrRoute>> queryAreaForRectangle(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-查询矩形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-查询矩形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
List<JTAreaOrRoute> result = service.queryAreaForRectangle(phoneNumber, ids);
|
||||
if (result != null) {
|
||||
return WVPResult.success(result);
|
||||
@@ -761,7 +761,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/area/polygon/set")
|
||||
public WVPResult<Integer> setAreaForPolygon(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-设置多边形区域] areaParam: {},", areaParam);
|
||||
log.info("[JT-设置多边形区域] areaParam: {},", areaParam);
|
||||
int result = service.setAreaForPolygon(areaParam.getPhoneNumber(), areaParam.getPolygonArea());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -778,7 +778,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/area/polygon/delete")
|
||||
public WVPResult<Integer> deleteAreaForPolygon(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-删除多边形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-删除多边形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
int result = service.deleteAreaForPolygon(phoneNumber, ids);
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -794,7 +794,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/area/polygon/query")
|
||||
public WVPResult<List<JTAreaOrRoute>> queryAreaForPolygon(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-查询多边形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-查询多边形区域] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
List<JTAreaOrRoute> result = service.queryAreaForPolygon(phoneNumber, ids);
|
||||
if (result != null) {
|
||||
return WVPResult.success(result);
|
||||
@@ -808,7 +808,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/route/set")
|
||||
public WVPResult<Integer> setRoute(@RequestBody SetAreaParam areaParam){
|
||||
|
||||
log.info("[1078-设置路线] areaParam: {},", areaParam);
|
||||
log.info("[JT-设置路线] areaParam: {},", areaParam);
|
||||
int result = service.setRoute(areaParam.getPhoneNumber(), areaParam.getRoute());
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -825,7 +825,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/route/delete")
|
||||
public WVPResult<Integer> deleteRoute(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-删除路线] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-删除路线] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
int result = service.deleteRoute(phoneNumber, ids);
|
||||
if (result == 0) {
|
||||
return WVPResult.success(result);
|
||||
@@ -841,7 +841,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/route/query")
|
||||
public WVPResult<List<JTAreaOrRoute>> queryRoute(String phoneNumber, @RequestParam(value = "ids", required = false) List<Long> ids){
|
||||
|
||||
log.info("[1078-查询路线] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
log.info("[JT-查询路线] phoneNumber: {}, ids:{}", phoneNumber, ids);
|
||||
List<JTAreaOrRoute> result = service.queryRoute(phoneNumber, ids);
|
||||
if (result != null) {
|
||||
return WVPResult.success(result);
|
||||
@@ -857,7 +857,7 @@ public class JT1078Controller {
|
||||
@GetMapping("/driver-information")
|
||||
public WVPResult<JTDriverInformation> queryDriverInformation(String phoneNumber){
|
||||
|
||||
log.info("[1078-上报驾驶员身份信息请求] phoneNumber: {}", phoneNumber);
|
||||
log.info("[JT-上报驾驶员身份信息请求] phoneNumber: {}", phoneNumber);
|
||||
JTDriverInformation jtDriverInformation = service.queryDriverInformation(phoneNumber);
|
||||
if (jtDriverInformation != null) {
|
||||
return WVPResult.success(jtDriverInformation);
|
||||
@@ -871,7 +871,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/shooting")
|
||||
public WVPResult<List<Long>> shooting(@RequestBody ShootingParam param){
|
||||
|
||||
log.info("[1078-摄像头立即拍摄命令] param: {}", param );
|
||||
log.info("[JT-摄像头立即拍摄命令] param: {}", param );
|
||||
List<Long> ids = service.shooting(param.getPhoneNumber(), param.getShootingCommand());
|
||||
if (ids != null) {
|
||||
return WVPResult.success(ids);
|
||||
@@ -885,7 +885,7 @@ public class JT1078Controller {
|
||||
@PostMapping("/media-data-info")
|
||||
public WVPResult<List<JTMediaDataInfo>> queryMediaData(@RequestBody QueryMediaDataParam param){
|
||||
|
||||
log.info("[1078-存储多媒体数据检索] param: {}", param );
|
||||
log.info("[JT-存储多媒体数据检索] param: {}", param );
|
||||
List<JTMediaDataInfo> ids = service.queryMediaData(param.getPhoneNumber(), param.getQueryMediaDataCommand());
|
||||
if (ids != null) {
|
||||
return WVPResult.success(ids);
|
||||
@@ -899,12 +899,12 @@ public class JT1078Controller {
|
||||
@PostMapping("/media-data-upload")
|
||||
public DeferredResult<WVPResult<List<String>>> updateMediaData(@RequestBody QueryMediaDataParam param){
|
||||
|
||||
log.info("[1078-存储多媒体数据上传命令] param: {}", param );
|
||||
log.info("[JT-存储多媒体数据上传命令] param: {}", param );
|
||||
DeferredResult<WVPResult<List<String>>> deferredResult = new DeferredResult<>(30000L);
|
||||
List<String> resultList = new ArrayList<>();
|
||||
|
||||
deferredResult.onTimeout(()->{
|
||||
log.info("[1078-存储多媒体数据上传命令超时] param: {}", param );
|
||||
log.info("[JT-存储多媒体数据上传命令超时] param: {}", param );
|
||||
WVPResult<List<String>> fail = WVPResult.fail(ErrorCode.ERROR100);
|
||||
fail.setMsg("超时");
|
||||
fail.setData(resultList);
|
||||
@@ -945,7 +945,7 @@ public class JT1078Controller {
|
||||
try {
|
||||
monitor.start();
|
||||
} catch (Exception e) {
|
||||
log.info("[1078-存储多媒体数据上传命令监听文件失败] param: {}", param );
|
||||
log.info("[JT-存储多媒体数据上传命令监听文件失败] param: {}", param );
|
||||
deferredResult.setResult(null);
|
||||
return deferredResult;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.genersoft.iot.vmp.jt1078.proc;
|
||||
|
||||
import com.genersoft.iot.vmp.jt1078.util.Bin;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author QingtaiJiang
|
||||
* @date 2023/4/27 18:22
|
||||
* @email qingtaij@163.com
|
||||
*/
|
||||
@Data
|
||||
public class Header {
|
||||
// 消息ID
|
||||
String msgId;
|
||||
@@ -24,46 +26,6 @@ public class Header {
|
||||
Short version = -1;
|
||||
|
||||
|
||||
public String getMsgId() {
|
||||
return msgId;
|
||||
}
|
||||
|
||||
public void setMsgId(String msgId) {
|
||||
this.msgId = msgId;
|
||||
}
|
||||
|
||||
public Integer getMsgPro() {
|
||||
return msgPro;
|
||||
}
|
||||
|
||||
public void setMsgPro(Integer msgPro) {
|
||||
this.msgPro = msgPro;
|
||||
}
|
||||
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public Integer getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(Integer sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public Short getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Short version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是2019的版本
|
||||
*
|
||||
|
||||
@@ -172,6 +172,9 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
if (channel == null) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "通道不存在");
|
||||
}
|
||||
|
||||
String app = "1078";
|
||||
String stream = phoneNumber + "_" + channelId;
|
||||
// 检查流是否已经存在,存在则返回
|
||||
String playKey = VideoManagerConstants.INVITE_INFO_1078_PLAY + phoneNumber + ":" + channelId;
|
||||
List<CommonCallback<WVPResult<StreamInfo>>> errorCallbacks = inviteErrorCallbackMap.computeIfAbsent(playKey, k -> new ArrayList<>());
|
||||
@@ -181,9 +184,9 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
MediaServer mediaServer = streamInfo.getMediaServer();
|
||||
if (mediaServer != null) {
|
||||
// 查询流是否存在,不存在则删除缓存数据
|
||||
MediaInfo mediaInfo = mediaServerService.getMediaInfo(mediaServer, "rtp", streamInfo.getStream());
|
||||
MediaInfo mediaInfo = mediaServerService.getMediaInfo(mediaServer, app, streamInfo.getStream());
|
||||
if (mediaInfo != null) {
|
||||
log.info("[1078-点播] 点播已经存在,直接返回, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-点播] 点播已经存在,直接返回, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
errorCallback.run(new WVPResult<>(InviteErrorCode.SUCCESS.getCode(), InviteErrorCode.SUCCESS.getMsg(), streamInfo));
|
||||
}
|
||||
@@ -193,7 +196,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
// 清理数据
|
||||
redisTemplate.delete(playKey);
|
||||
}
|
||||
String stream = "jt_" + phoneNumber + "_" + channelId;
|
||||
|
||||
MediaServer mediaServer = mediaServerService.getMediaServerForMinimumLoad(null);
|
||||
if (mediaServer == null) {
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
@@ -202,10 +205,10 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
return;
|
||||
}
|
||||
// 设置hook监听
|
||||
Hook hook = Hook.getInstance(HookType.on_media_arrival, "rtp", stream, mediaServer.getId());
|
||||
Hook hook = Hook.getInstance(HookType.on_media_arrival, app, stream, mediaServer.getId());
|
||||
subscribe.addSubscribe(hook, (hookData) -> {
|
||||
dynamicTask.stop(playKey);
|
||||
log.info("[1078-点播] 点播成功, 手机号: {}, 通道: {}", phoneNumber, channelId);
|
||||
log.info("[JT-点播] 点播成功, 手机号: {}, 通道: {}", phoneNumber, channelId);
|
||||
// TODO 发送9105 实时音视频传输状态通知, 通知丢包率
|
||||
StreamInfo info = onPublishHandler(mediaServer, hookData, phoneNumber, channelId);
|
||||
|
||||
@@ -222,26 +225,30 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
String fileName = phoneNumber + "_" + channelId + ".jpg";
|
||||
// 请求截图
|
||||
log.info("[请求截图]: " + fileName);
|
||||
mediaServerService.getSnap(mediaServer, "rtp", stream, 15, 1, path, fileName);
|
||||
mediaServerService.getSnap(mediaServer, app, stream, 15, 1, path, fileName);
|
||||
});
|
||||
// 开启收流端口
|
||||
SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServer, stream, "000", false, false, 0, false, !channel.isHasAudio(), false, 1);
|
||||
SSRCInfo ssrcInfo = mediaServerService.openJTTServer(mediaServer, stream, null, false, !channel.isHasAudio(), 1);
|
||||
if (ssrcInfo == null) {
|
||||
stopPlay(phoneNumber, channelId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 设置超时监听
|
||||
dynamicTask.startDelay(playKey, () -> {
|
||||
log.info("[1078-点播] 超时, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-点播] 超时, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
errorCallback.run(new WVPResult<>(InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode(),
|
||||
InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getMsg(), null));
|
||||
}
|
||||
mediaServerService.closeRTPServer(mediaServer, stream);
|
||||
mediaServerService.closeJTTServer(mediaServer, stream, null);
|
||||
subscribe.removeSubscribe(hook);
|
||||
stopPlay(phoneNumber, channelId);
|
||||
}, userSetting.getPlayTimeout());
|
||||
|
||||
log.info("[1078-点播] phoneNumber: {}, channelId: {},IP: {}, 端口: {}", phoneNumber, channelId, mediaServer.getSdpIp(), ssrcInfo.getPort());
|
||||
log.info("[JT-点播] phoneNumber: {}, channelId: {},IP: {}, 端口: {}", phoneNumber, channelId, mediaServer.getSdpIp(), ssrcInfo.getPort());
|
||||
J9101 j9101 = new J9101();
|
||||
j9101.setChannel(channelId);
|
||||
j9101.setIp(mediaServer.getSdpIp());
|
||||
@@ -253,7 +260,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
}
|
||||
|
||||
public StreamInfo onPublishHandler(MediaServer mediaServerItem, HookData hookData, String phoneNumber, Integer channelId) {
|
||||
StreamInfo streamInfo = mediaServerService.getStreamInfoByAppAndStream(mediaServerItem, "rtp", hookData.getStream(), hookData.getMediaInfo(), null);
|
||||
StreamInfo streamInfo = mediaServerService.getStreamInfoByAppAndStream(mediaServerItem, "1078", hookData.getStream(), hookData.getMediaInfo(), null);
|
||||
streamInfo.setDeviceId(phoneNumber);
|
||||
streamInfo.setChannelId(channelId);
|
||||
return streamInfo;
|
||||
@@ -279,11 +286,11 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
j9102.setCloseType(0);
|
||||
j9102.setStreamType(1);
|
||||
jt1078Template.stopLive(phoneNumber, j9102, 6);
|
||||
log.info("[1078-停止点播] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-停止点播] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
// 删除缓存数据
|
||||
if (streamInfo != null) {
|
||||
// 关闭rtpServer
|
||||
mediaServerService.closeRTPServer(streamInfo.getMediaServer(), streamInfo.getStream());
|
||||
mediaServerService.closeJTTServer(streamInfo.getMediaServer(), streamInfo.getStream(), null);
|
||||
redisTemplate.delete(playKey);
|
||||
}
|
||||
|
||||
@@ -295,9 +302,9 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
dynamicTask.stop(playKey);
|
||||
StreamInfo streamInfo = (StreamInfo) redisTemplate.opsForValue().get(playKey);
|
||||
if (streamInfo == null) {
|
||||
log.info("[1078-暂停点播] 未找到点播信息 phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-暂停点播] 未找到点播信息 phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
}
|
||||
log.info("[1078-暂停点播] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-暂停点播] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
// 发送暂停命令
|
||||
J9102 j9102 = new J9102();
|
||||
j9102.setChannel(Integer.valueOf(channelId));
|
||||
@@ -313,9 +320,9 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
dynamicTask.stop(playKey);
|
||||
StreamInfo streamInfo = (StreamInfo) redisTemplate.opsForValue().get(playKey);
|
||||
if (streamInfo == null) {
|
||||
log.info("[1078-继续点播] 未找到点播信息 phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-继续点播] 未找到点播信息 phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
}
|
||||
log.info("[1078-继续点播] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-继续点播] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
// 发送暂停命令
|
||||
J9102 j9102 = new J9102();
|
||||
j9102.setChannel(Integer.valueOf(channelId));
|
||||
@@ -327,7 +334,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
|
||||
@Override
|
||||
public List<J1205.JRecordItem> getRecordList(String phoneNumber, Integer channelId, String startTime, String endTime) {
|
||||
log.info("[1078-查询录像列表] phoneNumber: {}, channelId: {}, startTime: {}, endTime: {}"
|
||||
log.info("[JT-查询录像列表] phoneNumber: {}, channelId: {}, startTime: {}, endTime: {}"
|
||||
, phoneNumber, channelId, startTime, endTime);
|
||||
// 发送请求录像列表命令
|
||||
J9205 j9205 = new J9205();
|
||||
@@ -341,7 +348,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
if (JRecordItemList == null || JRecordItemList.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
log.info("[1078-查询录像列表] phoneNumber: {}, channelId: {}, startTime: {}, endTime: {}, 结果: {}条"
|
||||
log.info("[JT-查询录像列表] phoneNumber: {}, channelId: {}, startTime: {}, endTime: {}, 结果: {}条"
|
||||
, phoneNumber, channelId, startTime, endTime, JRecordItemList.size());
|
||||
return JRecordItemList;
|
||||
}
|
||||
@@ -349,7 +356,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
@Override
|
||||
public void playback(String phoneNumber, Integer channelId, String startTime, String endTime, Integer type,
|
||||
Integer rate, Integer playbackType, Integer playbackSpeed, CommonCallback<WVPResult<StreamInfo>> callback) {
|
||||
log.info("[1078-回放] 回放,设备:{}, 通道: {}, 开始时间: {}, 结束时间: {}, 音视频类型: {}, 码流类型: {}, " +
|
||||
log.info("[JT-回放] 回放,设备:{}, 通道: {}, 开始时间: {}, 结束时间: {}, 音视频类型: {}, 码流类型: {}, " +
|
||||
"回放方式: {}, 快进或快退倍数: {}", phoneNumber, channelId, startTime, endTime, type, rate, playbackType, playbackSpeed);
|
||||
// 检查流是否已经存在,存在则返回
|
||||
String playbackKey = VideoManagerConstants.INVITE_INFO_1078_PLAYBACK + phoneNumber + ":" + channelId;
|
||||
@@ -361,9 +368,9 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
MediaServer mediaServer = streamInfo.getMediaServer();
|
||||
if (mediaServer != null) {
|
||||
// 查询流是否存在,不存在则删除缓存数据
|
||||
MediaInfo mediaInfo = mediaServerService.getMediaInfo(mediaServer, "rtp", streamInfo.getStream());
|
||||
MediaInfo mediaInfo = mediaServerService.getMediaInfo(mediaServer, "1078", streamInfo.getStream());
|
||||
if (mediaInfo != null) {
|
||||
log.info("[1078-回放] 回放已经存在,直接返回, logInfo: {}", logInfo);
|
||||
log.info("[JT-回放] 回放已经存在,直接返回, logInfo: {}", logInfo);
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
errorCallback.run(new WVPResult<>(InviteErrorCode.SUCCESS.getCode(), InviteErrorCode.SUCCESS.getMsg(), streamInfo));
|
||||
}
|
||||
@@ -384,10 +391,10 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
return;
|
||||
}
|
||||
// 设置hook监听
|
||||
Hook hookSubscribe = Hook.getInstance(HookType.on_media_arrival, "rtp", stream, mediaServer.getId());
|
||||
Hook hookSubscribe = Hook.getInstance(HookType.on_media_arrival, "1078", stream, mediaServer.getId());
|
||||
subscribe.addSubscribe(hookSubscribe, (hookData) -> {
|
||||
dynamicTask.stop(playbackKey);
|
||||
log.info("[1078-回放] 回放成功, logInfo: {}", logInfo);
|
||||
log.info("[JT-回放] 回放成功, logInfo: {}", logInfo);
|
||||
StreamInfo info = onPublishHandler(mediaServer, hookData, phoneNumber, channelId);
|
||||
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
@@ -401,7 +408,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
});
|
||||
// 设置超时监听
|
||||
dynamicTask.startDelay(playbackKey, () -> {
|
||||
log.info("[1078-回放] 回放超时, logInfo: {}", logInfo);
|
||||
log.info("[JT-回放] 回放超时, logInfo: {}", logInfo);
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
errorCallback.run(new WVPResult<>(InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode(),
|
||||
InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getMsg(), null));
|
||||
@@ -410,8 +417,8 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
}, userSetting.getPlayTimeout());
|
||||
|
||||
// 开启收流端口
|
||||
SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServer, stream, null, false, false, 0, false, false, false, 1);
|
||||
log.info("[1078-回放] logInfo: {}, 端口: {}", logInfo, ssrcInfo.getPort());
|
||||
SSRCInfo ssrcInfo = mediaServerService.openJTTServer(mediaServer, stream, null, false, false, 1);
|
||||
log.info("[JT-回放] logInfo: {}, 端口: {}", logInfo, ssrcInfo.getPort());
|
||||
J9201 j9201 = new J9201();
|
||||
j9201.setChannel(channelId);
|
||||
j9201.setIp(mediaServer.getSdpIp());
|
||||
@@ -436,7 +443,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
|
||||
@Override
|
||||
public void playbackControl(String phoneNumber, Integer channelId, Integer command, Integer playbackSpeed, String time) {
|
||||
log.info("[1078-回放控制] phoneNumber: {}, channelId: {}, command: {}, playbackSpeed: {}, time: {}",
|
||||
log.info("[JT-回放控制] phoneNumber: {}, channelId: {}, command: {}, playbackSpeed: {}, time: {}",
|
||||
phoneNumber, channelId, command, playbackSpeed, time);
|
||||
String playKey = VideoManagerConstants.INVITE_INFO_1078_PLAYBACK + phoneNumber + ":" + channelId;
|
||||
dynamicTask.stop(playKey);
|
||||
@@ -446,7 +453,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
// 删除缓存数据
|
||||
if (streamInfo != null) {
|
||||
// 关闭rtpServer
|
||||
mediaServerService.closeRTPServer(streamInfo.getMediaServer(), streamInfo.getStream());
|
||||
mediaServerService.closeJTTServer(streamInfo.getMediaServer(), streamInfo.getStream(), null);
|
||||
}
|
||||
// 清理回调
|
||||
List<CommonCallback<WVPResult<StreamInfo>>> generalCallbacks = inviteErrorCallbackMap.get(playKey);
|
||||
@@ -555,10 +562,10 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
}
|
||||
if (onlySend == null || !onlySend) {
|
||||
// 设置hook监听
|
||||
Hook hook = Hook.getInstance(HookType.on_media_arrival, "rtp", receiveStream, mediaServer.getId());
|
||||
Hook hook = Hook.getInstance(HookType.on_media_arrival, "1078", receiveStream, mediaServer.getId());
|
||||
subscribe.addSubscribe(hook, (hookData) -> {
|
||||
dynamicTask.stop(playKey);
|
||||
log.info("[1078-对讲] 对讲成功, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-对讲] 对讲成功, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
StreamInfo info = onPublishHandler(mediaServer, hookData, phoneNumber, channelId);
|
||||
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
@@ -569,14 +576,14 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
// 存储发流信息
|
||||
sendRtpServerService.update(sendRtpInfo);
|
||||
});
|
||||
Hook hookForDeparture = Hook.getInstance(HookType.on_media_departure, "rtp", receiveStream, mediaServer.getId());
|
||||
Hook hookForDeparture = Hook.getInstance(HookType.on_media_departure, "1078", receiveStream, mediaServer.getId());
|
||||
subscribe.addSubscribe(hookForDeparture, (hookData) -> {
|
||||
log.info("[1078-对讲] 对讲时源流注销, app: {}. stream: {}, phoneNumber: {}, channelId: {}", app, stream, phoneNumber, channelId);
|
||||
log.info("[JT-对讲] 对讲时源流注销, app: {}. stream: {}, phoneNumber: {}, channelId: {}", app, stream, phoneNumber, channelId);
|
||||
stopTalk(phoneNumber, channelId);
|
||||
});
|
||||
// 设置超时监听
|
||||
dynamicTask.startDelay(playKey, () -> {
|
||||
log.info("[1078-对讲] 超时, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-对讲] 超时, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
errorCallback.run(new WVPResult<>(InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode(),
|
||||
InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getMsg(), null));
|
||||
@@ -585,7 +592,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
}, userSetting.getPlayTimeout());
|
||||
}
|
||||
|
||||
log.info("[1078-对讲] phoneNumber: {}, channelId: {}, 收发端口: {}, app: {}, stream: {}",
|
||||
log.info("[JT-对讲] phoneNumber: {}, channelId: {}, 收发端口: {}, app: {}, stream: {}",
|
||||
phoneNumber, channelId, sendRtpInfo.getLocalPort(), app, stream);
|
||||
J9101 j9101 = new J9101();
|
||||
j9101.setChannel(Integer.valueOf(channelId));
|
||||
@@ -596,7 +603,7 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
j9101.setType(2);
|
||||
jt1078Template.startLive(phoneNumber, j9101, 6);
|
||||
if (onlySend != null && onlySend) {
|
||||
log.info("[1078-对讲] 对讲成功, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-对讲] 对讲成功, phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
|
||||
errorCallback.run(new WVPResult<>(InviteErrorCode.SUCCESS.getCode(), InviteErrorCode.SUCCESS.getMsg(), null));
|
||||
}
|
||||
@@ -617,12 +624,12 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
|
||||
j9102.setCloseType(0);
|
||||
j9102.setStreamType(1);
|
||||
jt1078Template.stopLive(phoneNumber, j9102, 6);
|
||||
log.info("[1078-停止对讲] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
log.info("[JT-停止对讲] phoneNumber: {}, channelId: {}", phoneNumber, channelId);
|
||||
// 删除缓存数据
|
||||
if (streamInfo != null) {
|
||||
redisTemplate.delete(playKey);
|
||||
// 关闭rtpServer
|
||||
mediaServerService.closeRTPServer(streamInfo.getMediaServer(), streamInfo.getStream());
|
||||
mediaServerService.closeJTTServer(streamInfo.getMediaServer(), streamInfo.getStream(), null);
|
||||
}
|
||||
// 清理回调
|
||||
List<CommonCallback<WVPResult<StreamInfo>>> generalCallbacks = inviteErrorCallbackMap.get(playKey);
|
||||
|
||||
@@ -174,7 +174,7 @@ public class jt1078ServiceImpl implements Ijt1078Service {
|
||||
dynamicTask.startDelay(filePath, ()->{
|
||||
fileUploadMap.remove(filePath);
|
||||
}, 2*60*60*1000);
|
||||
log.info("[1078-录像] 下载,设备:{}, 通道: {}, 开始时间: {}, 结束时间: {},等待上传文件路径: {} ",
|
||||
log.info("[JT-录像] 下载,设备:{}, 通道: {}, 开始时间: {}, 结束时间: {},等待上传文件路径: {} ",
|
||||
phoneNumber, channelId, startTime, endTime, filePath);
|
||||
// 发送停止命令
|
||||
J9206 j92026 = new J9206();
|
||||
@@ -575,9 +575,9 @@ public class jt1078ServiceImpl implements Ijt1078Service {
|
||||
dynamicTask.stop(playKey);
|
||||
StreamInfo streamInfo = (StreamInfo) redisTemplate.opsForValue().get(playKey);
|
||||
if (streamInfo == null) {
|
||||
log.info("[1078-切换码流类型] 未找到点播信息 phoneNumber: {}, channelId: {}, streamType: {}", phoneNumber, channelId, streamType);
|
||||
log.info("[JT-切换码流类型] 未找到点播信息 phoneNumber: {}, channelId: {}, streamType: {}", phoneNumber, channelId, streamType);
|
||||
}
|
||||
log.info("[1078-切换码流类型] phoneNumber: {}, channelId: {}, streamType: {}", phoneNumber, channelId, streamType);
|
||||
log.info("[JT-切换码流类型] phoneNumber: {}, channelId: {}, streamType: {}", phoneNumber, channelId, streamType);
|
||||
// 发送暂停命令
|
||||
J9102 j9102 = new J9102();
|
||||
j9102.setChannel(Integer.valueOf(channelId));
|
||||
|
||||
Reference in New Issue
Block a user