Browse Source

去掉createinfo中的cseq参数

pull/399/head
朱俊杰 3 years ago
parent
commit
ba3c38d7d3
  1. 4
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java
  2. 8
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java

4
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java

@ -225,7 +225,7 @@ public class SIPRequestHeaderProvider {
return request; 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 { throws PeerUnavailableException, ParseException, InvalidArgumentException {
Request request = null; Request request = null;
if (streamInfo == null) return null; if (streamInfo == null) return null;
@ -255,7 +255,7 @@ public class SIPRequestHeaderProvider {
// Forwards // Forwards
MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70); MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70);
cseq = redisCatchStorage.getCSEQ(Request.INVITE); cseq = redisCatchStorage.getCSEQ(Request.INVITE);
// ceq // ceq
CSeqHeader cSeqHeader = sipFactory.createHeaderFactory() CSeqHeader cSeqHeader = sipFactory.createHeaderFactory()

8
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("PAUSE RTSP/1.0\r\n");
content.append("CSeq: " + cseq + "\r\n"); content.append("CSeq: " + cseq + "\r\n");
content.append("PauseTime: now\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) { if (request == null) {
return; return;
} }
@ -1651,7 +1651,7 @@ public class SIPCommander implements ISIPCommander {
content.append("PLAY RTSP/1.0\r\n"); content.append("PLAY RTSP/1.0\r\n");
content.append("CSeq: " + cseq + "\r\n"); content.append("CSeq: " + cseq + "\r\n");
content.append("Range: npt=now-\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; if (request == null) return;
logger.info(request.toString()); logger.info(request.toString());
ClientTransaction clientTransaction = null; ClientTransaction clientTransaction = null;
@ -1680,7 +1680,7 @@ public class SIPCommander implements ISIPCommander {
content.append("CSeq: " + cseq + "\r\n"); content.append("CSeq: " + cseq + "\r\n");
content.append("Range: npt=" + Math.abs(seekTime) + "-\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; if (request == null) return;
logger.info(request.toString()); logger.info(request.toString());
ClientTransaction clientTransaction = null; ClientTransaction clientTransaction = null;
@ -1708,7 +1708,7 @@ public class SIPCommander implements ISIPCommander {
content.append("PLAY RTSP/1.0\r\n"); content.append("PLAY RTSP/1.0\r\n");
content.append("CSeq: " + cseq + "\r\n"); content.append("CSeq: " + cseq + "\r\n");
content.append("Scale: " + String.format("%.1f",speed) + "\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; if (request == null) return;
logger.info(request.toString()); logger.info(request.toString());
ClientTransaction clientTransaction = null; ClientTransaction clientTransaction = null;

Loading…
Cancel
Save