mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-24 22:17:49 +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());
|
MediaServer mediaServer = mediaServerService.getOne(streamPush.getMediaServerId());
|
||||||
Assert.notNull(mediaServer, "节点" + streamPush.getMediaServerId() + "未找到");
|
if (mediaServer != null) {
|
||||||
MediaInfo mediaInfo = mediaServerService.getMediaInfo(mediaServer, streamPush.getApp(), streamPush.getStream());
|
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(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(), "通道未推流");
|
Assert.isTrue(streamPush.isStartOfflinePush(), "通道未推流");
|
||||||
// 发送redis消息以使设备上线,流上线后被
|
// 发送redis消息以使设备上线,流上线后被
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user