修复推流信息播放
parent
d7abe7fb75
commit
8c95485504
|
@ -6,6 +6,8 @@ import com.genersoft.iot.vmp.common.SystemAllInfo;
|
|||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.DeviceChannelMapper;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.DeviceMapper;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaInfo;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
||||
|
@ -14,10 +16,7 @@ import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
|||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.DeviceChannelMapper;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.DeviceMapper;
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.PlatformRegisterInfo;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.utils.JsonUtil;
|
||||
import com.genersoft.iot.vmp.utils.SystemInfoUtils;
|
||||
|
@ -705,7 +704,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
|||
@Override
|
||||
public void removePushListItem(String app, String stream, String mediaServerId) {
|
||||
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||
StreamPush param = (StreamPush)redisTemplate.opsForValue().get(key);
|
||||
OnStreamChangedHookParam param = (OnStreamChangedHookParam)redisTemplate.opsForValue().get(key);
|
||||
if (param != null && param.getMediaServerId().equalsIgnoreCase(mediaServerId)) {
|
||||
redisTemplate.delete(key);
|
||||
}
|
||||
|
|
|
@ -70,12 +70,6 @@ public class StreamPush extends CommonGBChannel implements Comparable<StreamPush
|
|||
@Schema(description = "是否正在推流")
|
||||
private boolean pushIng;
|
||||
|
||||
/**
|
||||
* 是否自己平台的推流
|
||||
*/
|
||||
@Schema(description = "是否自己平台的推流")
|
||||
private boolean self;
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull StreamPush streamPushItem) {
|
||||
return Long.valueOf(DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(this.createTime)
|
||||
|
|
|
@ -213,10 +213,6 @@ public class StreamPushController {
|
|||
if (userInfo!= null) {
|
||||
authority = true;
|
||||
}
|
||||
StreamPush push = streamPushService.getPush(app, stream);
|
||||
if (push != null && !push.isSelf()) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "来自其他平台的推流信息");
|
||||
}
|
||||
StreamInfo streamInfo = mediaServerService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, authority);
|
||||
if (streamInfo == null){
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取播放地址失败");
|
||||
|
|
|
@ -96,7 +96,6 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
streamPush.setPushIng(true);
|
||||
streamPush.setUpdateTime(DateUtil.getNow());
|
||||
streamPush.setPushTime(DateUtil.getNow());
|
||||
streamPush.setSelf(true);
|
||||
add(streamPush);
|
||||
}else {
|
||||
updatePushStatus(streamPushInDb.getId(), true);
|
||||
|
@ -243,6 +242,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
if (streamPush.getGbId() > 0) {
|
||||
gbChannelService.delete(streamPush.getGbId());
|
||||
}
|
||||
streamPushMapper.del(streamPush.getId());
|
||||
}
|
||||
@Override
|
||||
@Transactional
|
||||
|
@ -522,7 +522,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
|
||||
@Override
|
||||
public void updateStatus(StreamPush push) {
|
||||
if (push.getGbDeviceId() != null) {
|
||||
if (ObjectUtils.isEmpty(push.getGbDeviceId())) {
|
||||
return;
|
||||
}
|
||||
if ("ON".equalsIgnoreCase(push.getGbStatus())) {
|
||||
|
|
|
@ -50,6 +50,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="stream" label="流ID" min-width="200">
|
||||
</el-table-column>
|
||||
<el-table-column label="推流状态" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" v-if="scope.row.pushIng">推流中</el-tag>
|
||||
<el-tag size="medium" type="info" v-if="!scope.row.pushIng">已停止</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbDeviceId" label="国标编码" min-width="200" >
|
||||
</el-table-column>
|
||||
<el-table-column prop="mediaServerId" label="流媒体" min-width="200" >
|
||||
|
@ -61,16 +67,7 @@
|
|||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="正在推流" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.pushIng ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本平台推流" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.pushIng && !!scope.row.self ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="操作" min-width="360" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
|
|
Loading…
Reference in New Issue