From 556d92b63555a085b25e32b1cd55afce24edd07a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Jul 2014 16:21:36 +0200 Subject: Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines --- .../jogamp/opengl/util/av/NullGLMediaPlayer.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java') diff --git a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java index 2b4a386d4..4a15c7422 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java @@ -61,7 +61,7 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { } @Override - protected final boolean setPlaySpeedImpl(float rate) { + protected final boolean setPlaySpeedImpl(final float rate) { return false; } @@ -77,14 +77,14 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { } @Override - protected final int seekImpl(int msec) { + protected final int seekImpl(final int msec) { pos_ms = msec; validatePos(); return pos_ms; } @Override - protected final int getNextTextureImpl(GL gl, TextureFrame nextFrame) { + protected final int getNextTextureImpl(final GL gl, final TextureFrame nextFrame) { final int pts = getAudioPTSImpl(); nextFrame.setPTS( pts ); return pts; @@ -98,7 +98,7 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { } @Override - protected final void destroyImpl(GL gl) { + protected final void destroyImpl(final GL gl) { if(null != texData) { texData.destroy(); texData = null; @@ -108,17 +108,17 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { public final static TextureData createTestTextureData() { TextureData res = null; try { - URLConnection urlConn = IOUtil.getResource("jogl/util/data/av/test-ntsc01-28x16.png", NullGLMediaPlayer.class.getClassLoader()); + final URLConnection urlConn = IOUtil.getResource("jogl/util/data/av/test-ntsc01-28x16.png", NullGLMediaPlayer.class.getClassLoader()); if(null != urlConn) { res = TextureIO.newTextureData(GLProfile.getGL2ES2(), urlConn.getInputStream(), false, TextureIO.PNG); } - } catch (Exception e) { + } catch (final Exception e) { e.printStackTrace(); } if(null == res) { final int w = 160; final int h = 90; - ByteBuffer buffer = Buffers.newDirectByteBuffer(w*h*4); + final ByteBuffer buffer = Buffers.newDirectByteBuffer(w*h*4); while(buffer.hasRemaining()) { buffer.put((byte) 0xEA); buffer.put((byte) 0xEA); buffer.put((byte) 0xEA); buffer.put((byte) 0xEA); } @@ -132,7 +132,7 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { } @Override - protected final void initStreamImpl(int vid, int aid) throws IOException { + protected final void initStreamImpl(final int vid, final int aid) throws IOException { texData = createTestTextureData(); final float _fps = 24f; final int _duration = 10*60*1000; // msec @@ -143,7 +143,7 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { _totalFrames, 0, _duration, "png-static", null); } @Override - protected final void initGLImpl(GL gl) throws IOException, GLException { + protected final void initGLImpl(final GL gl) throws IOException, GLException { setIsGLOriented(true); } @@ -154,12 +154,12 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { *

*/ @Override - protected int validateTextureCount(int desiredTextureCount) { + protected int validateTextureCount(final int desiredTextureCount) { return TEXTURE_COUNT_MIN; } @Override - protected final TextureSequence.TextureFrame createTexImage(GL gl, int texName) { + protected final TextureSequence.TextureFrame createTexImage(final GL gl, final int texName) { final Texture texture = super.createTexImageImpl(gl, texName, getWidth(), getHeight()); if(null != texData) { texture.updateImage(gl, texData); @@ -168,7 +168,7 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { } @Override - protected final void destroyTexFrame(GL gl, TextureSequence.TextureFrame frame) { + protected final void destroyTexFrame(final GL gl, final TextureSequence.TextureFrame frame) { super.destroyTexFrame(gl, frame); } -- cgit v1.2.3