解决对接中遇到的问题

This commit is contained in:
648540858
2022-03-01 17:42:22 +08:00
parent 9c5b1060af
commit 4c53b10737
23 changed files with 249 additions and 133 deletions

View File

@@ -358,6 +358,8 @@ public class ZLMHttpHookListener {
if (mediaServerItem != null){
if (regist) {
StreamPushItem streamPushItem = null;
StreamInfo streamInfoByAppAndStream = mediaService.getStreamInfoByAppAndStream(mediaServerItem, app, streamId, tracks);
item.setStreamInfo(streamInfoByAppAndStream);
redisCatchStorage.addStream(mediaServerItem, type, app, streamId, item);
if (item.getOriginType() == OriginType.RTSP_PUSH.ordinal()
|| item.getOriginType() == OriginType.RTMP_PUSH.ordinal()
@@ -375,7 +377,7 @@ public class ZLMHttpHookListener {
}
}
if (gbStreams.size() > 0) {
eventPublisher.catalogEventPublishForStream(null, gbStreams.toArray(new GbStream[0]), CatalogEvent.ON);
eventPublisher.catalogEventPublishForStream(null, gbStreams, CatalogEvent.ON);
}
}else {

View File

@@ -1,5 +1,7 @@
package com.genersoft.iot.vmp.media.zlm.dto;
import com.genersoft.iot.vmp.common.StreamInfo;
import java.util.List;
public class MediaItem {
@@ -281,6 +283,8 @@ public class MediaItem {
}
}
private StreamInfo streamInfo;
public String getApp() {
return app;
}
@@ -402,4 +406,12 @@ public class MediaItem {
public void setMediaServerId(String mediaServerId) {
this.mediaServerId = mediaServerId;
}
public StreamInfo getStreamInfo() {
return streamInfo;
}
public void setStreamInfo(StreamInfo streamInfo) {
this.streamInfo = streamInfo;
}
}