mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 22:47:49 +08:00
Merge branch 'master' into dev/前端页面修改
This commit is contained in:
commit
72a0c1a27e
@ -18,7 +18,6 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.sip.message.Response;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|||||||
@ -2,10 +2,12 @@ package com.genersoft.iot.vmp.gb28181.bean;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务分组
|
* 业务分组
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "业务分组树")
|
@Schema(description = "业务分组树")
|
||||||
public class GroupTree extends Group{
|
public class GroupTree extends Group{
|
||||||
|
|||||||
@ -2,10 +2,12 @@ package com.genersoft.iot.vmp.gb28181.bean;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区域
|
* 区域
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "区域树")
|
@Schema(description = "区域树")
|
||||||
public class RegionTree extends Region {
|
public class RegionTree extends Region {
|
||||||
|
|||||||
@ -1723,7 +1723,14 @@ public class PlayServiceImpl implements IPlayService {
|
|||||||
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
||||||
}
|
}
|
||||||
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId());
|
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId());
|
||||||
play(device, deviceChannel, callback);
|
|
||||||
|
MediaServer mediaServerItem = getNewMediaServerItem(device);
|
||||||
|
if (mediaServerItem == null) {
|
||||||
|
log.warn("[点播] 未找到可用的zlm deviceId: {},channelId:{}", device.getDeviceId(), deviceChannel.getDeviceId());
|
||||||
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到可用的zlm");
|
||||||
|
}
|
||||||
|
play(mediaServerItem, device, deviceChannel, null, record, callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -628,8 +628,13 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||||||
request.getCallIdHeader().getCallId(), sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getSsrc(), sendRtpItem.getMediaServerId(), sipResponse, InviteSessionType.BROADCAST);
|
request.getCallIdHeader().getCallId(), sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getSsrc(), sendRtpItem.getMediaServerId(), sipResponse, InviteSessionType.BROADCAST);
|
||||||
sessionManager.put(ssrcTransaction);
|
sessionManager.put(ssrcTransaction);
|
||||||
// 开启发流,大华在收到200OK后就会开始建立连接
|
// 开启发流,大华在收到200OK后就会开始建立连接
|
||||||
if (!device.isBroadcastPushAfterAck()) {
|
if (sendRtpItem.isTcpActive() || !device.isBroadcastPushAfterAck()) {
|
||||||
log.info("[语音喊话] 回复200OK后发现 BroadcastPushAfterAck为False,现在开始推流");
|
if (sendRtpItem.isTcpActive()) {
|
||||||
|
log.info("[语音喊话] 监听端口等待设备连接后推流");
|
||||||
|
}else {
|
||||||
|
log.info("[语音喊话] 回复200OK后发现 BroadcastPushAfterAck为False,现在开始推流");
|
||||||
|
}
|
||||||
|
|
||||||
playService.startPushStream(sendRtpItem, channel, sipResponse, parentPlatform, request.getCallIdHeader());
|
playService.startPushStream(sendRtpItem, channel, sipResponse, parentPlatform, request.getCallIdHeader());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,9 @@ public class ZLMHttpHookListener {
|
|||||||
String mediaServerId = json.getString("mediaServerId");
|
String mediaServerId = json.getString("mediaServerId");
|
||||||
MediaServer mediaServer = mediaServerService.getOne(mediaServerId);
|
MediaServer mediaServer = mediaServerService.getOne(mediaServerId);
|
||||||
if (mediaServer == null) {
|
if (mediaServer == null) {
|
||||||
return new HookResultForOnPublish(0, "success");
|
HookResultForOnPublish fail = HookResultForOnPublish.Fail();
|
||||||
|
log.warn("[ZLM HOOK]推流鉴权 响应:{}->找不到对应的mediaServer", param.getMediaServerId());
|
||||||
|
return fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultForOnPublish resultForOnPublish = mediaService.authenticatePublish(mediaServer, param.getApp(), param.getStream(), param.getParams());
|
ResultForOnPublish resultForOnPublish = mediaService.authenticatePublish(mediaServer, param.getApp(), param.getStream(), param.getParams());
|
||||||
|
|||||||
@ -51,6 +51,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
private UserSetting userSetting;
|
private UserSetting userSetting;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
||||||
private IMediaServerService mediaServerService;
|
private IMediaServerService mediaServerService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -576,13 +577,13 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
if (streamPushList.isEmpty()) {
|
if (streamPushList.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<CommonGBChannel> commonGBChannelList = new ArrayList<>();
|
Set<Integer> channelIds = new HashSet<>();
|
||||||
streamPushList.stream().forEach(streamPush -> {
|
streamPushList.stream().forEach(streamPush -> {
|
||||||
if (streamPush.getGbDeviceId() != null) {
|
if (streamPush.getGbDeviceId() != null) {
|
||||||
commonGBChannelList.add(streamPush.buildCommonGBChannel());
|
channelIds.add(streamPush.getGbId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
streamPushMapper.batchDel(streamPushList);
|
streamPushMapper.batchDel(streamPushList);
|
||||||
gbChannelService.delete(ids);
|
gbChannelService.delete(channelIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,7 +55,12 @@ public class CloudRecordController {
|
|||||||
@Parameter(name = "year", description = "年,置空则查询当年", required = false)
|
@Parameter(name = "year", description = "年,置空则查询当年", required = false)
|
||||||
@Parameter(name = "month", description = "月,置空则查询当月", required = false)
|
@Parameter(name = "month", description = "月,置空则查询当月", required = false)
|
||||||
@Parameter(name = "mediaServerId", description = "流媒体ID,置空则查询全部", required = false)
|
@Parameter(name = "mediaServerId", description = "流媒体ID,置空则查询全部", required = false)
|
||||||
public List<String> openRtpServer(@RequestParam(required = true) String app, @RequestParam(required = true) String stream, @RequestParam(required = false) Integer year, @RequestParam(required = false) Integer month, @RequestParam(required = false) String mediaServerId
|
public List<String> openRtpServer(
|
||||||
|
@RequestParam(required = true) String app,
|
||||||
|
@RequestParam(required = true) String stream,
|
||||||
|
@RequestParam(required = false) Integer year,
|
||||||
|
@RequestParam(required = false) Integer month,
|
||||||
|
@RequestParam(required = false) String mediaServerId
|
||||||
|
|
||||||
) {
|
) {
|
||||||
log.info("[云端录像] 查询存在云端录像的日期 app->{}, stream->{}, mediaServerId->{}, year->{}, month->{}", app, stream, mediaServerId, year, month);
|
log.info("[云端录像] 查询存在云端录像的日期 app->{}, stream->{}, mediaServerId->{}, year->{}, month->{}", app, stream, mediaServerId, year, month);
|
||||||
@ -96,7 +101,15 @@ public class CloudRecordController {
|
|||||||
@Parameter(name = "endTime", description = "结束时间(yyyy-MM-dd HH:mm:ss)", required = false)
|
@Parameter(name = "endTime", description = "结束时间(yyyy-MM-dd HH:mm:ss)", required = false)
|
||||||
@Parameter(name = "mediaServerId", description = "流媒体ID,置空则查询全部流媒体", required = false)
|
@Parameter(name = "mediaServerId", description = "流媒体ID,置空则查询全部流媒体", required = false)
|
||||||
@Parameter(name = "callId", description = "每次录像的唯一标识,置空则查询全部流媒体", required = false)
|
@Parameter(name = "callId", description = "每次录像的唯一标识,置空则查询全部流媒体", required = false)
|
||||||
public PageInfo<CloudRecordItem> openRtpServer(@RequestParam(required = false) String query, @RequestParam(required = false) String app, @RequestParam(required = false) String stream, @RequestParam int page, @RequestParam int count, @RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String mediaServerId, @RequestParam(required = false) String callId
|
public PageInfo<CloudRecordItem> openRtpServer(@RequestParam(required = false) String query,
|
||||||
|
@RequestParam(required = false) String app,
|
||||||
|
@RequestParam(required = false) String stream,
|
||||||
|
@RequestParam int page,
|
||||||
|
@RequestParam int count,
|
||||||
|
@RequestParam(required = false) String startTime,
|
||||||
|
@RequestParam(required = false) String endTime,
|
||||||
|
@RequestParam(required = false) String mediaServerId,
|
||||||
|
@RequestParam(required = false) String callId
|
||||||
|
|
||||||
) {
|
) {
|
||||||
log.info("[云端录像] 查询 app->{}, stream->{}, mediaServerId->{}, page->{}, count->{}, startTime->{}, endTime->{}, callId->{}", app, stream, mediaServerId, page, count, startTime, endTime, callId);
|
log.info("[云端录像] 查询 app->{}, stream->{}, mediaServerId->{}, page->{}, count->{}, startTime->{}, endTime->{}, callId->{}", app, stream, mediaServerId, page, count, startTime, endTime, callId);
|
||||||
|
|||||||
@ -37,10 +37,9 @@ public class ApiControlController {
|
|||||||
* @param channel 通道序号
|
* @param channel 通道序号
|
||||||
* @param code 通道编号
|
* @param code 通道编号
|
||||||
* @param speed 速度(0~255) 默认值: 129
|
* @param speed 速度(0~255) 默认值: 129
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/ptz")
|
@GetMapping(value = "/ptz")
|
||||||
private void list(String serial,String command,
|
private void ptz(String serial,String command,
|
||||||
@RequestParam(required = false)Integer channel,
|
@RequestParam(required = false)Integer channel,
|
||||||
@RequestParam(required = false)String code,
|
@RequestParam(required = false)String code,
|
||||||
@RequestParam(required = false)Integer speed){
|
@RequestParam(required = false)Integer speed){
|
||||||
@ -55,7 +54,7 @@ public class ApiControlController {
|
|||||||
if (device == null) {
|
if (device == null) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "device[ " + serial + " ]未找到");
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "device[ " + serial + " ]未找到");
|
||||||
}
|
}
|
||||||
int cmdCode = 0;
|
int cmdCode = -1;
|
||||||
switch (command){
|
switch (command){
|
||||||
case "left":
|
case "left":
|
||||||
cmdCode = 2;
|
cmdCode = 2;
|
||||||
@ -93,6 +92,9 @@ public class ApiControlController {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (cmdCode == -1) {
|
||||||
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未识别的指令:" + command);
|
||||||
|
}
|
||||||
// 默认值 50
|
// 默认值 50
|
||||||
try {
|
try {
|
||||||
cmder.frontEndCmd(device, code, cmdCode, speed, speed, speed);
|
cmder.frontEndCmd(device, code, cmdCode, speed, speed, speed);
|
||||||
@ -110,7 +112,6 @@ public class ApiControlController {
|
|||||||
* @param command 控制指令 允许值: set, goto, remove
|
* @param command 控制指令 允许值: set, goto, remove
|
||||||
* @param preset 预置位编号(1~255)
|
* @param preset 预置位编号(1~255)
|
||||||
* @param name 预置位名称, command=set 时有效
|
* @param name 预置位名称, command=set 时有效
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/preset")
|
@GetMapping(value = "/preset")
|
||||||
private void list(String serial,String command,
|
private void list(String serial,String command,
|
||||||
|
|||||||
@ -167,7 +167,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.updateLooper = setInterval(this.initData, 10000);
|
this.updateLooper = setInterval(this.getDeviceList, 10000);
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.$destroy('videojs');
|
this.$destroy('videojs');
|
||||||
|
|||||||
@ -6560,7 +6560,7 @@ var ZLMRTCClient = (function (exports) {
|
|||||||
resolve(response);
|
resolve(response);
|
||||||
} else {
|
} else {
|
||||||
reject(new AxiosError_1(
|
reject(new AxiosError_1(
|
||||||
'Request failed with status code ' + response.status,
|
'请求失败, 状态码:' + response.status,
|
||||||
[AxiosError_1.ERR_BAD_REQUEST, AxiosError_1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
[AxiosError_1.ERR_BAD_REQUEST, AxiosError_1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
||||||
response.config,
|
response.config,
|
||||||
response.request,
|
response.request,
|
||||||
@ -7885,7 +7885,7 @@ var ZLMRTCClient = (function (exports) {
|
|||||||
}).then(response => {
|
}).then(response => {
|
||||||
let ret = response.data; //JSON.parse(response.data);
|
let ret = response.data; //JSON.parse(response.data);
|
||||||
if (ret.code != 0) {
|
if (ret.code != 0) {
|
||||||
// mean failed for offer/anwser exchange
|
// mean failed for offer/anwser exchange
|
||||||
this.dispatch(Events$1.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED, ret);
|
this.dispatch(Events$1.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED, ret);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -7989,7 +7989,7 @@ var ZLMRTCClient = (function (exports) {
|
|||||||
}).then(response => {
|
}).then(response => {
|
||||||
let ret = response.data; //JSON.parse(response.data);
|
let ret = response.data; //JSON.parse(response.data);
|
||||||
if (ret.code != 0) {
|
if (ret.code != 0) {
|
||||||
// mean failed for offer/anwser exchange
|
// mean failed for offer/anwser exchange
|
||||||
this.dispatch(Events$1.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED, ret);
|
this.dispatch(Events$1.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED, ret);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -159,6 +159,8 @@ create table IF NOT EXISTS wvp_device_channel
|
|||||||
gps_speed double precision,
|
gps_speed double precision,
|
||||||
gps_altitude double precision,
|
gps_altitude double precision,
|
||||||
gps_direction double precision,
|
gps_direction double precision,
|
||||||
|
index (data_type),
|
||||||
|
index (data_device_id),
|
||||||
constraint uk_wvp_unique_channel unique (gb_device_id)
|
constraint uk_wvp_unique_channel unique (gb_device_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -159,6 +159,8 @@ create table IF NOT EXISTS wvp_device_channel
|
|||||||
gps_speed double precision,
|
gps_speed double precision,
|
||||||
gps_altitude double precision,
|
gps_altitude double precision,
|
||||||
gps_direction double precision,
|
gps_direction double precision,
|
||||||
|
index (data_type),
|
||||||
|
index (data_device_id),
|
||||||
constraint uk_wvp_unique_channel unique (gb_device_id)
|
constraint uk_wvp_unique_channel unique (gb_device_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -171,6 +171,8 @@ create table IF NOT EXISTS wvp_device_channel
|
|||||||
gps_speed double precision,
|
gps_speed double precision,
|
||||||
gps_altitude double precision,
|
gps_altitude double precision,
|
||||||
gps_direction double precision,
|
gps_direction double precision,
|
||||||
|
index (data_type),
|
||||||
|
index (data_device_id),
|
||||||
constraint uk_wvp_unique_channel unique (gb_device_id)
|
constraint uk_wvp_unique_channel unique (gb_device_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -267,5 +267,27 @@ call wvp_20250319();
|
|||||||
DROP PROCEDURE wvp_20250319;
|
DROP PROCEDURE wvp_20250319;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 20250402
|
||||||
|
*/
|
||||||
|
DELIMITER // -- 重定义分隔符避免分号冲突
|
||||||
|
CREATE PROCEDURE `wvp_20250402`()
|
||||||
|
BEGIN
|
||||||
|
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
|
||||||
|
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and INDEX_NAME = 'data_type')
|
||||||
|
THEN
|
||||||
|
create index data_type on wvp_device_channel (data_type);
|
||||||
|
END IF;
|
||||||
|
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
|
||||||
|
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and INDEX_NAME = 'data_device_id')
|
||||||
|
THEN
|
||||||
|
create index data_device_id on wvp_device_channel (data_device_id);
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
END; //
|
||||||
|
call wvp_20250402();
|
||||||
|
DROP PROCEDURE wvp_20250402;
|
||||||
|
DELIMITER ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -137,6 +137,8 @@ create table IF NOT EXISTS wvp_device_channel
|
|||||||
gps_speed double precision,
|
gps_speed double precision,
|
||||||
gps_altitude double precision,
|
gps_altitude double precision,
|
||||||
gps_direction double precision,
|
gps_direction double precision,
|
||||||
|
index (data_type),
|
||||||
|
index (data_device_id),
|
||||||
constraint uk_wvp_unique_channel unique (gb_device_id)
|
constraint uk_wvp_unique_channel unique (gb_device_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -102,4 +102,10 @@ alter table wvp_device_channel add column if not exists gps_speed double precisi
|
|||||||
alter table wvp_device_channel add column if not exists gps_altitude double precision;
|
alter table wvp_device_channel add column if not exists gps_altitude double precision;
|
||||||
alter table wvp_device_channel add column if not exists gps_direction double precision;
|
alter table wvp_device_channel add column if not exists gps_direction double precision;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 20250402
|
||||||
|
*/
|
||||||
|
create index if not exists data_type on wvp_device_channel (data_type);
|
||||||
|
create index if not exists data_device_id on wvp_device_channel (data_device_id);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user