From b6df13af2489715976132b44848a618f95098972 Mon Sep 17 00:00:00 2001 From: fine <54142345+criver31@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:14:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dzlm=E9=87=8D=E8=BF=9E?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java index d7df341e..dfc03854 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java @@ -699,6 +699,7 @@ public class MediaServerServiceImpl implements IMediaServerService { ssrcFactory.initMediaServerSSRC(mediaServerItem.getId(), null); String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId() + "_" + mediaServerItem.getId(); redisTemplate.opsForValue().set(key, mediaServerItem); + resetOnlineServerItem(mediaServerItem); clearRTPServer(mediaServerItem); } final String zlmKeepaliveKey = zlmKeepaliveKeyPrefix + mediaServerItem.getId(); From db493e262566c2ed2ac046e6f610b2da6cf61682 Mon Sep 17 00:00:00 2001 From: fine <54142345+criver31@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:50:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=95=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E4=B8=8B=E5=8E=86=E5=8F=B2=E5=9B=9E=E6=94=BE=E6=9A=82?= =?UTF-8?q?=E5=81=9C=E5=92=8C=E6=81=A2=E5=A4=8D=E5=8F=91=E9=80=81=E7=9A=84?= =?UTF-8?q?=E6=B5=81ID=E4=B8=8Ezlm=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genersoft/iot/vmp/service/impl/PlayServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java index 2376942d..9012c298 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java @@ -954,7 +954,9 @@ public class PlayServiceImpl implements IPlayService { throw new ServiceException("mediaServer不存在"); } // zlm 暂停RTP超时检查 - JSONObject jsonObject = zlmresTfulUtils.pauseRtpCheck(mediaServerItem, streamId); + // 使用zlm中的流ID + String ssrc = Long.toHexString(Long.parseLong(ssrcTransaction.getSsrc())).toUpperCase(); + JSONObject jsonObject = zlmresTfulUtils.pauseRtpCheck(mediaServerItem, ssrc); if (jsonObject == null || jsonObject.getInteger("code") != 0) { throw new ServiceException("暂停RTP接收失败"); } @@ -977,7 +979,9 @@ public class PlayServiceImpl implements IPlayService { throw new ServiceException("mediaServer不存在"); } // zlm 暂停RTP超时检查 - JSONObject jsonObject = zlmresTfulUtils.resumeRtpCheck(mediaServerItem, streamId); + // 使用zlm中的流ID + String ssrc = Long.toHexString(Long.parseLong(ssrcTransaction.getSsrc())).toUpperCase(); + JSONObject jsonObject = zlmresTfulUtils.resumeRtpCheck(mediaServerItem, ssrc); if (jsonObject == null || jsonObject.getInteger("code") != 0) { throw new ServiceException("继续RTP接收失败"); }