MediaItem增加callId
This commit is contained in:
parent
4d1c6401c2
commit
c48def08cf
@ -461,7 +461,7 @@ public class ZLMHttpHookListener {
|
||||
StreamInfo streamInfoByAppAndStream = mediaService.getStreamInfoByAppAndStream(mediaServerItem,
|
||||
app, stream, tracks, streamAuthorityInfo.getCallId());
|
||||
item.setStreamInfo(streamInfoByAppAndStream);
|
||||
|
||||
item.setSeverId(userSetting.getServerId());
|
||||
redisCatchStorage.addStream(mediaServerItem, type, app, stream, item);
|
||||
if (item.getOriginType() == OriginType.RTSP_PUSH.ordinal()
|
||||
|| item.getOriginType() == OriginType.RTMP_PUSH.ordinal()
|
||||
|
@ -4,6 +4,9 @@ import com.genersoft.iot.vmp.common.StreamInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
public class MediaItem {
|
||||
|
||||
/**
|
||||
@ -21,6 +24,11 @@ public class MediaItem {
|
||||
*/
|
||||
private String stream;
|
||||
|
||||
/**
|
||||
* 推流鉴权Id
|
||||
*/
|
||||
private String callId;
|
||||
|
||||
/**
|
||||
* 观看总人数,包括hls/rtsp/rtmp/http-flv/ws-flv
|
||||
*/
|
||||
@ -427,4 +435,12 @@ public class MediaItem {
|
||||
public void setSeverId(String severId) {
|
||||
this.severId = severId;
|
||||
}
|
||||
|
||||
public String getCallId() {
|
||||
return callId;
|
||||
}
|
||||
|
||||
public void setCallId(String callId) {
|
||||
this.callId = callId;
|
||||
}
|
||||
}
|
||||
|
@ -485,7 +485,12 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
|
||||
@Override
|
||||
public void addStream(MediaServerItem mediaServerItem, String type, String app, String streamId, MediaItem mediaItem) {
|
||||
// 查找是否使用了callID
|
||||
StreamAuthorityInfo streamAuthorityInfo = getStreamAuthorityInfo(app, streamId);
|
||||
String key = VideoManagerConstants.WVP_SERVER_STREAM_PREFIX + userSetting.getServerId() + "_" + type + "_" + app + "_" + streamId + "_" + mediaServerItem.getId();
|
||||
if (streamAuthorityInfo != null) {
|
||||
mediaItem.setCallId(streamAuthorityInfo.getCallId());
|
||||
}
|
||||
redis.set(key, mediaItem);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user