From dae67453c4449fbdd9afebd87de049c70c72418d Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 28 三月 2024 16:50:44 +0800 Subject: [PATCH] Merge branch 'master' into dev/abl支持 --- src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamAuthorityInfo.java | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamAuthorityInfo.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamAuthorityInfo.java old mode 100644 new mode 100755 index 36a0363..7d66a1f --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamAuthorityInfo.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamAuthorityInfo.java @@ -1,5 +1,9 @@ package com.genersoft.iot.vmp.media.zlm.dto; +import com.genersoft.iot.vmp.media.event.MediaArrivalEvent; +import com.genersoft.iot.vmp.media.zlm.dto.hook.OnPublishHookParam; +import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam; + /** * 娴佺殑閴存潈淇℃伅 * @author lin @@ -94,21 +98,23 @@ this.sign = sign; } - public static StreamAuthorityInfo getInstanceByHook(OnPublishHookParam hookParam) { + public static StreamAuthorityInfo getInstanceByHook(String app, String stream, String id) { StreamAuthorityInfo streamAuthorityInfo = new StreamAuthorityInfo(); - streamAuthorityInfo.setApp(hookParam.getApp()); - streamAuthorityInfo.setStream(hookParam.getStream()); - streamAuthorityInfo.setId(hookParam.getId()); + streamAuthorityInfo.setApp(app); + streamAuthorityInfo.setStream(stream); + streamAuthorityInfo.setId(id); return streamAuthorityInfo; } - public static StreamAuthorityInfo getInstanceByHook(MediaItem mediaItem) { + public static StreamAuthorityInfo getInstanceByHook(MediaArrivalEvent event) { StreamAuthorityInfo streamAuthorityInfo = new StreamAuthorityInfo(); - streamAuthorityInfo.setApp(mediaItem.getApp()); - streamAuthorityInfo.setStream(mediaItem.getStream()); - streamAuthorityInfo.setId(mediaItem.getMediaServerId()); - streamAuthorityInfo.setOriginType(mediaItem.getOriginType()); - streamAuthorityInfo.setOriginTypeStr(mediaItem.getOriginTypeStr()); + streamAuthorityInfo.setApp(event.getApp()); + streamAuthorityInfo.setStream(event.getStream()); + streamAuthorityInfo.setId(event.getSeverId()); + if (event.getMediaInfo() != null) { + streamAuthorityInfo.setOriginType(event.getMediaInfo().getOriginType()); + } + return streamAuthorityInfo; } } -- Gitblit v1.8.0