修复推流信息播放
This commit is contained in:
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user