Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code quality fix - String.valueOf() should not be appended to a String. #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/net/majorkernelpanic/streaming/audio/AACStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/net/majorkernelpanic/streaming/audio/AMRNBStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
2 changes: 1 addition & 1 deletion src/net/majorkernelpanic/streaming/video/H263Stream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down
2 changes: 1 addition & 1 deletion src/net/majorkernelpanic/streaming/video/H264Stream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down