修复更新坐标系时参数坐标系转换失败
This commit is contained in:
@@ -6,9 +6,10 @@ import com.genersoft.iot.vmp.common.enums.ChannelDataType;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.CommonGBChannelMapper;
|
||||
import com.genersoft.iot.vmp.gb28181.service.*;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IGbChannelPlayService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlayService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.ISourceDownloadService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.ISourcePlayService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.ISourcePlaybackService;
|
||||
import com.genersoft.iot.vmp.jt1078.service.Ijt1078PlayService;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||
@@ -89,12 +90,12 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void play(CommonGBChannel channel, Platform platform, Boolean record, ErrorCallback<StreamInfo> callback) {
|
||||
log.info("[通用通道] 播放, 类型: {}, 编号:{}", channel.getDataType(), channel.getGbDeviceId());
|
||||
log.info("[通用通道] 播放, 类型: {}, 编号:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId());
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlayService sourceChannelPlayService = sourcePlayServiceMap.get(ChannelDataType.PLAY_SERVICE + dataType);
|
||||
if (sourceChannelPlayService == null) {
|
||||
// 通道数据异常
|
||||
log.error("[点播通用通道] 类型编号: {} 不支持实时流预览", dataType);
|
||||
log.error("[点播通用通道] 类型编号: {} 不支持实时流预览", ChannelDataType.getDateTypeDesc(channel.getDataType()));
|
||||
throw new PlayException(Response.BUSY_HERE, "channel not support");
|
||||
}
|
||||
sourceChannelPlayService.play(channel, platform, record, (code, msg, data) -> {
|
||||
@@ -109,7 +110,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
}
|
||||
@Override
|
||||
public void playback(CommonGBChannel channel, Long startTime, Long stopTime, ErrorCallback<StreamInfo> callback) {
|
||||
log.info("[通用通道] 回放, 类型: {}, 编号:{}", channel.getDataType(), channel.getGbDeviceId());
|
||||
log.info("[通用通道] 回放, 类型: {}, 编号:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId());
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlaybackService playbackService = sourcePlaybackServiceMap.get(ChannelDataType.PLAYBACK_SERVICE + dataType);
|
||||
if (playbackService == null) {
|
||||
@@ -123,7 +124,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
@Override
|
||||
public void download(CommonGBChannel channel, Long startTime, Long stopTime, Integer downloadSpeed,
|
||||
ErrorCallback<StreamInfo> callback){
|
||||
log.info("[通用通道] 录像下载, 类型: {}, 编号:{}", channel.getDataType(), channel.getGbDeviceId());
|
||||
log.info("[通用通道] 录像下载, 类型: {}, 编号:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId());
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourceDownloadService downloadService = sourceDownloadServiceMap.get(ChannelDataType.DOWNLOAD_SERVICE + dataType);
|
||||
if (downloadService == null) {
|
||||
@@ -148,7 +149,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void stopPlayback(CommonGBChannel channel, String stream) {
|
||||
log.info("[通用通道] 停止回放, 类型: {}, 编号:{}", channel.getDataType(), channel.getGbDeviceId());
|
||||
log.info("[通用通道] 停止回放, 类型: {}, 编号:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId());
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlaybackService playbackService = sourcePlaybackServiceMap.get(ChannelDataType.PLAYBACK_SERVICE + dataType);
|
||||
if (playbackService == null) {
|
||||
@@ -161,7 +162,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void stopDownload(CommonGBChannel channel, String stream) {
|
||||
log.info("[通用通道] 停止录像下载, 类型: {}, 编号:{} stream: {}", channel.getDataType(), channel.getGbDeviceId(), stream);
|
||||
log.info("[通用通道] 停止录像下载, 类型: {}, 编号:{} stream: {}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId(), stream);
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourceDownloadService downloadService = sourceDownloadServiceMap.get(ChannelDataType.DOWNLOAD_SERVICE + dataType);
|
||||
if (downloadService == null) {
|
||||
@@ -174,7 +175,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void playbackPause(CommonGBChannel channel, String stream) {
|
||||
log.info("[通用通道] 回放暂停, 类型: {}, 编号:{} stream:{}", channel.getDataType(), channel.getGbDeviceId(), stream);
|
||||
log.info("[通用通道] 回放暂停, 类型: {}, 编号:{} stream:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId(), stream);
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlaybackService playbackService = sourcePlaybackServiceMap.get(ChannelDataType.PLAYBACK_SERVICE + dataType);
|
||||
if (playbackService == null) {
|
||||
@@ -187,7 +188,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void playbackResume(CommonGBChannel channel, String stream) {
|
||||
log.info("[通用通道] 回放暂停恢复, 类型: {}, 编号:{} stream:{}", channel.getDataType(), channel.getGbDeviceId(), stream);
|
||||
log.info("[通用通道] 回放暂停恢复, 类型: {}, 编号:{} stream:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId(), stream);
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlaybackService playbackService = sourcePlaybackServiceMap.get(ChannelDataType.PLAYBACK_SERVICE + dataType);
|
||||
if (playbackService == null) {
|
||||
@@ -200,7 +201,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void playbackSeek(CommonGBChannel channel, String stream, long seekTime) {
|
||||
log.info("[通用通道] 回放拖动播放, 类型: {}, 编号:{} stream:{}", channel.getDataType(), channel.getGbDeviceId(), stream);
|
||||
log.info("[通用通道] 回放拖动播放, 类型: {}, 编号:{} stream:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId(), stream);
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlaybackService playbackService = sourcePlaybackServiceMap.get(ChannelDataType.PLAYBACK_SERVICE + dataType);
|
||||
if (playbackService == null) {
|
||||
@@ -213,7 +214,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void playbackSpeed(CommonGBChannel channel, String stream, Double speed) {
|
||||
log.info("[通用通道] 回放倍速播放, 类型: {}, 编号:{} stream:{}", channel.getDataType(), channel.getGbDeviceId(), stream);
|
||||
log.info("[通用通道] 回放倍速播放, 类型: {}, 编号:{} stream:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId(), stream);
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlaybackService playbackService = sourcePlaybackServiceMap.get(ChannelDataType.PLAYBACK_SERVICE + dataType);
|
||||
if (playbackService == null) {
|
||||
@@ -226,7 +227,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void queryRecord(CommonGBChannel channel, String startTime, String endTime, ErrorCallback<List<CommonRecordInfo>> callback) {
|
||||
log.info("[通用通道] 录像查询, 类型: {}, 编号:{}", channel.getDataType(), channel.getGbDeviceId());
|
||||
log.info("[通用通道] 录像查询, 类型: {}, 编号:{}", ChannelDataType.getDateTypeDesc(channel.getDataType()), channel.getGbDeviceId());
|
||||
Integer dataType = channel.getDataType();
|
||||
ISourcePlaybackService playbackService = sourcePlaybackServiceMap.get(ChannelDataType.PLAYBACK_SERVICE + dataType);
|
||||
if (playbackService == null) {
|
||||
|
||||
@@ -366,7 +366,7 @@ public class PlayServiceImpl implements IPlayService {
|
||||
InviteErrorCode.SUCCESS.getCode(),
|
||||
InviteErrorCode.SUCCESS.getMsg(),
|
||||
streamInfo);
|
||||
log.info("[点播已存在] 直接返回, deviceId: {}, channelId: {}", device.getDeviceId(), channel.getDeviceId());
|
||||
log.info("[点播已存在] 直接返回, 设备编号: {}, 通道编号: {}", device.getDeviceId(), channel.getDeviceId());
|
||||
return inviteInfoInCatch.getSsrcInfo();
|
||||
}else {
|
||||
// 点播发起了但是尚未成功, 仅注册回调等待结果即可
|
||||
@@ -413,7 +413,7 @@ public class PlayServiceImpl implements IPlayService {
|
||||
InviteErrorCode.SUCCESS.getMsg(),
|
||||
streamInfo);
|
||||
|
||||
log.info("[点播成功] deviceId: {}, channelId:{}, 码流类型:{}", device.getDeviceId(), channel.getDeviceId(),
|
||||
log.info("[点播成功] 设备编号: {}, 通道编号:{}, 码流类型:{}", device.getDeviceId(), channel.getDeviceId(),
|
||||
channel.getStreamIdentification());
|
||||
snapOnPlay(result.getHookData().getMediaServer(), device.getDeviceId(), channel.getDeviceId(), streamId);
|
||||
}else {
|
||||
@@ -435,7 +435,7 @@ public class PlayServiceImpl implements IPlayService {
|
||||
}
|
||||
});
|
||||
if (ssrcInfo == null || ssrcInfo.getPort() <= 0) {
|
||||
log.info("[点播端口/SSRC]获取失败,deviceId={},channelId={},ssrcInfo={}", device.getDeviceId(), channel.getDeviceId(), ssrcInfo);
|
||||
log.info("[点播端口/SSRC]获取失败,设备编号:{}, 通道编号:{},ssrcInfo;{}", device.getDeviceId(), channel.getDeviceId(), ssrcInfo);
|
||||
callback.run(InviteErrorCode.ERROR_FOR_RESOURCE_EXHAUSTION.getCode(), "获取端口或者ssrc失败", null);
|
||||
inviteStreamService.call(InviteSessionType.PLAY, channel.getId(), null,
|
||||
InviteErrorCode.ERROR_FOR_RESOURCE_EXHAUSTION.getCode(),
|
||||
@@ -443,9 +443,9 @@ public class PlayServiceImpl implements IPlayService {
|
||||
null);
|
||||
return null;
|
||||
}
|
||||
log.info("[点播开始] deviceId: {}, channelId({}): {},码流类型:{}, 收流端口: {}, 码流:{}, 收流模式:{}, SSRC: {}, SSRC校验:{}",
|
||||
device.getDeviceId(), channel.getDeviceId(), channel.getId(), channel.getStreamIdentification(), ssrcInfo.getPort(), ssrcInfo.getStream(),
|
||||
device.getStreamMode(), ssrcInfo.getSsrc(), device.isSsrcCheck());
|
||||
log.info("[点播开始] 设备编号: {}, 通道编号: {}, 收流端口: {}, 流ID:{}, 收流模式:{}, SSRC: {}, SSRC校验:{}",
|
||||
device.getDeviceId(), channel.getDeviceId(), channel.getStreamIdentification(), ssrcInfo.getPort(), ssrcInfo.getStream(),
|
||||
ssrcInfo.getSsrc(), device.isSsrcCheck());
|
||||
|
||||
// 初始化redis中的invite消息状态
|
||||
InviteInfo inviteInfo = InviteInfo.getInviteInfo(device.getDeviceId(), channel.getId(), ssrcInfo.getStream(), ssrcInfo, mediaServerItem.getId(),
|
||||
|
||||
@@ -81,8 +81,7 @@ public class MessageRequestProcessor extends SIPRequestProcessorParent implement
|
||||
// 查询设备是否存在
|
||||
Device device = redisCatchStorage.getDevice(deviceId);
|
||||
// 查询上级平台是否存在
|
||||
// Platform parentPlatform = platformService.queryPlatformByServerGBId(deviceId);
|
||||
Platform parentPlatform = null;
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(deviceId);
|
||||
try {
|
||||
if (device != null && parentPlatform != null) {
|
||||
String hostAddress = request.getRemoteAddress().getHostAddress();
|
||||
|
||||
Reference in New Issue
Block a user