From ba3c38d7d352800ccda6c68bb015b071d0794b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E4=BF=8A=E6=9D=B0?= <502612493@qq.com> Date: Wed, 16 Mar 2022 11:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89createinfo=E4=B8=AD=E7=9A=84c?= =?UTF-8?q?seq=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gb28181/transmit/cmd/SIPRequestHeaderProvider.java | 4 ++-- .../iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java index 78056791..6c24b208 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java @@ -225,7 +225,7 @@ public class SIPRequestHeaderProvider { return request; } - public Request createInfoRequest(Device device, StreamInfo streamInfo, String content, Long cseq) + public Request createInfoRequest(Device device, StreamInfo streamInfo, String content) throws PeerUnavailableException, ParseException, InvalidArgumentException { Request request = null; if (streamInfo == null) return null; @@ -255,7 +255,7 @@ public class SIPRequestHeaderProvider { // Forwards MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70); - + cseq = redisCatchStorage.getCSEQ(Request.INVITE); // ceq CSeqHeader cSeqHeader = sipFactory.createHeaderFactory() diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java index 5df6314e..5e20c47c 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java @@ -1620,7 +1620,7 @@ public class SIPCommander implements ISIPCommander { content.append("PAUSE RTSP/1.0\r\n"); content.append("CSeq: " + cseq + "\r\n"); content.append("PauseTime: now\r\n"); - Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString(), cseq); + Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString()); if (request == null) { return; } @@ -1651,7 +1651,7 @@ public class SIPCommander implements ISIPCommander { content.append("PLAY RTSP/1.0\r\n"); content.append("CSeq: " + cseq + "\r\n"); content.append("Range: npt=now-\r\n"); - Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString(), cseq); + Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString()); if (request == null) return; logger.info(request.toString()); ClientTransaction clientTransaction = null; @@ -1680,7 +1680,7 @@ public class SIPCommander implements ISIPCommander { content.append("CSeq: " + cseq + "\r\n"); content.append("Range: npt=" + Math.abs(seekTime) + "-\r\n"); - Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString(), cseq); + Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString()); if (request == null) return; logger.info(request.toString()); ClientTransaction clientTransaction = null; @@ -1708,7 +1708,7 @@ public class SIPCommander implements ISIPCommander { content.append("PLAY RTSP/1.0\r\n"); content.append("CSeq: " + cseq + "\r\n"); content.append("Scale: " + String.format("%.1f",speed) + "\r\n"); - Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString(), cseq); + Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString()); if (request == null) return; logger.info(request.toString()); ClientTransaction clientTransaction = null;