unused = this.builder.setPass(1).build();
}
diff --git a/src/main/java/net/bramp/ffmpeg/nut/Frame.java b/src/main/java/net/bramp/ffmpeg/nut/Frame.java
index e50f1cb9..961b7f9f 100644
--- a/src/main/java/net/bramp/ffmpeg/nut/Frame.java
+++ b/src/main/java/net/bramp/ffmpeg/nut/Frame.java
@@ -1,6 +1,7 @@
package net.bramp.ffmpeg.nut;
import com.google.common.base.MoreObjects;
+
import java.io.EOFException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -145,6 +146,7 @@ public void read(NutReader nut, NutDataInputStream in, int code) throws IOExcept
}
if ((flags & FLAG_CHECKSUM) == FLAG_CHECKSUM) {
+ @SuppressWarnings("unused")
long checksum = in.readInt();
// TODO Test checksum
}
diff --git a/src/main/java/net/bramp/ffmpeg/nut/MainHeaderPacket.java b/src/main/java/net/bramp/ffmpeg/nut/MainHeaderPacket.java
index 16c6c47a..60fca458 100644
--- a/src/main/java/net/bramp/ffmpeg/nut/MainHeaderPacket.java
+++ b/src/main/java/net/bramp/ffmpeg/nut/MainHeaderPacket.java
@@ -94,7 +94,7 @@ protected void readBody(NutDataInputStream in) throws IOException {
if (fields > 5) {
count = in.readVarLong();
} else {
- count = mul - size;
+ count = (long) mul - size;
}
if (fields > 6) {
match = in.readSignedVarInt();
diff --git a/src/main/java/net/bramp/ffmpeg/options/EncodingOptions.java b/src/main/java/net/bramp/ffmpeg/options/EncodingOptions.java
index bb2528ad..b93f4f47 100644
--- a/src/main/java/net/bramp/ffmpeg/options/EncodingOptions.java
+++ b/src/main/java/net/bramp/ffmpeg/options/EncodingOptions.java
@@ -3,6 +3,8 @@
import java.beans.ConstructorProperties;
/**
+ * Audio, Video and Main encoding options for ffmpeg.
+ *
* @author bramp
*/
public class EncodingOptions {
diff --git a/src/main/java/net/bramp/ffmpeg/options/MainEncodingOptions.java b/src/main/java/net/bramp/ffmpeg/options/MainEncodingOptions.java
index 8be785d6..86547267 100644
--- a/src/main/java/net/bramp/ffmpeg/options/MainEncodingOptions.java
+++ b/src/main/java/net/bramp/ffmpeg/options/MainEncodingOptions.java
@@ -3,6 +3,8 @@
import java.beans.ConstructorProperties;
/**
+ * Encoding options that are specific to the main output.
+ *
* @author bramp
*/
public class MainEncodingOptions {
diff --git a/src/main/java/net/bramp/ffmpeg/progress/AbstractSocketProgressParser.java b/src/main/java/net/bramp/ffmpeg/progress/AbstractSocketProgressParser.java
index bf174416..e3f3095e 100644
--- a/src/main/java/net/bramp/ffmpeg/progress/AbstractSocketProgressParser.java
+++ b/src/main/java/net/bramp/ffmpeg/progress/AbstractSocketProgressParser.java
@@ -25,11 +25,11 @@ public AbstractSocketProgressParser(ProgressListener listener) {
*
* TODO Move this method to somewhere better.
*
- * @param scheme
- * @param address
- * @param port
- * @return
- * @throws URISyntaxException
+ * @param scheme The scheme to use (e.g. "tcp", "udp", "rtp", "http")
+ * @param address The address of the server
+ * @param port The port to connect to
+ * @return A URI representing the address and port
+ * @throws URISyntaxException if the URI is invalid
*/
@CheckReturnValue
static URI createUri(String scheme, InetAddress address, int port) throws URISyntaxException {
diff --git a/src/main/java/net/bramp/ffmpeg/progress/Progress.java b/src/main/java/net/bramp/ffmpeg/progress/Progress.java
index f43bdc80..e97e133c 100644
--- a/src/main/java/net/bramp/ffmpeg/progress/Progress.java
+++ b/src/main/java/net/bramp/ffmpeg/progress/Progress.java
@@ -208,7 +208,8 @@ public boolean isEnd() {
@Override
public boolean equals(Object o) {
if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (!(o instanceof Progress)) return false;
+
Progress progress1 = (Progress) o;
return frame == progress1.frame
&& bitrate == progress1.bitrate
diff --git a/src/test/java/net/bramp/ffmpeg/FFmpegAvTest.java b/src/test/java/net/bramp/ffmpeg/FFmpegAvTest.java
index b287ecf0..10a19178 100644
--- a/src/test/java/net/bramp/ffmpeg/FFmpegAvTest.java
+++ b/src/test/java/net/bramp/ffmpeg/FFmpegAvTest.java
@@ -39,8 +39,6 @@ public void testVersion() throws Exception {
/**
* We don't support avconv, so all methods should throw an exception.
- *
- * @throws IOException
*/
@Test(expected = IllegalArgumentException.class)
public void testProbeVideo() throws IOException {
diff --git a/src/test/java/net/bramp/ffmpeg/FFmpegExecutorTest.java b/src/test/java/net/bramp/ffmpeg/FFmpegExecutorTest.java
index 72519222..31106c62 100644
--- a/src/test/java/net/bramp/ffmpeg/FFmpegExecutorTest.java
+++ b/src/test/java/net/bramp/ffmpeg/FFmpegExecutorTest.java
@@ -180,10 +180,6 @@ public void testMetaTags() throws InterruptedException, ExecutionException, IOEx
/**
* Test if addStdoutOutput() actually works, and the output can be correctly captured.
- *
- * @throws InterruptedException
- * @throws ExecutionException
- * @throws IOException
*/
@Test
public void testStdout() throws InterruptedException, ExecutionException, IOException {
diff --git a/src/test/java/net/bramp/ffmpeg/FFmpegUtilsTest.java b/src/test/java/net/bramp/ffmpeg/FFmpegUtilsTest.java
index b13a0474..4993fb1b 100644
--- a/src/test/java/net/bramp/ffmpeg/FFmpegUtilsTest.java
+++ b/src/test/java/net/bramp/ffmpeg/FFmpegUtilsTest.java
@@ -14,7 +14,7 @@ public void testAbstractUtilsClass() {
}
@Test
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "InlineMeInliner"})
public void testMillisecondsToString() {
assertEquals("00:01:03.123", millisecondsToString(63123));
assertEquals("00:01:03", millisecondsToString(63000));
@@ -24,13 +24,13 @@ public void testMillisecondsToString() {
}
@Test(expected = IllegalArgumentException.class)
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "InlineMeInliner"})
public void testMillisecondsToStringNegative() {
millisecondsToString(-1);
}
@Test(expected = IllegalArgumentException.class)
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "InlineMeInliner"})
public void testMillisecondsToStringNegativeMinValue() {
millisecondsToString(Long.MIN_VALUE);
}
diff --git a/src/test/java/net/bramp/ffmpeg/Helper.java b/src/test/java/net/bramp/ffmpeg/Helper.java
index a1ba24ba..7a8b13bc 100644
--- a/src/test/java/net/bramp/ffmpeg/Helper.java
+++ b/src/test/java/net/bramp/ffmpeg/Helper.java
@@ -25,9 +25,6 @@ public InputStream apply(@Nullable String input) {
/**
* Simple wrapper around "new SequenceInputStream", so the user doesn't have to deal with the
* horribly dated Enumeration type.
- *
- * @param input
- * @return
*/
public static InputStream sequenceInputStream(Iterable input) {
checkNotNull(input);
@@ -41,9 +38,6 @@ public static InputStream loadResource(String name) {
/**
* Loads all resources, and returns one stream containing them all.
- *
- * @param names
- * @return
*/
public static InputStream combineResource(List names) {
checkNotNull(names);
diff --git a/src/test/java/net/bramp/ffmpeg/ReadmeTest.java b/src/test/java/net/bramp/ffmpeg/ReadmeTest.java
index 53c81b4f..e2256a43 100644
--- a/src/test/java/net/bramp/ffmpeg/ReadmeTest.java
+++ b/src/test/java/net/bramp/ffmpeg/ReadmeTest.java
@@ -27,6 +27,7 @@ public class ReadmeTest {
public ReadmeTest() throws IOException {}
@Test
+ @SuppressWarnings("unused")
public void testCreateFF() throws IOException {
FFmpeg ffmpeg = new FFmpeg(FFmpeg.DEFAULT_PATH);
FFprobe ffprobe = new FFprobe(FFmpeg.DEFAULT_PATH);
diff --git a/src/test/java/net/bramp/ffmpeg/builder/FFmpegBuilderTest.java b/src/test/java/net/bramp/ffmpeg/builder/FFmpegBuilderTest.java
index a7a27669..43f49e31 100644
--- a/src/test/java/net/bramp/ffmpeg/builder/FFmpegBuilderTest.java
+++ b/src/test/java/net/bramp/ffmpeg/builder/FFmpegBuilderTest.java
@@ -17,15 +17,15 @@
import java.net.URI;
import java.util.List;
import java.util.concurrent.TimeUnit;
+
+import net.bramp.ffmpeg.builder.FFmpegBuilder.Verbosity;
import net.bramp.ffmpeg.options.AudioEncodingOptions;
import net.bramp.ffmpeg.options.EncodingOptions;
import net.bramp.ffmpeg.options.MainEncodingOptions;
import net.bramp.ffmpeg.options.VideoEncodingOptions;
import org.junit.Test;
-/**
- * @author bramp
- */
+@SuppressWarnings("unused")
public class FFmpegBuilderTest {
public FFmpegBuilderTest() throws IOException {}
@@ -229,7 +229,6 @@ public void testConflictingVideoSize() {
@Test
public void testURIOutput() {
-
List args =
new FFmpegBuilder()
.setInput("input")
diff --git a/src/test/java/net/bramp/ffmpeg/nut/RawHandlerStreamToAudioFormatTest.java b/src/test/java/net/bramp/ffmpeg/nut/RawHandlerStreamToAudioFormatTest.java
index 2975f02b..5742172c 100644
--- a/src/test/java/net/bramp/ffmpeg/nut/RawHandlerStreamToAudioFormatTest.java
+++ b/src/test/java/net/bramp/ffmpeg/nut/RawHandlerStreamToAudioFormatTest.java
@@ -24,7 +24,7 @@ public static List