From fea7ce4d776701a98166c8b9efaf35b4d5dfadfc Mon Sep 17 00:00:00 2001 From: Faisal Hameed Date: Fri, 18 Mar 2016 00:37:02 +0500 Subject: [PATCH] Fixing squid:S1153- String.valueOf() should not be appended to a String. --- src/net/majorkernelpanic/streaming/audio/AACStream.java | 4 ++-- src/net/majorkernelpanic/streaming/audio/AMRNBStream.java | 2 +- src/net/majorkernelpanic/streaming/video/H263Stream.java | 2 +- src/net/majorkernelpanic/streaming/video/H264Stream.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/audio/AACStream.java b/src/net/majorkernelpanic/streaming/audio/AACStream.java index 655cb803..31b95908 100644 --- a/src/net/majorkernelpanic/streaming/audio/AACStream.java +++ b/src/net/majorkernelpanic/streaming/audio/AACStream.java @@ -165,7 +165,7 @@ public synchronized void configure() throws IllegalStateException, IOException { // TODO: streamType always 5 ? profile-level-id always 15 ? - mSessionDescription = "m=audio "+String.valueOf(getDestinationPorts()[0])+" RTP/AVP 96\r\n" + + mSessionDescription = "m=audio "+ getDestinationPorts()[0] +" RTP/AVP 96\r\n" + "a=rtpmap:96 mpeg4-generic/"+mQuality.samplingRate+"\r\n"+ "a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config="+Integer.toHexString(mConfig)+"; SizeLength=13; IndexLength=3; IndexDeltaLength=3;\r\n"; @@ -175,7 +175,7 @@ public synchronized void configure() throws IllegalStateException, IOException { mChannel = 1; mConfig = (mProfile & 0x1F) << 11 | (mSamplingRateIndex & 0x0F) << 7 | (mChannel & 0x0F) << 3; - mSessionDescription = "m=audio "+String.valueOf(getDestinationPorts()[0])+" RTP/AVP 96\r\n" + + mSessionDescription = "m=audio "+ getDestinationPorts()[0] +" RTP/AVP 96\r\n" + "a=rtpmap:96 mpeg4-generic/"+mQuality.samplingRate+"\r\n"+ "a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config="+Integer.toHexString(mConfig)+"; SizeLength=13; IndexLength=3; IndexDeltaLength=3;\r\n"; diff --git a/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java b/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java index 05f50ec7..68edc67c 100644 --- a/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java +++ b/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java @@ -76,7 +76,7 @@ public synchronized void configure() throws IllegalStateException, IOException { * Returns a description of the stream using SDP. It can then be included in an SDP file. */ public String getSessionDescription() { - return "m=audio "+String.valueOf(getDestinationPorts()[0])+" RTP/AVP 96\r\n" + + return "m=audio "+ getDestinationPorts()[0] +" RTP/AVP 96\r\n" + "a=rtpmap:96 AMR/8000\r\n" + "a=fmtp:96 octet-align=1;\r\n"; } diff --git a/src/net/majorkernelpanic/streaming/video/H263Stream.java b/src/net/majorkernelpanic/streaming/video/H263Stream.java index acbd813f..92bd1899 100644 --- a/src/net/majorkernelpanic/streaming/video/H263Stream.java +++ b/src/net/majorkernelpanic/streaming/video/H263Stream.java @@ -79,7 +79,7 @@ public synchronized void configure() throws IllegalStateException, IOException { * Returns a description of the stream using SDP. It can then be included in an SDP file. */ public String getSessionDescription() { - return "m=video "+String.valueOf(getDestinationPorts()[0])+" RTP/AVP 96\r\n" + + return "m=video "+ getDestinationPorts()[0] +" RTP/AVP 96\r\n" + "a=rtpmap:96 H263-1998/90000\r\n"; } diff --git a/src/net/majorkernelpanic/streaming/video/H264Stream.java b/src/net/majorkernelpanic/streaming/video/H264Stream.java index a45034e1..886c0f61 100644 --- a/src/net/majorkernelpanic/streaming/video/H264Stream.java +++ b/src/net/majorkernelpanic/streaming/video/H264Stream.java @@ -81,7 +81,7 @@ public H264Stream(int cameraId) { */ public synchronized String getSessionDescription() throws IllegalStateException { if (mConfig == null) throw new IllegalStateException("You need to call configure() first !"); - return "m=video "+String.valueOf(getDestinationPorts()[0])+" RTP/AVP 96\r\n" + + return "m=video "+ getDestinationPorts()[0] +" RTP/AVP 96\r\n" + "a=rtpmap:96 H264/90000\r\n" + "a=fmtp:96 packetization-mode=1;profile-level-id="+mConfig.getProfileLevel()+";sprop-parameter-sets="+mConfig.getB64SPS()+","+mConfig.getB64PPS()+";\r\n"; }