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

General code quality fix-3 #191

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
2 changes: 1 addition & 1 deletion src/net/majorkernelpanic/streaming/rtcp/SenderReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class SenderReport {
private int mSSRC, mPort = -1;
private int mOctetCount = 0, mPacketCount = 0;
private long interval, delta, now, oldnow;
private byte mTcpHeader[];
private byte[] mTcpHeader;

public SenderReport(int ssrc) throws IOException {
super();
Expand Down
2 changes: 1 addition & 1 deletion src/net/majorkernelpanic/streaming/rtp/RtpSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class RtpSocket implements Runnable {
private int mSsrc, mSeq = 0, mPort = -1;
private int mBufferCount, mBufferIn, mBufferOut;
private int mCount = 0;
private byte mTcpHeader[];
private byte[] mTcpHeader;
protected OutputStream mOutputStream = null;

private AverageBitrate mAverageBitrate;
Expand Down
3 changes: 2 additions & 1 deletion src/net/majorkernelpanic/streaming/rtsp/RtspClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.Semaphore;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -585,7 +586,7 @@ static class Response {


public int status;
public HashMap<String,String> headers = new HashMap<String,String>();
public Map<String,String> headers = new HashMap<>();

/** Parse the method, URI & headers of a RTSP request */
public static Response parseResponse(BufferedReader input) throws IOException, IllegalStateException, SocketException {
Expand Down
3 changes: 2 additions & 1 deletion src/net/majorkernelpanic/streaming/rtsp/RtspServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -624,7 +625,7 @@ static class Request {

public String method;
public String uri;
public HashMap<String,String> headers = new HashMap<String,String>();
public Map<String,String> headers = new HashMap<String,String>();

/** Parse the method, uri & headers of a RTSP request */
public static Request parseRequest(BufferedReader input) throws IOException, IllegalStateException, SocketException {
Expand Down
2 changes: 1 addition & 1 deletion src/net/majorkernelpanic/streaming/video/VideoStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ protected void encodeWithMediaRecorder() throws IOException, ConfNotSupportedExc

// This will skip the MPEG4 header if this step fails we can't stream anything :(
try {
byte buffer[] = new byte[4];
byte[] buffer = new byte[4];
// Skip all atoms preceding mdat atom
while (!Thread.interrupted()) {
while (is.read() != 'm');
Expand Down