mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-18 03:27:48 +08:00
调整推流获取逻辑
This commit is contained in:
parent
bfc063e4f7
commit
a1ba811962
@ -63,21 +63,22 @@ public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
|
||||
}
|
||||
|
||||
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();
|
||||
if (mediaServer != null) {
|
||||
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(mediaServer,
|
||||
streamPush.getApp(), streamPush.getStream(), mediaInfo, callId));
|
||||
if (!streamPush.isPushing()) {
|
||||
streamPush.setPushing(true);
|
||||
streamPushMapper.update(streamPush);
|
||||
}
|
||||
return;
|
||||
}
|
||||
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(), "通道未推流");
|
||||
// 发送redis消息以使设备上线,流上线后被
|
||||
|
||||
Loading…
Reference in New Issue
Block a user