Merge branch 'master' into dev/数据库统合
commit
a4af7eb9a1
|
@ -24,7 +24,7 @@ public class LogServiceImpl implements ILogService {
|
|||
@Override
|
||||
public List<LogFileInfo> queryList(String query, String startTime, String endTime) {
|
||||
File logFile = getLogDir();
|
||||
if (logFile == null && !logFile.exists()) {
|
||||
if (logFile == null || !logFile.exists()) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取日志文件目录失败");
|
||||
}
|
||||
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.UserSetting;
|
||||
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.zlm.dto.StreamAuthorityInfo;
|
||||
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 ) {
|
||||
StreamPush streamPush = streamPushMapper.queryOne(id);
|
||||
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) {
|
||||
String callId = null;
|
||||
StreamAuthorityInfo streamAuthorityInfo = redisCatchStorage.getStreamAuthorityInfo(streamPush.getApp(), streamPush.getStream());
|
||||
if (streamAuthorityInfo != null) {
|
||||
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));
|
||||
if (!streamPush.isPushing()) {
|
||||
streamPush.setPushing(true);
|
||||
streamPushMapper.update(streamPush);
|
||||
}
|
||||
return;
|
||||
}
|
||||
Assert.isTrue(streamPush.isStartOfflinePush(), "通道未推流");
|
||||
|
|
|
@ -22,8 +22,8 @@ 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;
|
||||
|
||||
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 stream_push_id;
|
||||
alter table wvp_device_channel drop stream_proxy_id;
|
||||
alter table wvp_device_channel drop stream_proxy_id;
|
||||
|
|
Loading…
Reference in New Issue