aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/av
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/av')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java20
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java4
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java6
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java4
4 files changed, 17 insertions, 17 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java
index 1d835dd33..6d875fcf5 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java
@@ -61,7 +61,7 @@ public interface AudioSink {
* @param planar true for planar data package (each channel in own data buffer), false for packed data channels interleaved in one buffer.
* @param littleEndian true for little-endian, false for big endian
*/
- public AudioFormat(int sampleRate, int sampleSize, int channelCount, boolean signed, boolean fixedP, boolean planar, boolean littleEndian) {
+ public AudioFormat(final int sampleRate, final int sampleSize, final int channelCount, final boolean signed, final boolean fixedP, final boolean planar, final boolean littleEndian) {
this.sampleRate = sampleRate;
this.sampleSize = sampleSize;
this.channelCount = channelCount;
@@ -104,7 +104,7 @@ public interface AudioSink {
* Time -> Byte Count
* </p>
*/
- public final int getDurationsByteSize(int millisecs) {
+ public final int getDurationsByteSize(final int millisecs) {
final int bytesPerSample = sampleSize >>> 3; // /8
return millisecs * ( channelCount * bytesPerSample * ( sampleRate / 1000 ) );
}
@@ -116,7 +116,7 @@ public interface AudioSink {
* Byte Count -> Time
* </p>
*/
- public final int getBytesDuration(int byteCount) {
+ public final int getBytesDuration(final int byteCount) {
final int bytesPerSample = sampleSize >>> 3; // /8
return byteCount / ( channelCount * bytesPerSample * ( sampleRate / 1000 ) );
}
@@ -132,7 +132,7 @@ public interface AudioSink {
* </p>
* @param sampleCount sample count per frame and channel
*/
- public final float getSamplesDuration(int sampleCount) {
+ public final float getSamplesDuration(final int sampleCount) {
return ( 1000f * sampleCount ) / sampleRate;
}
@@ -151,7 +151,7 @@ public interface AudioSink {
* @param millisecs time in milliseconds
* @param frameDuration duration per frame in milliseconds.
*/
- public final int getFrameCount(int millisecs, float frameDuration) {
+ public final int getFrameCount(final int millisecs, final float frameDuration) {
return Math.max(1, (int) ( millisecs / frameDuration + 0.5f ));
}
@@ -170,7 +170,7 @@ public interface AudioSink {
* </p>
* @param sampleCount sample count
*/
- public final int getSamplesByteCount(int sampleCount) {
+ public final int getSamplesByteCount(final int sampleCount) {
return sampleCount * ( sampleSize >>> 3 );
}
@@ -189,7 +189,7 @@ public interface AudioSink {
* </p>
* @param byteCount number of bytes
*/
- public final int getBytesSampleCount(int byteCount) {
+ public final int getBytesSampleCount(final int byteCount) {
return ( byteCount << 3 ) / sampleSize;
}
@@ -208,7 +208,7 @@ public interface AudioSink {
public AudioFrame() {
this.byteSize = 0;
}
- public AudioFrame(int pts, int duration, int byteCount) {
+ public AudioFrame(final int pts, final int duration, final int byteCount) {
super(pts, duration);
this.byteSize=byteCount;
}
@@ -216,7 +216,7 @@ public interface AudioSink {
/** Get this frame's size in bytes. */
public final int getByteSize() { return byteSize; }
/** Set this frame's size in bytes. */
- public final void setByteSize(int size) { this.byteSize=size; }
+ public final void setByteSize(final int size) { this.byteSize=size; }
@Override
public String toString() {
@@ -226,7 +226,7 @@ public interface AudioSink {
public static class AudioDataFrame extends AudioFrame {
protected final ByteBuffer data;
- public AudioDataFrame(int pts, int duration, ByteBuffer bytes, int byteCount) {
+ public AudioDataFrame(final int pts, final int duration, final ByteBuffer bytes, final int byteCount) {
super(pts, duration, byteCount);
if( byteCount > bytes.remaining() ) {
throw new IllegalArgumentException("Give size "+byteCount+" exceeds remaining bytes in ls "+bytes+". "+this);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java
index 386b1e085..a2b29b4eb 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java
@@ -50,7 +50,7 @@ public class AudioSinkFactory {
return new NullAudioSink();
}
- public static AudioSink create(final ClassLoader cl, String implName) {
+ public static AudioSink create(final ClassLoader cl, final String implName) {
final AudioSink audioSink;
if(ReflectionUtil.isClassAvailable(implName, cl)){
try {
@@ -58,7 +58,7 @@ public class AudioSinkFactory {
if( audioSink.isInitialized() ) {
return audioSink;
}
- } catch (Throwable t) {
+ } catch (final Throwable t) {
if(AudioSink.DEBUG) { System.err.println("Caught "+t.getClass().getName()+": "+t.getMessage()); t.printStackTrace(); }
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
index 215275951..4fffd9fab 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
@@ -246,10 +246,10 @@ public interface GLMediaPlayer extends TextureSequence {
*/
@SuppressWarnings("serial")
public static class StreamException extends Exception {
- public StreamException(Throwable cause) {
+ public StreamException(final Throwable cause) {
super(cause);
}
- public StreamException(String message, Throwable cause) {
+ public StreamException(final String message, final Throwable cause) {
super(message, cause);
}
}
@@ -318,7 +318,7 @@ public interface GLMediaPlayer extends TextureSequence {
public final int id;
- State(int id){
+ State(final int id){
this.id = id;
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java
index 558d59630..9378cec91 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java
@@ -55,12 +55,12 @@ public class GLMediaPlayerFactory {
return new NullGLMediaPlayer();
}
- public static GLMediaPlayer create(final ClassLoader cl, String implName) {
+ public static GLMediaPlayer create(final ClassLoader cl, final String implName) {
try {
if(((Boolean)ReflectionUtil.callStaticMethod(implName, isAvailableMethodName, null, null, cl)).booleanValue()) {
return (GLMediaPlayer) ReflectionUtil.createInstance(implName, cl);
}
- } catch (Throwable t) { if(GLMediaPlayer.DEBUG) { System.err.println("Caught "+t.getClass().getName()+": "+t.getMessage()); t.printStackTrace(); } }
+ } catch (final Throwable t) { if(GLMediaPlayer.DEBUG) { System.err.println("Caught "+t.getClass().getName()+": "+t.getMessage()); t.printStackTrace(); } }
return null;
}
}