修复拉流代理无人观看自动停用失败

This commit is contained in:
648540858
2023-07-04 11:10:17 +08:00
parent 733a11f265
commit 457c5e3821
12 changed files with 32 additions and 40 deletions

View File

@@ -506,7 +506,7 @@ public class ZLMHttpHookListener {
// 拉流代理
StreamProxyItem streamProxyItem = streamProxyService.getStreamProxyByAppAndStream(param.getApp(), param.getStream());
if (streamProxyItem != null) {
if (streamProxyItem.isEnableDisableNoneReader()) {
if (streamProxyItem.isEnableRemoveNoneReader()) {
// 无人观看自动移除
ret.put("close", true);
streamProxyService.del(param.getApp(), param.getStream());

View File

@@ -61,7 +61,7 @@ public class ZLMMediaListManager {
private UserSetting userSetting;
@Autowired
private ZLMServerFactory ZLMServerFactory;
private ZLMServerFactory zlmServerFactory;
@Autowired
private IMediaServerService mediaServerService;
@@ -97,7 +97,7 @@ public class ZLMMediaListManager {
public void sendStreamEvent(String app, String stream, String mediaServerId) {
MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId);
// 查看推流状态
Boolean streamReady = ZLMServerFactory.isStreamReady(mediaServerItem, app, stream);
Boolean streamReady = zlmServerFactory.isStreamReady(mediaServerItem, app, stream);
if (streamReady != null && streamReady) {
ChannelOnlineEvent channelOnlineEventLister = getChannelOnlineEventLister(app, stream);
if (channelOnlineEventLister != null) {