Merge branch 'master' into dev/数据库统合
commit
a4af7eb9a1
|
@ -24,7 +24,7 @@ public class LogServiceImpl implements ILogService {
|
||||||
@Override
|
@Override
|
||||||
public List<LogFileInfo> queryList(String query, String startTime, String endTime) {
|
public List<LogFileInfo> queryList(String query, String startTime, String endTime) {
|
||||||
File logFile = getLogDir();
|
File logFile = getLogDir();
|
||||||
if (logFile == null && !logFile.exists()) {
|
if (logFile == null || !logFile.exists()) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取日志文件目录失败");
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取日志文件目录失败");
|
||||||
}
|
}
|
||||||
File[] files = logFile.listFiles();
|
File[] files = logFile.listFiles();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.common.StreamInfo;
|
||||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
import com.genersoft.iot.vmp.media.bean.MediaInfo;
|
import com.genersoft.iot.vmp.media.bean.MediaInfo;
|
||||||
|
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
||||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||||
|
@ -51,15 +52,22 @@ public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
|
||||||
public void start(Integer id, ErrorCallback<StreamInfo> callback, String platformDeviceId, String platformName ) {
|
public void start(Integer id, ErrorCallback<StreamInfo> callback, String platformDeviceId, String platformName ) {
|
||||||
StreamPush streamPush = streamPushMapper.queryOne(id);
|
StreamPush streamPush = streamPushMapper.queryOne(id);
|
||||||
Assert.notNull(streamPush, "推流信息未找到");
|
Assert.notNull(streamPush, "推流信息未找到");
|
||||||
MediaInfo mediaInfo = redisCatchStorage.getPushListItem(streamPush.getApp(), streamPush.getStream());
|
|
||||||
|
MediaServer mediaServer = mediaServerService.getOne(streamPush.getMediaServerId());
|
||||||
|
Assert.notNull(mediaServer, "节点" + streamPush.getMediaServerId() + "未找到");
|
||||||
|
MediaInfo mediaInfo = mediaServerService.getMediaInfo(mediaServer, streamPush.getApp(), streamPush.getStream());
|
||||||
if (mediaInfo != null) {
|
if (mediaInfo != null) {
|
||||||
String callId = null;
|
String callId = null;
|
||||||
StreamAuthorityInfo streamAuthorityInfo = redisCatchStorage.getStreamAuthorityInfo(streamPush.getApp(), streamPush.getStream());
|
StreamAuthorityInfo streamAuthorityInfo = redisCatchStorage.getStreamAuthorityInfo(streamPush.getApp(), streamPush.getStream());
|
||||||
if (streamAuthorityInfo != null) {
|
if (streamAuthorityInfo != null) {
|
||||||
callId = streamAuthorityInfo.getCallId();
|
callId = streamAuthorityInfo.getCallId();
|
||||||
}
|
}
|
||||||
callback.run(ErrorCode.SUCCESS.getCode(), ErrorCode.SUCCESS.getMsg(), mediaServerService.getStreamInfoByAppAndStream(mediaInfo.getMediaServer(),
|
callback.run(ErrorCode.SUCCESS.getCode(), ErrorCode.SUCCESS.getMsg(), mediaServerService.getStreamInfoByAppAndStream(mediaServer,
|
||||||
streamPush.getApp(), streamPush.getStream(), mediaInfo, callId));
|
streamPush.getApp(), streamPush.getStream(), mediaInfo, callId));
|
||||||
|
if (!streamPush.isPushing()) {
|
||||||
|
streamPush.setPushing(true);
|
||||||
|
streamPushMapper.update(streamPush);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Assert.isTrue(streamPush.isStartOfflinePush(), "通道未推流");
|
Assert.isTrue(streamPush.isStartOfflinePush(), "通道未推流");
|
||||||
|
|
|
@ -22,7 +22,7 @@ update wvp_device_channel wdc
|
||||||
set data_type = 2, data_device_id = (SELECT stream_push_id from wvp_device_channel where stream_push_id is not null and id = wdc.id ) where stream_push_id is not null;
|
set data_type = 2, data_device_id = (SELECT stream_push_id from wvp_device_channel where stream_push_id is not null and id = wdc.id ) where stream_push_id is not null;
|
||||||
|
|
||||||
update wvp_device_channel wdc
|
update wvp_device_channel wdc
|
||||||
set data_type = 1, data_device_id = (SELECT stream_proxy_id from wvp_device_channel where stream_proxy_id is not null and id = wdc.id ) where stream_proxy_id is not null;
|
set data_type = 3, data_device_id = (SELECT stream_proxy_id from wvp_device_channel where stream_proxy_id is not null and id = wdc.id ) where stream_proxy_id is not null;
|
||||||
|
|
||||||
alter table wvp_device_channel drop device_db_id;
|
alter table wvp_device_channel drop device_db_id;
|
||||||
alter table wvp_device_channel drop stream_push_id;
|
alter table wvp_device_channel drop stream_push_id;
|
||||||
|
|
Loading…
Reference in New Issue