From 7db2bf7b51015a7e989ea5b0f4d9486dfd99d4bd Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 02 九月 2022 10:51:55 +0800 Subject: [PATCH] 使用equalsIgnoreCase代替equals,忽略大小写差异 --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java index 52cb374..5286aa5 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java @@ -248,16 +248,16 @@ String protocol = media.getProtocol(); // 鍖哄垎TCP鍙戞祦杩樻槸udp锛� 褰撳墠榛樿udp - if ("TCP/RTP/AVP".equals(protocol)) { + if ("TCP/RTP/AVP".equalsIgnoreCase(protocol)) { String setup = mediaDescription.getAttribute("setup"); if (setup != null) { mediaTransmissionTCP = true; - if ("active".equals(setup)) { + if ("active".equalsIgnoreCase(setup)) { tcpActive = true; // 涓嶆敮鎸乼cp涓诲姩 responseAck(evt, Response.NOT_IMPLEMENTED, "tcp active not support"); // 鐩綍涓嶆敮鎸佺偣鎾� return; - } else if ("passive".equals(setup)) { + } else if ("passive".equalsIgnoreCase(setup)) { tcpActive = false; } } @@ -302,7 +302,7 @@ return; } sendRtpItem.setCallId(callIdHeader.getCallId()); - sendRtpItem.setPlayType("Play".equals(sessionName) ? InviteStreamType.PLAY : InviteStreamType.PLAYBACK); + sendRtpItem.setPlayType("Play".equalsIgnoreCase(sessionName) ? InviteStreamType.PLAY : InviteStreamType.PLAYBACK); Long finalStartTime = startTime; Long finalStopTime = stopTime; @@ -321,7 +321,7 @@ content.append("o=" + channelId + " 0 0 IN IP4 " + mediaServerItemInUSe.getSdpIp() + "\r\n"); content.append("s=" + sessionName + "\r\n"); content.append("c=IN IP4 " + mediaServerItemInUSe.getSdpIp() + "\r\n"); - if ("Playback".equals(sessionName)) { + if ("Playback".equalsIgnoreCase(sessionName)) { content.append("t=" + finalStartTime + " " + finalStopTime + "\r\n"); } else { content.append("t=0 0\r\n"); @@ -365,7 +365,7 @@ } }); sendRtpItem.setApp("rtp"); - if ("Playback".equals(sessionName)) { + if ("Playback".equalsIgnoreCase(sessionName)) { sendRtpItem.setPlayType(InviteStreamType.PLAYBACK); SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, null, true, true); sendRtpItem.setStreamId(ssrcInfo.getStream()); -- Gitblit v1.8.0