* If bind is false and the data uses VBO,
* the latter will be unbound.
*
- *
+ *
* @param gl current GL object
- * @param bind true if VBO shall be bound and data written,
+ * @param bind true if VBO shall be bound and data written,
* otherwise clear VBO binding.
- * @return true if data uses VBO and action was performed, otherwise false
+ * @return true if data uses VBO and action was performed, otherwise false
*/
public boolean bindBuffer(GL gl, boolean bind);
-
+
/**
* Implementation shall enable or disable the array state.
*
@@ -60,23 +60,23 @@ public interface GLArrayHandler {
* implementation shall synchronize the data with the GPU
* and associate the data with the array.
*
- *
+ *
* @param gl current GL object
* @param enable true if array shall be enabled, otherwise false.
- * @param ext extension object allowing passing of an implementation detail
+ * @param ext extension object allowing passing of an implementation detail
*/
public void enableState(GL gl, boolean enable, Object ext);
-
+
/**
- * Supporting interleaved arrays, where sub handlers may handle
+ * Supporting interleaved arrays, where sub handlers may handle
* the array state and the master handler the buffer consistency.
- *
+ *
* @param handler the sub handler
* @throws UnsupportedOperationException if this array handler does not support interleaved arrays
*/
public void addSubHandler(GLArrayHandlerFlat handler) throws UnsupportedOperationException;
public void setSubArrayVBOName(int vboName);
-
+
}
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerFlat.java
index 4a8f40608..179142fee 100644
--- a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerFlat.java
+++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerFlat.java
@@ -39,21 +39,21 @@ public interface GLArrayHandlerFlat {
/**
* Implementation shall associate the data with the array
- *
+ *
* @param gl current GL object
- * @param ext extension object allowing passing of an implementation detail
+ * @param ext extension object allowing passing of an implementation detail
*/
public void syncData(GL gl, Object ext);
-
+
/**
* Implementation shall enable or disable the array state.
- *
+ *
* @param gl current GL object
* @param enable true if array shall be enabled, otherwise false.
- * @param ext extension object allowing passing of an implementation detail
+ * @param ext extension object allowing passing of an implementation detail
*/
- public void enableState(GL gl, boolean enable, Object ext);
-
+ public void enableState(GL gl, boolean enable, Object ext);
+
public GLArrayDataWrapper getData();
}
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
index 98f711b8e..5f9b25530 100644
--- a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
+++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
@@ -36,8 +36,8 @@ import javax.media.opengl.GL;
import com.jogamp.opengl.util.GLArrayDataEditable;
/**
- * Interleaved fixed function arrays, i.e. where this buffer data
- * represents many arrays.
+ * Interleaved fixed function arrays, i.e. where this buffer data
+ * represents many arrays.
*/
public class GLArrayHandlerInterleaved extends GLVBOArrayHandler implements GLArrayHandler {
private List subArrays = new ArrayList();
@@ -45,13 +45,13 @@ public class GLArrayHandlerInterleaved extends GLVBOArrayHandler implements GLAr
public GLArrayHandlerInterleaved(GLArrayDataEditable ad) {
super(ad);
}
-
+
public final void setSubArrayVBOName(int vboName) {
for(int i=0; i{@link #setTextureTarget(int)}
*
@@ -75,21 +75,21 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
protected volatile State state;
private Object stateLock = new Object();
-
+
protected int textureCount;
protected int textureTarget;
protected int textureFormat;
- protected int textureInternalFormat;
+ protected int textureInternalFormat;
protected int textureType;
protected int texUnit;
-
-
+
+
protected int[] texMinMagFilter = { GL.GL_NEAREST, GL.GL_NEAREST };
protected int[] texWrapST = { GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE };
-
+
/** User requested URI stream location. */
protected URI streamLoc = null;
- /**
+ /**
* In case {@link #streamLoc} is a {@link GLMediaPlayer#CameraInputScheme},
* {@link #cameraPath} holds the URI's path portion
* as parsed in {@link #initStream(URI, int, int, int)}.
@@ -98,10 +98,10 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
protected String cameraPath = null;
/** Optional camera properties, see {@link #cameraPath}. */
protected Map cameraProps = null;
-
+
protected volatile float playSpeed = 1.0f;
protected float audioVolume = 1.0f;
-
+
/** Shall be set by the {@link #initStreamImpl(int, int)} method implementation. */
protected int vid = GLMediaPlayer.STREAM_ID_AUTO;
/** Shall be set by the {@link #initStreamImpl(int, int)} method implementation. */
@@ -130,20 +130,20 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
protected String acodec = unknown;
/** Shall be set by the {@link #initStreamImpl(int, int)} method implementation. */
protected String vcodec = unknown;
-
+
protected volatile int decodedFrameCount = 0;
protected int presentedFrameCount = 0;
protected int displayedFrameCount = 0;
protected volatile int video_pts_last = 0;
-
+
/** See {@link #getAudioSink()}. Set by implementation if used from within {@link #initStreamImpl(int, int)}! */
protected AudioSink audioSink = null;
protected boolean audioSinkPlaySpeedSet = false;
-
+
/** System Clock Reference (SCR) of first audio PTS at start time. */
private long audio_scr_t0 = 0;
private boolean audioSCR_reset = true;
-
+
/** System Clock Reference (SCR) of first video frame at start time. */
private long video_scr_t0 = 0;
/** System Clock Reference (SCR) PTS offset, i.e. first video PTS at start time. */
@@ -152,7 +152,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
private float video_dpts_cum = 0;
/** Cumulative video frames. */
private int video_dpts_count = 0;
- /** Number of min frame count required for video cumulative sync. */
+ /** Number of min frame count required for video cumulative sync. */
private static final int VIDEO_DPTS_NUM = 20;
/** Cumulative coefficient, value {@value}. */
private static final float VIDEO_DPTS_COEFF = 0.7943282f; // (float) Math.exp(Math.log(0.01) / VIDEO_DPTS_NUM);
@@ -160,7 +160,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
private static final int VIDEO_DPTS_MAX = 5000; // 5s max diff
/** Trigger video PTS reset with given cause as bitfield. */
private boolean videoSCR_reset = false;
-
+
protected TextureFrame[] videoFramesOrig = null;
protected Ringbuffer videoFramesFree = null;
protected Ringbuffer videoFramesDecoded = null;
@@ -177,42 +177,42 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
this.textureTarget=GL.GL_TEXTURE_2D;
this.textureFormat = GL.GL_RGBA;
this.textureInternalFormat = GL.GL_RGBA;
- this.textureType = GL.GL_UNSIGNED_BYTE;
+ this.textureType = GL.GL_UNSIGNED_BYTE;
this.texUnit = 0;
this.state = State.Uninitialized;
}
@Override
public final void setTextureUnit(int u) { texUnit = u; }
-
+
@Override
public final int getTextureUnit() { return texUnit; }
-
+
@Override
public final int getTextureTarget() { return textureTarget; }
-
+
@Override
public final int getTextureCount() { return textureCount; }
-
+
protected final void setTextureTarget(int target) { textureTarget=target; }
- protected final void setTextureFormat(int internalFormat, int format) {
- textureInternalFormat=internalFormat;
- textureFormat=format;
- }
+ protected final void setTextureFormat(int internalFormat, int format) {
+ textureInternalFormat=internalFormat;
+ textureFormat=format;
+ }
protected final void setTextureType(int t) { textureType=t; }
public final void setTextureMinMagFilter(int[] minMagFilter) { texMinMagFilter[0] = minMagFilter[0]; texMinMagFilter[1] = minMagFilter[1];}
public final int[] getTextureMinMagFilter() { return texMinMagFilter; }
-
+
public final void setTextureWrapST(int[] wrapST) { texWrapST[0] = wrapST[0]; texWrapST[1] = wrapST[1];}
- public final int[] getTextureWrapST() { return texWrapST; }
-
+ public final int[] getTextureWrapST() { return texWrapST; }
+
private final void checkGLInit() {
if(State.Uninitialized == state || State.Initialized == state ) {
throw new IllegalStateException("GL not initialized: "+this);
- }
+ }
}
-
+
@Override
public String getRequiredExtensionsShaderStub() throws IllegalStateException {
checkGLInit();
@@ -221,24 +221,24 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
return "";
}
-
+
@Override
public String getTextureSampler2DType() throws IllegalStateException {
checkGLInit();
switch(textureTarget) {
case GL.GL_TEXTURE_2D:
- case GL2.GL_TEXTURE_RECTANGLE:
+ case GL2.GL_TEXTURE_RECTANGLE:
return TextureSequence.sampler2D;
case GLES2.GL_TEXTURE_EXTERNAL_OES:
return TextureSequence.samplerExternalOES;
default:
- throw new GLException("Unsuported texture target: "+toHexString(textureTarget));
+ throw new GLException("Unsuported texture target: "+toHexString(textureTarget));
}
}
-
+
/**
* {@inheritDoc}
- *
+ *
* This implementation simply returns the build-in function name of texture2D,
* if not overridden by specialization.
*/
@@ -247,31 +247,31 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
checkGLInit();
return "texture2D";
}
-
+
/**
* {@inheritDoc}
- *
- * This implementation simply returns an empty string since it's using
+ *
+ * This implementation simply returns an empty string since it's using
* the build-in function texture2D,
* if not overridden by specialization.
*/
@Override
public String getTextureLookupFragmentShaderImpl() throws IllegalStateException {
checkGLInit();
- return "";
+ return "";
}
-
+
@Override
public final int getDecodedFrameCount() { return decodedFrameCount; }
-
+
@Override
public final int getPresentedFrameCount() { return presentedFrameCount; }
-
+
@Override
public final int getVideoPTS() { return video_pts_last; }
-
+
@Override
- public final int getAudioPTS() {
+ public final int getAudioPTS() {
if( State.Uninitialized != state ) {
return getAudioPTSImpl();
}
@@ -285,10 +285,10 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
return 0;
}
}
-
+
@Override
public final State getState() { return state; }
-
+
@Override
public final State play() {
synchronized( stateLock ) {
@@ -310,7 +310,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
protected abstract boolean playImpl();
-
+
@Override
public final State pause(boolean flush) {
return pauseImpl(flush, 0);
@@ -337,7 +337,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
protected abstract boolean pauseImpl();
-
+
@Override
public final State destroy(GL gl) {
return destroyImpl(gl, 0);
@@ -354,7 +354,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
protected abstract void destroyImpl(GL gl);
-
+
@Override
public final int seek(int msec) {
synchronized( stateLock ) {
@@ -383,12 +383,12 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
protected abstract int seekImpl(int msec);
-
+
@Override
public final float getPlaySpeed() {
return playSpeed;
}
-
+
@Override
public final boolean setPlaySpeed(float rate) {
synchronized( stateLock ) {
@@ -410,18 +410,18 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
return res;
}
}
- /**
+ /**
* Override if not using AudioSink, or AudioSink's {@link AudioSink#setPlaySpeed(float)} is not sufficient!
*
- * AudioSink shall respect !audioSinkPlaySpeedSet to determine data_size
+ * AudioSink shall respect !audioSinkPlaySpeedSet to determine data_size
* at {@link AudioSink#enqueueData(com.jogamp.opengl.util.av.AudioSink.AudioFrame)}.
- *
+ *
*/
protected boolean setPlaySpeedImpl(float rate) {
if( null != audioSink ) {
audioSinkPlaySpeedSet = audioSink.setPlaySpeed(rate);
}
- // still true, even if audioSink rejects command since we deal w/ video sync
+ // still true, even if audioSink rejects command since we deal w/ video sync
// and AudioSink w/ audioSinkPlaySpeedSet at enqueueData(..).
return true;
}
@@ -431,7 +431,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
getAudioVolumeImpl();
return audioVolume;
}
- /**
+ /**
* Override if not using AudioSink, or AudioSink's {@link AudioSink#getVolume()} is not sufficient!
*/
protected void getAudioVolumeImpl() {
@@ -439,7 +439,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
audioVolume = audioSink.getVolume();
}
}
-
+
@Override
public boolean setAudioVolume(float v) {
synchronized( stateLock ) {
@@ -460,7 +460,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
return res;
}
}
- /**
+ /**
* Override if not using AudioSink, or AudioSink's {@link AudioSink#setVolume(float)} is not sufficient!
*/
protected boolean setAudioVolumeImpl(float v) {
@@ -470,7 +470,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
// still true, even if audioSink rejects command ..
return true;
}
-
+
@Override
public final void initStream(URI streamLoc, int vid, int aid, int reqTextureCount) throws IllegalStateException, IllegalArgumentException {
synchronized( stateLock ) {
@@ -490,7 +490,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
decodedFrameCount = 0;
presentedFrameCount = 0;
- displayedFrameCount = 0;
+ displayedFrameCount = 0;
this.streamLoc = streamLoc;
// Pre-parse for camera-input scheme
@@ -500,7 +500,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
if( null != streamLocScheme && streamLocScheme.equals(CameraInputScheme) ) {
final String rawPath = streamLoc.getRawPath();
if( null != rawPath && rawPath.length() > 0 ) {
- // cut-off root fwd-slash
+ // cut-off root fwd-slash
cameraPath = rawPath.substring(1);
final URIQueryProps props = URIQueryProps.create(streamLoc, ';');
cameraProps = props.getProperties();
@@ -508,7 +508,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
throw new IllegalArgumentException("Camera path is empty: "+streamLoc.toString());
}
}
-
+
this.vid = vid;
this.aid = aid;
if (this.streamLoc != null) {
@@ -519,7 +519,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
/**
* Implementation shall set the following set of data here
* @see #vid
- * @see #aid
+ * @see #aid
* @see #width
* @see #height
* @see #fps
@@ -530,7 +530,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
* @see #vcodec
*/
protected abstract void initStreamImpl(int vid, int aid) throws Exception;
-
+
@Override
public final StreamException getStreamException() {
synchronized( stateLock ) {
@@ -541,26 +541,26 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
}
-
+
@Override
public final void initGL(GL gl) throws IllegalStateException, StreamException, GLException {
synchronized( stateLock ) {
if(State.Initialized != state ) {
throw new IllegalStateException("Stream not in state initialized: "+this);
- }
+ }
final StreamException streamInitErr = streamWorker.getStreamErr();
if( null != streamInitErr ) {
streamWorker = null; // already terminated!
destroy(null);
throw streamInitErr;
}
- try {
+ try {
if( STREAM_ID_NONE != vid ) {
removeAllTextureFrames(gl);
initGLImpl(gl);
if(DEBUG) {
System.err.println("initGLImpl.X "+this);
- }
+ }
videoFramesOrig = createTexFrames(gl, textureCount);
videoFramesFree = new LFRingbuffer(videoFramesOrig);
videoFramesDecoded = new LFRingbuffer(TextureFrame[].class, textureCount);
@@ -583,7 +583,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
}
- /**
+ /**
* Shall initialize all GL related resources, if not audio-only.
*
* Shall also take care of {@link AudioSink} initialization if appropriate.
@@ -593,8 +593,8 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
* @throws GLException
*/
protected abstract void initGLImpl(GL gl) throws IOException, GLException;
-
- /**
+
+ /**
* Returns the validated number of textures to be handled.
*
* Default is {@link #TEXTURE_COUNT_MIN} minimum textures.
@@ -606,7 +606,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
protected int validateTextureCount(int desiredTextureCount) {
return desiredTextureCount < TEXTURE_COUNT_MIN ? TEXTURE_COUNT_MIN : desiredTextureCount;
}
-
+
protected TextureFrame[] createTexFrames(GL gl, final int count) {
final int[] texNames = new int[count];
gl.glGenTextures(count, texNames, 0);
@@ -621,7 +621,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
return texFrames;
}
protected abstract TextureFrame createTexImage(GL gl, int texName);
-
+
protected final Texture createTexImageImpl(GL gl, int texName, int tWidth, int tHeight) {
if( 0 > texName ) {
throw new RuntimeException("TextureName "+toHexString(texName)+" invalid.");
@@ -661,19 +661,19 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MIN_FILTER, texMinMagFilter[0]);
- gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MAG_FILTER, texMinMagFilter[1]);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MAG_FILTER, texMinMagFilter[1]);
gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_S, texWrapST[0]);
gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_T, texWrapST[1]);
-
+
return com.jogamp.opengl.util.texture.TextureIO.newTexture(
texName, textureTarget,
tWidth, tHeight,
width, height,
- !isInGLOrientation);
+ !isInGLOrientation);
}
-
+
protected void destroyTexFrame(GL gl, TextureFrame frame) {
- frame.getTexture().destroy(gl);
+ frame.getTexture().destroy(gl);
}
@Override
@@ -683,7 +683,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
return lastFrame;
}
-
+
private final void removeAllTextureFrames(GL gl) {
final TextureFrame[] texFrames = videoFramesOrig;
videoFramesOrig = null;
@@ -699,14 +699,14 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
texFrames[i] = null;
}
- System.err.println(Thread.currentThread().getName()+"> Clear TexFrame["+i+"]: "+frame+" -> null");
- }
+ System.err.println(Thread.currentThread().getName()+"> Clear TexFrame["+i+"]: "+frame+" -> null");
+ }
}
}
-
+
protected TextureFrame cachedFrame = null;
protected long lastTimeMillis = 0;
-
+
@Override
public final TextureFrame getNextTexture(GL gl) throws IllegalStateException {
synchronized( stateLock ) {
@@ -750,7 +750,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
} else {
d_apts = 0;
}
-
+
final int frame_period_last = video_pts - video_pts_last; // rendering loop interrupted ?
if( videoSCR_reset || frame_period_last > frame_duration*10 ) {
videoSCR_reset = false;
@@ -782,7 +782,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
cachedFrame = nextFrame;
nextFrame = null;
} else if ( !droppedFrame && dt < -maxVideoDelay && videoFramesDecoded.size() > 0 ) {
- // only drop if prev. frame has not been dropped and
+ // only drop if prev. frame has not been dropped and
// frame is too late and one decoded frame is already available.
dropFrame = true;
}
@@ -791,7 +791,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
System.err.println( "AV_: dT "+(currentTimeMillis-lastTimeMillis)+", "+
getPerfStringImpl( video_scr, video_pts, d_vpts,
audio_scr, audio_pts, d_apts,
- video_dpts_avg_diff ) +
+ video_dpts_avg_diff ) +
", avg dpy-fps "+avg_dpy_duration+" ms/f, maxD "+maxVideoDelay+" ms, "+_nextFrame+", playCached " + playCached + ", dropFrame "+dropFrame);
}
}
@@ -803,7 +803,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
lastFrame = nextFrame;
videoFramesFree.putBlocking(_lastFrame);
}
- } else if( DEBUG ) {
+ } else if( DEBUG ) {
final int video_pts = lastFrame.getPTS();
final int audio_pts = getAudioPTSImpl();
final int audio_scr = (int) ( ( currentTimeMillis - audio_scr_t0 ) * playSpeed );
@@ -835,25 +835,25 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
* Audio frames, i.e. {@link AudioSink.AudioFrame}, shall be handled in the process.
*
* Video frames shall be ignored, if {@link #getVID()} is {@link #STREAM_ID_NONE}.
- *
+ *
*
* Audio frames shall be ignored, if {@link #getAID()} is {@link #STREAM_ID_NONE}.
*
* Implementation shall care of OpenGL synchronization as required, e.g. glFinish()/glFlush()!
*
- * @param gl valid and current GL instance, shall be null for audio only.
+ * @param gl valid and current GL instance, shall be null for audio only.
* @param nextFrame the {@link TextureFrame} to store the video PTS and texture data,
* shall be null for audio only.
* @return the last processed video PTS value, maybe {@link TimeFrameI#INVALID_PTS} if video frame is invalid or n/a.
- * Will be {@link TimeFrameI#END_OF_STREAM_PTS} if end of stream reached.
+ * Will be {@link TimeFrameI#END_OF_STREAM_PTS} if end of stream reached.
*/
protected abstract int getNextTextureImpl(GL gl, TextureFrame nextFrame);
-
- /**
+
+ /**
* {@inheritDoc}
*
* Note: All {@link AudioSink} operations are performed from {@link GLMediaPlayerImpl},
@@ -866,8 +866,8 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
*/
@Override
public final AudioSink getAudioSink() { return audioSink; }
-
- /**
+
+ /**
* To be called from implementation at 1st PTS after start
* w/ current pts value in milliseconds.
* @param audio_scr_t0
@@ -908,10 +908,10 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
private final int getVideoDPTSAvg() {
return (int) ( video_dpts_cum * (1.0f - VIDEO_DPTS_COEFF) + 0.5f );
}
-
+
private final void newFrameAvailable(TextureFrame frame, long currentTimeMillis) {
decodedFrameCount++;
- if( 0 == frame.getDuration() ) { // patch frame duration if not set already
+ if( 0 == frame.getDuration() ) { // patch frame duration if not set already
frame.setDuration( (int) frame_duration );
}
synchronized(eventListenersLock) {
@@ -920,38 +920,38 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
}
-
+
class StreamWorker extends Thread {
private volatile boolean isRunning = false;
private volatile boolean isActive = false;
private volatile boolean isBlocked = false;
-
+
private volatile boolean shallPause = true;
private volatile boolean shallStop = false;
-
+
private volatile StreamException streamErr = null;
private volatile GLContext sharedGLCtx = null;
private boolean sharedGLCtxCurrent = false;
private GLDrawable dummyDrawable = null;
-
- /**
- * Starts this daemon thread,
+
+ /**
+ * Starts this daemon thread,
* which initializes the stream first via {@link GLMediaPlayerImpl#initStreamImpl(int, int)} first.
*
* After stream initialization, this thread pauses!
*
- **/
+ **/
StreamWorker() {
setDaemon(true);
start();
}
-
+
private void makeCurrent(GLContext ctx) {
if( GLContext.CONTEXT_NOT_CURRENT >= ctx.makeCurrent() ) {
throw new GLException("Couldn't make ctx current: "+ctx);
}
}
-
+
private void destroySharedGL() {
if( null != sharedGLCtx ) {
if( sharedGLCtx.isCreated() ) {
@@ -963,16 +963,16 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
gle.printStackTrace();
}
}
- sharedGLCtx = null;
+ sharedGLCtx = null;
}
if( null != dummyDrawable ) {
final AbstractGraphicsDevice device = dummyDrawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
dummyDrawable.setRealized(false);
dummyDrawable = null;
device.close();
- }
+ }
}
-
+
public synchronized void initGL(GL gl) {
final GLContext glCtx = gl.getContext();
final boolean glCtxCurrent = glCtx.isCurrent();
@@ -1013,7 +1013,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
while( !isActive ) {
this.notify(); // wake-up pause-block
try {
- this.wait(); // wait until resumed
+ this.wait(); // wait until resumed
} catch (InterruptedException e) {
e.printStackTrace();
}
@@ -1041,12 +1041,12 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
public boolean isRunning() { return isRunning; }
public boolean isActive() { return isActive; }
- public StreamException getStreamErr() { return streamErr; }
-
+ public StreamException getStreamErr() { return streamErr; }
+
public void run() {
setName(getName()+"-StreamWorker_"+StreamWorkerInstanceId);
StreamWorkerInstanceId++;
-
+
synchronized ( this ) {
isRunning = true;
try {
@@ -1061,7 +1061,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
return; // end of thread!
} // also initializes width, height, .. etc
}
-
+
while( !shallStop ){
if( shallPause ) {
synchronized ( this ) {
@@ -1100,7 +1100,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
}
-
+
if( !shallStop ) {
TextureFrame nextFrame = null;
try {
@@ -1121,7 +1121,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
Thread.sleep(STREAM_WORKER_DELAY);
}
if( !videoFramesDecoded.put(nextFrame) ) {
- throw new InternalError("XXX: free "+videoFramesFree+", decoded "+videoFramesDecoded+", "+GLMediaPlayerImpl.this);
+ throw new InternalError("XXX: free "+videoFramesFree+", decoded "+videoFramesDecoded+", "+GLMediaPlayerImpl.this);
}
newFrameAvailable(nextFrame, Platform.currentTimeMillis());
nextFrame = null;
@@ -1170,10 +1170,10 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
this.notify(); // wake-up doStop()
}
}
- }
- static int StreamWorkerInstanceId = 0;
+ }
+ static int StreamWorkerInstanceId = 0;
private StreamWorker streamWorker = null;
-
+
protected final int addStateEventMask(int event_mask, State newState) {
if( state != newState ) {
switch( newState ) {
@@ -1193,7 +1193,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
return event_mask;
}
-
+
protected final void attributesUpdated(int event_mask) {
if( 0 != event_mask ) {
final long now = Platform.currentTimeMillis();
@@ -1204,7 +1204,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
}
-
+
protected final void changeState(int event_mask, State newState) {
event_mask = addStateEventMask(event_mask, newState);
if( 0 != event_mask ) {
@@ -1212,9 +1212,9 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
attributesUpdated( event_mask );
}
}
-
- protected final void updateAttributes(int vid, int aid, int width, int height, int bps_stream,
- int bps_video, int bps_audio, float fps,
+
+ protected final void updateAttributes(int vid, int aid, int width, int height, int bps_stream,
+ int bps_video, int bps_audio, float fps,
int videoFrames, int audioFrames, int duration, String vcodec, String acodec) {
int event_mask = 0;
if( state == State.Uninitialized ) {
@@ -1227,19 +1227,19 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
if( this.vid != vid ) {
event_mask |= GLMediaEventListener.EVENT_CHANGE_VID;
this.vid = vid;
- }
+ }
if( STREAM_ID_AUTO == vid ) {
vid = STREAM_ID_NONE;
}
if( this.aid != aid ) {
event_mask |= GLMediaEventListener.EVENT_CHANGE_AID;
this.aid = aid;
- }
+ }
if( this.width != width || this.height != height ) {
event_mask |= GLMediaEventListener.EVENT_CHANGE_SIZE;
this.width = width;
this.height = height;
- }
+ }
if( this.fps != fps ) {
event_mask |= GLMediaEventListener.EVENT_CHANGE_FPS;
this.fps = fps;
@@ -1257,7 +1257,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
this.audioFrames = audioFrames;
this.duration = duration;
}
- if( (null!=acodec && acodec.length()>0 && !this.acodec.equals(acodec)) ) {
+ if( (null!=acodec && acodec.length()>0 && !this.acodec.equals(acodec)) ) {
event_mask |= GLMediaEventListener.EVENT_CHANGE_CODEC;
this.acodec = acodec;
}
@@ -1283,7 +1283,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
attributesUpdated(GLMediaEventListener.EVENT_CHANGE_SIZE);
}
}
-
+
@Override
public final URI getURI() {
return streamLoc;
@@ -1291,10 +1291,10 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
@Override
public final int getVID() { return vid; }
-
+
@Override
public final int getAID() { return aid; }
-
+
@Override
public final String getVideoCodec() {
return vcodec;
@@ -1309,7 +1309,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
public final int getVideoFrames() {
return videoFrames;
}
-
+
@Override
public final int getAudioFrames() {
return audioFrames;
@@ -1319,7 +1319,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
public final int getDuration() {
return duration;
}
-
+
@Override
public final long getStreamBitrate() {
return bps_stream;
@@ -1329,12 +1329,12 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
public final int getVideoBitrate() {
return bps_video;
}
-
+
@Override
public final int getAudioBitrate() {
return bps_audio;
}
-
+
@Override
public final float getFramerate() {
return fps;
@@ -1344,7 +1344,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
public final boolean isGLOriented() {
return isInGLOrientation;
}
-
+
@Override
public final int getWidth() {
return width;
@@ -1369,11 +1369,11 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
"Video[id "+vid+", <"+vcodec+">, "+width+"x"+height+", glOrient "+isInGLOrientation+", "+fps+" fps, "+frame_duration+" fdur, "+bps_video+" bps], "+
"Audio[id "+aid+", <"+acodec+">, "+bps_audio+" bps, "+audioFrames+" frames], uri "+loc+camPath+"]";
}
-
+
@Override
public final String getPerfString() {
final long currentTimeMillis = Platform.currentTimeMillis();
- final int video_scr = video_scr_pts + (int) ( ( currentTimeMillis - video_scr_t0 ) * playSpeed );
+ final int video_scr = video_scr_pts + (int) ( ( currentTimeMillis - video_scr_t0 ) * playSpeed );
final int d_vpts = video_pts_last - video_scr;
final int audio_scr = (int) ( ( currentTimeMillis - audio_scr_t0 ) * playSpeed );
final int audio_pts = getAudioPTSImpl();
@@ -1383,7 +1383,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
private final String getPerfStringImpl(final int video_scr, final int video_pts, final int d_vpts,
final int audio_scr, final int audio_pts, final int d_apts,
final int video_dpts_avg_diff) {
- final float tt = getDuration() / 1000.0f;
+ final float tt = getDuration() / 1000.0f;
final String audioSinkInfo;
final AudioSink audioSink = getAudioSink();
if( null != audioSink ) {
diff --git a/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java b/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java
index 85fab96a4..6e006d9c0 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java
@@ -22,75 +22,75 @@ public class JavaSoundAudioSink implements AudioSink {
public static final int BUFFER_SIZE = 1000;
public static final int SAMPLES_PER_BUFFER = BUFFER_SIZE / 2;
private static final boolean staticAvailable;
-
+
// Sample time values
// public static final double SAMPLE_TIME_IN_SECS = 1.0 / DEFAULT_SAMPLE_RATE;
// public static final double BUFFER_TIME_IN_SECS = SAMPLE_TIME_IN_SECS * SAMPLES_PER_BUFFER;
-
+
private javax.sound.sampled.AudioFormat format;
private DataLine.Info info;
private SourceDataLine auline;
private int bufferCount;
- private byte [] sampleData = new byte[BUFFER_SIZE];
+ private byte [] sampleData = new byte[BUFFER_SIZE];
private boolean initialized = false;
private AudioSink.AudioFormat chosenFormat = null;
-
+
private volatile boolean playRequested = false;
private float volume = 1.0f;
-
+
static {
boolean ok = false;
try {
AudioSystem.getAudioFileTypes();
ok = true;
} catch (Throwable t) {
-
+
}
staticAvailable=ok;
- }
-
+ }
+
@Override
public String toString() {
return "JavaSoundSink[init "+initialized+", dataLine "+info+", source "+auline+", bufferCount "+bufferCount+
", chosen "+chosenFormat+", jsFormat "+format;
}
-
+
@Override
public final float getPlaySpeed() { return 1.0f; } // FIXME
-
+
@Override
- public final boolean setPlaySpeed(float rate) {
- return false; // FIXME
+ public final boolean setPlaySpeed(float rate) {
+ return false; // FIXME
}
-
+
@Override
public final float getVolume() {
// FIXME
- return volume;
+ return volume;
}
-
+
@Override
public final boolean setVolume(float v) {
// FIXME
volume = v;
return true;
}
-
+
@Override
public AudioSink.AudioFormat getPreferredFormat() {
return DefaultFormat;
}
-
+
@Override
public final int getMaxSupportedChannels() {
return 2;
}
-
+
@Override
public final boolean isSupported(AudioSink.AudioFormat format) {
return true;
}
-
+
@Override
public boolean init(AudioSink.AudioFormat requestedFormat, float frameDuration, int initialQueueSize, int queueGrowAmount, int queueLimit) {
if( !staticAvailable ) {
@@ -117,12 +117,12 @@ public class JavaSoundAudioSink implements AudioSink {
}
return true;
}
-
+
@Override
public boolean isPlaying() {
return playRequested && auline.isRunning();
}
-
+
@Override
public void play() {
if( null != auline ) {
@@ -135,7 +135,7 @@ public class JavaSoundAudioSink implements AudioSink {
auline.start();
}
}
-
+
@Override
public void pause() {
if( null != auline ) {
@@ -143,9 +143,9 @@ public class JavaSoundAudioSink implements AudioSink {
auline.stop();
}
}
-
+
@Override
- public void flush() {
+ public void flush() {
if( null != auline ) {
playRequested = false;
auline.stop();
@@ -157,17 +157,17 @@ public class JavaSoundAudioSink implements AudioSink {
public final int getEnqueuedFrameCount() {
return 0; // FIXME
}
-
+
@Override
public int getFrameCount() {
return 1;
}
-
+
@Override
public int getQueuedFrameCount() {
return 0;
}
-
+
@Override
public boolean isInitialized() {
return initialized;
@@ -179,7 +179,7 @@ public class JavaSoundAudioSink implements AudioSink {
chosenFormat = null;
// FIXEM: complete code!
}
-
+
@Override
public AudioFrame enqueueData(AudioDataFrame audioDataFrame) {
int byteSize = audioDataFrame.getByteSize();
@@ -188,7 +188,7 @@ public class JavaSoundAudioSink implements AudioSink {
final int p = byteBuffer.position();
byteBuffer.get(bytes, 0, byteSize);
byteBuffer.position(p);
-
+
int written = 0;
int len;
while (byteSize > 0) {
@@ -203,27 +203,27 @@ public class JavaSoundAudioSink implements AudioSink {
@Override
public AudioFrame enqueueData(int pts, ByteBuffer bytes, int byteCount) {
return enqueueData(new AudioDataFrame(pts, chosenFormat.getBytesDuration(byteCount), bytes, byteCount));
- }
-
+ }
+
@Override
public int getQueuedByteCount() {
return auline.getBufferSize() - auline.available();
}
-
+
@Override
public int getFreeFrameCount() {
return auline.available();
}
-
+
@Override
public int getQueuedTime() {
return getQueuedTimeImpl( getQueuedByteCount() );
}
private final int getQueuedTimeImpl(int byteCount) {
final int bytesPerSample = chosenFormat.sampleSize >>> 3; // /8
- return byteCount / ( chosenFormat.channelCount * bytesPerSample * ( chosenFormat.sampleRate / 1000 ) );
+ return byteCount / ( chosenFormat.channelCount * bytesPerSample * ( chosenFormat.sampleRate / 1000 ) );
}
@Override
- public final int getPTS() { return 0; } // FIXME
+ public final int getPTS() { return 0; } // FIXME
}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java b/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java
index 723bb9dd1..8d3dbdf44 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java
@@ -15,32 +15,32 @@ public class NullAudioSink implements AudioSink {
private volatile float playSpeed = 1.0f;
private volatile boolean playRequested = false;
private float volume = 1.0f;
-
+
@Override
public final float getPlaySpeed() { return playSpeed; }
-
+
@Override
- public final boolean setPlaySpeed(float rate) {
+ public final boolean setPlaySpeed(float rate) {
if( Math.abs(1.0f - rate) < 0.01f ) {
rate = 1.0f;
}
- playSpeed = rate;
+ playSpeed = rate;
return true;
}
-
+
@Override
public final float getVolume() {
// FIXME
- return volume;
+ return volume;
}
-
+
@Override
public final boolean setVolume(float v) {
// FIXME
- volume = v;
+ volume = v;
return true;
}
-
+
@Override
public AudioFormat getPreferredFormat() {
return DefaultFormat;
@@ -50,73 +50,73 @@ public class NullAudioSink implements AudioSink {
public final int getMaxSupportedChannels() {
return 8;
}
-
+
@Override
public final boolean isSupported(AudioFormat format) {
return true;
}
-
+
@Override
public boolean init(AudioFormat requestedFormat, float frameDuration, int initialQueueSize, int queueGrowAmount, int queueLimit) {
return true;
}
-
+
@Override
public boolean isPlaying() {
return playRequested;
}
-
+
@Override
public void play() {
playRequested = true;
}
-
+
@Override
public void pause() {
playRequested = false;
}
-
+
@Override
- public void flush() {
+ public void flush() {
}
-
+
@Override
public void destroy() {
}
-
+
@Override
public final int getEnqueuedFrameCount() {
return 0;
}
-
+
@Override
public int getFrameCount() {
return 0;
}
-
+
@Override
public int getQueuedFrameCount() {
return 0;
}
-
+
@Override
public int getQueuedByteCount() {
return 0;
}
-
+
@Override
public int getQueuedTime() {
return 0;
}
-
+
@Override
public final int getPTS() { return 0; }
-
+
@Override
public int getFreeFrameCount() {
- return 1;
+ return 1;
}
-
+
@Override
public AudioFrame enqueueData(AudioDataFrame audioDataFrame) {
return null;
@@ -125,5 +125,5 @@ public class NullAudioSink implements AudioSink {
@Override
public AudioFrame enqueueData(int pts, ByteBuffer bytes, int byteCount) {
return null;
- }
+ }
}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java
index 1cddaa9cf..840149272 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -54,10 +54,10 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl {
private TextureData texData = null;
private int pos_ms = 0;
private long pos_start = 0;
-
+
public NullGLMediaPlayer() {
super();
-
+
}
@Override
@@ -82,16 +82,16 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl {
validatePos();
return pos_ms;
}
-
+
@Override
protected final int getNextTextureImpl(GL gl, TextureFrame nextFrame) {
final int pts = getAudioPTSImpl();
nextFrame.setPTS( pts );
return pts;
}
-
+
@Override
- protected final int getAudioPTSImpl() {
+ protected final int getAudioPTSImpl() {
pos_ms = (int) ( Platform.currentTimeMillis() - pos_start );
validatePos();
return pos_ms;
@@ -102,9 +102,9 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl {
if(null != texData) {
texData.destroy();
texData = null;
- }
+ }
}
-
+
public final static TextureData createTestTextureData() {
TextureData res = null;
try {
@@ -125,28 +125,28 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl {
buffer.rewind();
res = new TextureData(GLProfile.getGL2ES2(),
GL.GL_RGBA, w, h, 0,
- GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, false,
+ GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, false,
false, false, buffer, null);
}
return res;
}
-
+
@Override
protected final void initStreamImpl(int vid, int aid) throws IOException {
texData = createTestTextureData();
final float _fps = 24f;
final int _duration = 10*60*1000; // msec
final int _totalFrames = (int) ( (_duration/1000)*_fps );
- updateAttributes(0 /* fake */, GLMediaPlayer.STREAM_ID_NONE,
- texData.getWidth(), texData.getHeight(), 0,
- 0, 0, _fps,
+ updateAttributes(0 /* fake */, GLMediaPlayer.STREAM_ID_NONE,
+ texData.getWidth(), texData.getHeight(), 0,
+ 0, 0, _fps,
_totalFrames, 0, _duration, "png-static", null);
- }
+ }
@Override
protected final void initGLImpl(GL gl) throws IOException, GLException {
isInGLOrientation = true;
}
-
+
/**
* {@inheritDoc}
*
@@ -157,21 +157,21 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl {
protected int validateTextureCount(int desiredTextureCount) {
return 2;
}
-
+
@Override
protected final TextureSequence.TextureFrame createTexImage(GL gl, int texName) {
final Texture texture = super.createTexImageImpl(gl, texName, width, height);
if(null != texData) {
texture.updateImage(gl, texData);
- }
+ }
return new TextureSequence.TextureFrame( texture );
}
-
+
@Override
protected final void destroyTexFrame(GL gl, TextureSequence.TextureFrame frame) {
super.destroyTexFrame(gl, frame);
}
-
+
private void validatePos() {
boolean considerPausing = false;
if( 0 > pos_ms) {
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
index 146a47ebc..390c20346 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,12 +20,12 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
*/
-
+
package jogamp.opengl.util.av.impl;
import java.security.AccessController;
@@ -48,9 +48,9 @@ import com.jogamp.common.util.VersionNumber;
*/
class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
private static final boolean DEBUG = FFMPEGMediaPlayer.DEBUG || DynamicLibraryBundleInfo.DEBUG;
-
+
private static final List glueLibNames = new ArrayList(); // none
-
+
private static final int symbolCount = 65;
private static final String[] symbolNames = {
"avutil_version",
@@ -61,10 +61,10 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
// libavcodec
"avcodec_register_all",
- "avcodec_close",
- "avcodec_string",
- "avcodec_find_decoder",
- "avcodec_open2", // 53.6.0 (opt)
+ "avcodec_close",
+ "avcodec_string",
+ "avcodec_find_decoder",
+ "avcodec_open2", // 53.6.0 (opt)
"avcodec_alloc_frame",
"avcodec_get_frame_defaults",
"avcodec_free_frame", // 54.28.0 (opt)
@@ -79,10 +79,10 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
"av_init_packet",
"av_new_packet",
"av_destruct_packet",
- "av_free_packet",
+ "av_free_packet",
"avcodec_decode_audio4", // 53.25.0 (opt)
/* 27 */ "avcodec_decode_video2", // 52.23.0
-
+
// libavutil
"av_pix_fmt_descriptors",
"av_frame_unref", // 55.0.0 (opt)
@@ -101,10 +101,10 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
"avformat_alloc_context",
"avformat_free_context", // 52.96.0 (opt)
"avformat_close_input", // 53.17.0 (opt)
- "av_register_all",
+ "av_register_all",
"av_find_input_format",
- "avformat_open_input",
- "av_dump_format",
+ "avformat_open_input",
+ "av_dump_format",
"av_read_frame",
"av_seek_frame",
"avformat_seek_file", // ??? (opt)
@@ -115,24 +115,24 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
/* 54 */ "avformat_find_stream_info", // 53.3.0 (opt)
// libavdevice
-/* 55 */ "avdevice_register_all", // ???
-
+/* 55 */ "avdevice_register_all", // ???
+
// libavresample
"avresample_alloc_context", // 1.0.1
"avresample_open",
"avresample_close",
"avresample_free",
/* 60 */ "avresample_convert",
-
+
// libavresample
"av_opt_set_sample_fmt", // actually lavu .. but exist only w/ swresample!
"swr_alloc",
- "swr_init",
+ "swr_init",
"swr_free",
/* 65 */ "swr_convert",
};
-
+
// optional symbol names
private static final String[] optionalSymbolNames = {
"avformat_seek_file", // ??? (opt)
@@ -145,7 +145,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
// libavdevice
"avdevice_register_all", // 53.0.0 (opt)
-
+
// libavresample
"avresample_version", // 1.0.1
"avresample_alloc_context", // 1.0.1
@@ -153,43 +153,43 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
"avresample_close",
"avresample_free",
"avresample_convert",
-
+
// libavresample
"av_opt_set_sample_fmt", // actually lavu .. but exist only w/ swresample!
"swresample_version", // 0
"swr_alloc",
- "swr_init",
+ "swr_init",
"swr_free",
"swr_convert",
};
-
+
private static final long[] symbolAddr = new long[symbolCount];
private static final boolean ready;
private static final boolean libsUFCLoaded;
private static final boolean avresampleLoaded; // optional
private static final boolean swresampleLoaded; // optional
private static final boolean avdeviceLoaded; // optional
- static final VersionNumber avCodecVersion;
+ static final VersionNumber avCodecVersion;
static final VersionNumber avFormatVersion;
static final VersionNumber avUtilVersion;
static final VersionNumber avResampleVersion;
static final VersionNumber swResampleVersion;
private static final FFMPEGNatives natives;
-
+
private static final int LIB_IDX_UTI = 0;
private static final int LIB_IDX_FMT = 1;
private static final int LIB_IDX_COD = 2;
private static final int LIB_IDX_DEV = 3;
private static final int LIB_IDX_AVR = 4;
private static final int LIB_IDX_SWR = 5;
-
+
static {
- // native ffmpeg media player implementation is included in jogl_desktop and jogl_mobile
+ // native ffmpeg media player implementation is included in jogl_desktop and jogl_mobile
GLProfile.initSingleton();
boolean _ready = false;
- /** util, format, codec, device, avresample, swresample */
- boolean[] _loaded= new boolean[6];
- /** util, format, codec, avresample, swresample */
+ /** util, format, codec, device, avresample, swresample */
+ boolean[] _loaded= new boolean[6];
+ /** util, format, codec, avresample, swresample */
VersionNumber[] _versions = new VersionNumber[5];
try {
_ready = initSymbols(_loaded, _versions);
@@ -226,7 +226,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
} else {
System.err.println("LIB_AV No Version/Native-Impl Match");
natives = null;
- }
+ }
if( null != natives && FFMPEGStaticNatives.initIDs0() ) {
ready = natives.initSymbols0(symbolAddr, symbolCount);
} else {
@@ -234,7 +234,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
}
}
}
-
+
static boolean libsLoaded() { return libsUFCLoaded; }
static boolean avDeviceLoaded() { return avdeviceLoaded; }
static boolean avResampleLoaded() { return avresampleLoaded; }
@@ -265,11 +265,11 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
if(symbolNames.length != symbolCount) {
throw new InternalError("XXX0 "+symbolNames.length+" != "+symbolCount);
}
-
+
// optional symbol name set
final Set optionalSymbolNameSet = new HashSet();
optionalSymbolNameSet.addAll(Arrays.asList(optionalSymbolNames));
-
+
// lookup
AccessController.doPrivileged(new PrivilegedAction
- */
+ */
@Override
public final boolean shallLookupGlobal() {
- return true;
+ return true;
}
-
+
@Override
public final List getGlueLibNames() {
return glueLibNames;
@@ -329,7 +329,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
List> libsList = new ArrayList>();
// 6: util, format, codec, device, avresample, swresample
-
+
final List avutil = new ArrayList();
avutil.add("avutil"); // default
@@ -337,13 +337,13 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
avutil.add("libavutil.so.52"); // ffmpeg 1.2 + 2 / libav 9 + 10
avutil.add("libavutil.so.51"); // 0.8
avutil.add("libavutil.so.50"); // 0.7
-
+
avutil.add("avutil-53"); // dummy future proof
avutil.add("avutil-52"); // ffmpeg 1.2 + 2 / libav 9 + 10
avutil.add("avutil-51"); // 0.8
avutil.add("avutil-50"); // 0.7
libsList.add(avutil);
-
+
final List avformat = new ArrayList();
avformat.add("avformat"); // default
@@ -352,14 +352,14 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
avformat.add("libavformat.so.54"); // ffmpeg 1.2 / libav 9
avformat.add("libavformat.so.53"); // 0.8
avformat.add("libavformat.so.52"); // 0.7
-
+
avformat.add("avformat-56"); // dummy future proof
avformat.add("avformat-55"); // ffmpeg 2 / libav 10
avformat.add("avformat-54"); // ffmpeg 1.2 / libav 9
avformat.add("avformat-53"); // 0.8
- avformat.add("avformat-52"); // 0.7
+ avformat.add("avformat-52"); // 0.7
libsList.add(avformat);
-
+
final List avcodec = new ArrayList();
avcodec.add("avcodec"); // default
@@ -367,15 +367,15 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
avcodec.add("libavcodec.so.55"); // ffmpeg 2/ libav 10
avcodec.add("libavcodec.so.54"); // ffmpeg 1.2 / libav 9
avcodec.add("libavcodec.so.53"); // 0.8
- avcodec.add("libavcodec.so.52"); // 0.7
-
+ avcodec.add("libavcodec.so.52"); // 0.7
+
avcodec.add("avcodec-56"); // dummy future proof
avcodec.add("avcodec-55"); // ffmpeg 2/ libav 10
avcodec.add("avcodec-54"); // ffmpeg 1.2 / libav 9
avcodec.add("avcodec-53"); // 0.8
- avcodec.add("avcodec-52"); // 0.7
+ avcodec.add("avcodec-52"); // 0.7
libsList.add(avcodec);
-
+
final List avdevice = new ArrayList();
avdevice.add("avdevice"); // default
@@ -383,19 +383,19 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
avdevice.add("libavdevice.so.55"); // ffmpeg 2
avdevice.add("libavdevice.so.54"); // ffmpeg 1.2 / libav 10
avdevice.add("libavdevice.so.53"); // 0.8 && libav 9
-
+
avdevice.add("avdevice-56"); // dummy future proof
avdevice.add("avdevice-55"); // ffmpeg 2
avdevice.add("avdevice-54"); // ffmpeg 1.2 / libav 10
avdevice.add("avdevice-53"); // 0.8 && libav 9
libsList.add(avdevice);
-
+
final List avresample = new ArrayList();
avresample.add("avresample"); // default
avresample.add("libavresample.so.2"); // dummy future proof
avresample.add("libavresample.so.1"); // libav 9 + 10
-
+
avresample.add("avresample-2"); // dummy future proof
avresample.add("avresample-1"); // libav 9 + 10
libsList.add(avresample);
@@ -405,11 +405,11 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
swresample.add("libswresample.so.1"); // dummy future proof
swresample.add("libswresample.so.0"); // ffmpeg 1.2 + 2.x
-
+
swresample.add("swresample-1"); // dummy future proof
swresample.add("swresample-0"); // ffmpeg 1.2 + 2.x
libsList.add(swresample);
-
+
return libsList;
}
@@ -431,5 +431,5 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
@Override
public final RunnableExecutor getLibLoaderExecutor() {
return DynamicLibraryBundle.getDefaultRunnableExecutor();
- }
+ }
}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
index f196ebef1..2abd73181 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -65,18 +65,18 @@ import jogamp.opengl.util.av.impl.FFMPEGNatives.SampleFormat;
* Besides the default BSD/Linux/.. repositories and installations,
* precompiled binaries can be found at the
* listed location below.
- *
- *
+ *
+ *
*
- * The decoded video frame is written directly into an OpenGL texture
- * on the GPU in it's native format. A custom fragment shader converts
- * the native pixelformat to a usable RGB format if required.
- * Hence only 1 copy is required before bloating the picture
+ * The decoded video frame is written directly into an OpenGL texture
+ * on the GPU in it's native format. A custom fragment shader converts
+ * the native pixelformat to a usable RGB format if required.
+ * Hence only 1 copy is required before bloating the picture
* from YUV* to RGB, for example.
- *
+ *
*
- * Implements pixel format conversion to RGB via
+ * Implements pixel format conversion to RGB via
* fragment shader texture-lookup functions:
*
- *
+ *
*/
public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
/** POSIX ENOSYS {@value}: Function not implemented. FIXME: Move to GlueGen ?!*/
private static final int ENOSYS = 38;
-
+
// Instance data
private static final FFMPEGNatives natives;
private static final int avUtilMajorVersionCC;
private static final int avFormatMajorVersionCC;
- private static final int avCodecMajorVersionCC;
+ private static final int avCodecMajorVersionCC;
private static final int avResampleMajorVersionCC;
private static final int swResampleMajorVersionCC;
private static final boolean available;
-
+
static {
final boolean libAVGood = FFMPEGDynamicLibraryBundleInfo.initSingleton();
final boolean libAVVersionGood;
@@ -171,7 +171,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
avUtilMajorVersionCC = natives.getAvUtilMajorVersionCC0();
avResampleMajorVersionCC = natives.getAvResampleMajorVersionCC0();
swResampleMajorVersionCC = natives.getSwResampleMajorVersionCC0();
- } else {
+ } else {
avUtilMajorVersionCC = 0;
avFormatMajorVersionCC = 0;
avCodecMajorVersionCC = 0;
@@ -211,25 +211,25 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
available = libAVGood && libAVVersionGood && null != natives;
}
-
+
public static final boolean isAvailable() { return available; }
//
// General
//
-
- private long moviePtr = 0;
-
+
+ private long moviePtr = 0;
+
//
// Video
//
-
+
private String texLookupFuncName = "ffmpegTexture2D";
- private boolean usesTexLookupShader = false;
+ private boolean usesTexLookupShader = false;
private PixelFormat vPixelFmt = null;
private int vPlanes = 0;
private int vBitsPerPixel = 0;
- private int vBytesPerPixelPerPlane = 0;
+ private int vBytesPerPixelPerPlane = 0;
private int texWidth, texHeight; // overall (stuffing planes in one texture)
private String singleTexComp = "r";
private GLPixelStorageModes psm;
@@ -237,10 +237,10 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
//
// Audio
//
-
+
private AudioSink.AudioFormat avChosenAudioFormat;
private int audioSamplesPerFrameAndChannel = 0;
-
+
public FFMPEGMediaPlayer() {
if(!available) {
throw new RuntimeException("FFMPEGMediaPlayer not available");
@@ -263,14 +263,14 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
private final void destroyAudioSink() {
final AudioSink _audioSink = audioSink;
- if( null != _audioSink ) {
+ if( null != _audioSink ) {
audioSink = null;
_audioSink.destroy();
}
}
-
+
public static final String dev_video_linux = "/dev/video";
-
+
@Override
protected final void initStreamImpl(int vid, int aid) throws IOException {
if(0==moviePtr) {
@@ -279,7 +279,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(DEBUG) {
System.err.println("initStream: p1 "+this);
}
-
+
final String streamLocS=IOUtil.decodeFromURI(streamLoc.toString());
destroyAudioSink();
if( GLMediaPlayer.STREAM_ID_NONE == aid ) {
@@ -291,7 +291,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(DEBUG) {
System.err.println("initStream: p2 preferred "+preferredAudioFormat+", "+this);
}
-
+
final boolean isCameraInput = null != cameraPath;
final String resStreamLocS;
// int rw=640, rh=480, rr=15;
@@ -314,7 +314,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
case OPENKODE:
default:
resStreamLocS = streamLocS; // FIXME: ??
- break;
+ break;
}
if( null != cameraProps ) {
sizes = cameraProps.get(CameraPropSizeS);
@@ -362,7 +362,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(DEBUG) {
System.err.println("initGL: p3 avChosen "+avChosenAudioFormat);
}
-
+
if( STREAM_ID_NONE == aid ) {
audioSink.destroy();
audioSink = AudioSinkFactory.createNull();
@@ -386,7 +386,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
System.err.println("initGL: p4 chosen "+avChosenAudioFormat);
System.err.println("initGL: p4 chosen "+audioSink);
}
-
+
if( null != gl && STREAM_ID_NONE != vid ) {
int tf, tif=GL.GL_RGBA; // texture format and internal format
int tt = GL.GL_UNSIGNED_BYTE;
@@ -413,9 +413,9 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
tf = GL2ES2.GL_BGRA; tif=GL.GL_RGBA; break;
} else {
tf = GL2ES2.GL_RGBA; tif=GL.GL_RGBA; break;
- }
+ }
default: throw new RuntimeException("Unsupported bytes-per-pixel / plane "+vBytesPerPixelPerPlane);
- }
+ }
setTextureFormat(tif, tf);
setTextureType(tt);
if(DEBUG) {
@@ -423,12 +423,12 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
", tex "+texWidth+"x"+texHeight+", usesTexLookupShader "+usesTexLookupShader);
}
}
- }
+ }
@Override
protected final TextureFrame createTexImage(GL gl, int texName) {
return new TextureFrame( createTexImageImpl(gl, texName, texWidth, texHeight) );
}
-
+
/**
* @param sampleRate sample rate in Hz (1/s)
* @param sampleSize sample size in bits
@@ -439,10 +439,10 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
* @param littleEndian true for little-endian, false for big endian
* @return
*/
-
+
/**
* Native callback
- * Converts the given libav/ffmpeg values to {@link AudioFormat} and returns {@link AudioSink#isSupported(AudioFormat)}.
+ * Converts the given libav/ffmpeg values to {@link AudioFormat} and returns {@link AudioSink#isSupported(AudioFormat)}.
* @param audioSampleFmt ffmpeg/libav audio-sample-format, see {@link SampleFormat}.
* @param audioSampleRate sample rate in Hz (1/s)
* @param audioChannels number of channels
@@ -456,9 +456,9 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
return res;
}
-
+
/**
- * Returns {@link AudioFormat} as converted from the given libav/ffmpeg values.
+ * Returns {@link AudioFormat} as converted from the given libav/ffmpeg values.
* @param audioSampleFmt ffmpeg/libav audio-sample-format, see {@link SampleFormat}.
* @param audioSampleRate sample rate in Hz (1/s)
* @param audioChannels number of channels
@@ -506,7 +506,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
return new AudioFormat(audioSampleRate, sampleSize, audioChannels, signed, fixedP, planar, true /* littleEndian */);
}
-
+
/**
* Native callback
* @param vid
@@ -523,9 +523,9 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
* @param audioChannels
* @param audioSamplesPerFrameAndChannel in audio samples per frame and channel
*/
- void setupFFAttributes(int vid, int pixFmt, int planes, int bitsPerPixel, int bytesPerPixelPerPlane,
+ void setupFFAttributes(int vid, int pixFmt, int planes, int bitsPerPixel, int bytesPerPixelPerPlane,
int tWd0, int tWd1, int tWd2, int vW, int vH,
- int aid, int audioSampleFmt, int audioSampleRate,
+ int aid, int audioSampleFmt, int audioSampleRate,
int audioChannels, int audioSamplesPerFrameAndChannel) {
// defaults ..
vPixelFmt = null;
@@ -534,28 +534,28 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
vBytesPerPixelPerPlane = 0;
usesTexLookupShader = false;
texWidth = 0; texHeight = 0;
-
+
final int[] vTexWidth = { 0, 0, 0 }; // per plane
-
+
if( STREAM_ID_NONE != vid ) {
vPixelFmt = PixelFormat.valueOf(pixFmt);
vPlanes = planes;
vBitsPerPixel = bitsPerPixel;
- vBytesPerPixelPerPlane = bytesPerPixelPerPlane;
+ vBytesPerPixelPerPlane = bytesPerPixelPerPlane;
vTexWidth[0] = tWd0; vTexWidth[1] = tWd1; vTexWidth[2] = tWd2;
-
+
switch(vPixelFmt) {
case YUVJ420P:
case YUV420P: // < planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
usesTexLookupShader = true;
// YUV420P: Adding U+V on right side of fixed height texture,
// since width is already aligned by decoder.
- // Splitting texture to 4 quadrants:
+ // Splitting texture to 4 quadrants:
// Y covers left top/low quadrant
// U on top-right quadrant.
// V on low-right quadrant.
// Y=w*h, U=w/2*h/2, V=w/2*h/2
- // w*h + 2 ( w/2 * h/2 )
+ // w*h + 2 ( w/2 * h/2 )
// w*h + w*h/2
texWidth = vTexWidth[0] + vTexWidth[1]; texHeight = vH;
break;
@@ -573,27 +573,27 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
case YUYV422: // < packed YUV 4:2:2, 2x 16bpp, Y0 Cb Y1 Cr - stuffed into RGBA half width texture
case BGR24:
usesTexLookupShader = true;
- texWidth = vTexWidth[0]; texHeight = vH;
+ texWidth = vTexWidth[0]; texHeight = vH;
break;
-
+
case RGB24:
case ARGB:
case RGBA:
case ABGR:
case BGRA:
usesTexLookupShader = false;
- texWidth = vTexWidth[0]; texHeight = vH;
+ texWidth = vTexWidth[0]; texHeight = vH;
break;
default: // FIXME: Add more formats !
throw new RuntimeException("Unsupported pixelformat: "+vPixelFmt);
}
}
-
+
// defaults ..
final SampleFormat aSampleFmt;
avChosenAudioFormat = null;;
this.audioSamplesPerFrameAndChannel = 0;
-
+
if( STREAM_ID_NONE != aid ) {
aSampleFmt = SampleFormat.valueOf(audioSampleFmt);
avChosenAudioFormat = avAudioFormat2Local(aSampleFmt, audioSampleRate, audioChannels);
@@ -601,7 +601,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
} else {
aSampleFmt = null;
}
-
+
if(DEBUG) {
System.err.println("audio: id "+aid+", fmt "+aSampleFmt+", "+avChosenAudioFormat+", aFrameSize/fc "+audioSamplesPerFrameAndChannel);
System.err.println("video: id "+vid+", fmt "+vW+"x"+vH+", "+vPixelFmt+", planes "+vPlanes+", bpp "+vBitsPerPixel+"/"+vBytesPerPixelPerPlane+", usesTexLookupShader "+usesTexLookupShader);
@@ -612,7 +612,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
System.err.println(this.toString());
}
}
-
+
/**
* Native callback
* @param isInGLOrientation
@@ -624,13 +624,13 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
* @param tWd1
* @param tWd2
*/
- void updateVidAttributes(boolean isInGLOrientation, int pixFmt, int planes, int bitsPerPixel, int bytesPerPixelPerPlane,
+ void updateVidAttributes(boolean isInGLOrientation, int pixFmt, int planes, int bitsPerPixel, int bytesPerPixelPerPlane,
int tWd0, int tWd1, int tWd2, int vW, int vH) {
}
-
+
/**
* {@inheritDoc}
- *
+ *
* If this implementation generates a specialized shader,
* it allows the user to override the default function name ffmpegTexture2D.
* Otherwise the call is delegated to it's super class.
@@ -646,15 +646,15 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
return texLookupFuncName;
}
- return super.getTextureLookupFunctionName(desiredFuncName);
+ return super.getTextureLookupFunctionName(desiredFuncName);
}
-
+
/**
* {@inheritDoc}
- *
+ *
* Depending on the pixelformat, a specific conversion shader is being created,
- * e.g. YUV420P to RGB. Otherwise the call is delegated to it's super class.
- */
+ * e.g. YUV420P to RGB. Otherwise the call is delegated to it's super class.
+ */
@Override
public final String getTextureLookupFragmentShaderImpl() throws IllegalStateException {
if(State.Uninitialized == state) {
@@ -685,7 +685,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
" return vec4(r, g, b, 1);\n"+
"}\n"
;
-
+
case YUVJ422P:
case YUV422P: ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
return
@@ -706,7 +706,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
" return vec4(r, g, b, 1);\n"+
"}\n"
;
-
+
case YUYV422: // < packed YUV 4:2:2, 2 x 16bpp, [Y0 Cb] [Y1 Cr]
// Stuffed into RGBA half width texture
return
@@ -740,9 +740,9 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
default: // FIXME: Add more formats !
throw new InternalError("Add proper mapping of: vPixelFmt "+vPixelFmt+", usesTexLookupShader "+usesTexLookupShader);
- }
+ }
}
-
+
@Override
public final boolean playImpl() {
if(0==moviePtr) {
@@ -754,7 +754,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
return true;
}
-
+
@Override
public final boolean pauseImpl() {
if(0==moviePtr) {
@@ -780,12 +780,12 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
psm.setUnpackAlignment(gl, 1); // RGBA ? 4 : 1
gl.glActiveTexture(GL.GL_TEXTURE0+getTextureUnit());
}
-
+
@Override
protected void postNextTextureImpl(GL gl) {
psm.restore(gl);
}
-
+
@Override
protected final int getNextTextureImpl(GL gl, TextureFrame nextFrame) {
if(0==moviePtr) {
@@ -806,14 +806,14 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
nextFrame.setPTS(vPTS);
}
return vPTS;
- }
-
+ }
+
final void pushSound(ByteBuffer sampleData, int data_size, int audio_pts) {
setFirstAudioPTS2SCR( audio_pts );
if( 1.0f == playSpeed || audioSinkPlaySpeedSet ) {
audioSink.enqueueData( audio_pts, sampleData, data_size);
}
}
-
+
}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
index 8e08c23fa..bc0865aa9 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -30,21 +30,21 @@ package jogamp.opengl.util.av.impl;
import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame;
interface FFMPEGNatives {
-
+
boolean initSymbols0(long[] symbols, int count);
int getAvUtilMajorVersionCC0();
int getAvFormatMajorVersionCC0();
int getAvCodecMajorVersionCC0();
int getAvResampleMajorVersionCC0();
int getSwResampleMajorVersionCC0();
-
+
long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
void destroyInstance0(long moviePtr);
-
+
/**
* Issues {@link #updateAttributes(int, int, int, int, int, int, int, float, int, int, String, String)}
* and {@link #updateAttributes2(int, int, int, int, int, int, int, int, int, int)}.
- *
+ *
* @param moviePtr
* @param url
* @param vid
@@ -56,25 +56,25 @@ interface FFMPEGNatives {
* @param aPrefSampleRate
* @param aPrefChannelCount
*/
- void setStream0(long moviePtr, String url, boolean isCameraInput,
- int vid, String sizes, int vWidth, int vHeight,
+ void setStream0(long moviePtr, String url, boolean isCameraInput,
+ int vid, String sizes, int vWidth, int vHeight,
int vRate, int aid, int aMaxChannelCount, int aPrefSampleRate);
-
+
void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
- int getVideoPTS0(long moviePtr);
-
+ int getVideoPTS0(long moviePtr);
+
int getAudioPTS0(long moviePtr);
-
+
/**
* @return resulting current video PTS, or {@link TextureFrame#INVALID_PTS}
*/
int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
-
+
int play0(long moviePtr);
int pause0(long moviePtr);
int seek0(long moviePtr, int position);
-
+
/** FFMPEG/libAV Audio Sample Format */
public static enum SampleFormat {
// NONE = -1,
@@ -89,10 +89,10 @@ interface FFMPEGNatives {
S32P, ///< signed 32 bits, planar
FLTP, ///< float, planar
DBLP, ///< double, planar
-
+
COUNT; ///< Number of sample formats.
-
- /**
+
+ /**
* Returns the matching SampleFormat value corresponding to the given SampleFormat's integer ordinal.
*
* given:
@@ -131,7 +131,7 @@ interface FFMPEGNatives {
/** planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) */
YUV411P,
/** Y, 8bpp */
- GRAY8,
+ GRAY8,
/** Y, 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb */
MONOWHITE,
/** Y, 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb */
@@ -151,57 +151,57 @@ interface FFMPEGNatives {
/** packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1 */
UYVY422,
/** packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3 */
- UYYVYY411,
+ UYYVYY411,
/** packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) */
- BGR8,
+ BGR8,
/** packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits */
- BGR4,
+ BGR4,
/** packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb) */
- BGR4_BYTE,
+ BGR4_BYTE,
/** packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb) */
- RGB8,
+ RGB8,
/** packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits */
- RGB4,
+ RGB4,
/** packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb) */
- RGB4_BYTE,
+ RGB4_BYTE,
/** planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V) */
- NV12,
+ NV12,
/** as above, but U and V bytes are swapped */
- NV21,
+ NV21,
/** packed ARGB 8:8:8:8, 32bpp, ARGBARGB... */
- ARGB,
+ ARGB,
/** packed RGBA 8:8:8:8, 32bpp, RGBARGBA... */
- RGBA,
+ RGBA,
/** packed ABGR 8:8:8:8, 32bpp, ABGRABGR... */
- ABGR,
+ ABGR,
/** packed BGRA 8:8:8:8, 32bpp, BGRABGRA... */
- BGRA,
+ BGRA,
/** Y, 16bpp, big-endian */
- GRAY16BE,
+ GRAY16BE,
/** Y , 16bpp, little-endian */
- GRAY16LE,
+ GRAY16LE,
/** planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples) */
- YUV440P,
+ YUV440P,
/** planar YUV 4:4:0 full scale (JPEG), deprecated in favor of YUV440P and setting color_range */
- YUVJ440P,
+ YUVJ440P,
/** planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples) */
- YUVA420P,
+ YUVA420P,
/** H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers */
- VDPAU_H264,
+ VDPAU_H264,
/** MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers */
- VDPAU_MPEG1,
+ VDPAU_MPEG1,
/** MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers */
- VDPAU_MPEG2,
+ VDPAU_MPEG2,
/** WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers */
- VDPAU_WMV3,
+ VDPAU_WMV3,
/** VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers */
- VDPAU_VC1,
+ VDPAU_VC1,
/** packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian */
- RGB48BE,
+ RGB48BE,
/** packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian */
- RGB48LE,
+ RGB48LE,
RGB565BE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
RGB565LE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
@@ -255,7 +255,7 @@ interface FFMPEGNatives {
GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian
COUNT ///< number of pixel formats in this list
;
- /**
+ /**
* Returns the matching PixelFormat value corresponding to the given PixelFormat's integer ordinal.
*
* given:
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java
index 01c249313..22a045825 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -29,7 +29,7 @@ package jogamp.opengl.util.av.impl;
import com.jogamp.common.util.VersionNumber;
-class FFMPEGStaticNatives {
+class FFMPEGStaticNatives {
static VersionNumber getAVVersion(int vers) {
return new VersionNumber( ( vers >> 16 ) & 0xFF,
( vers >> 8 ) & 0xFF,
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
index 22694888d..4b013c1b3 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -45,7 +45,7 @@ class FFMPEGv08Natives implements FFMPEGNatives {
@Override
public native int getSwResampleMajorVersionCC0();
-
+
@Override
public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java
index 08e19d5e6..d69763287 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -45,7 +45,7 @@ class FFMPEGv09Natives implements FFMPEGNatives {
@Override
public native int getSwResampleMajorVersionCC0();
-
+
@Override
public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java
index 0081743fa..0b5f70d7c 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -45,7 +45,7 @@ class FFMPEGv10Natives implements FFMPEGNatives {
@Override
public native int getSwResampleMajorVersionCC0();
-
+
@Override
public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java
index a5a701a4f..24198703a 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -45,19 +45,19 @@ import jogamp.opengl.util.av.EGLMediaPlayerImpl;
*/
public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
static final boolean available;
-
+
static {
available = false;
/** FIXME!
- // OMX binding is included in jogl_desktop and jogl_mobile
+ // OMX binding is included in jogl_desktop and jogl_mobile
GLProfile.initSingleton();
available = initIDs0(); */
}
-
+
public static final boolean isAvailable() { return available; }
-
+
protected long moviePtr = 0;
-
+
public OMXGLMediaPlayer() {
super(TextureType.KHRImage, true);
if(!available) {
@@ -70,21 +70,21 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
moviePtr = _createInstance();
if(0==moviePtr) {
throw new GLException("Couldn't create OMXInstance");
- }
+ }
}
-
+
@Override
protected TextureSequence.TextureFrame createTexImage(GL gl, int texName) {
final EGLTextureFrame eglTex = (EGLTextureFrame) super.createTexImage(gl, texName);
_setStreamEGLImageTexture2D(moviePtr, texName, eglTex.getImage(), eglTex.getSync());
return eglTex;
}
-
+
@Override
protected void destroyTexFrame(GL gl, TextureSequence.TextureFrame imgTex) {
- super.destroyTexFrame(gl, imgTex);
+ super.destroyTexFrame(gl, imgTex);
}
-
+
@Override
protected void destroyImpl(GL gl) {
if (moviePtr != 0) {
@@ -94,20 +94,20 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
moviePtr = 0;
}
}
-
+
@Override
protected void initStreamImpl(int vid, int aid) throws IOException {
if(0==moviePtr) {
throw new GLException("OMX native instance null");
}
if(!streamLoc.getScheme().equals("file")) {
- throw new IOException("Only file schemes are allowed: "+streamLoc);
+ throw new IOException("Only file schemes are allowed: "+streamLoc);
}
final String path=streamLoc.getPath();
if(DEBUG) {
System.out.println("initGLStream: clean path "+path);
}
-
+
if(DEBUG) {
System.out.println("initGLStream: p1 "+this);
}
@@ -121,7 +121,7 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
// NOP
isInGLOrientation = true;
}
-
+
@Override
protected int getAudioPTSImpl() {
return 0!=moviePtr ? _getCurrentPosition(moviePtr) : 0;
@@ -172,8 +172,8 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
final int nextTex = _getNextTextureID(moviePtr, true);
if(0 < nextTex) {
// FIXME set pts !
- /* FIXME
- final TextureSequence.TextureFrame eglImgTex =
+ /* FIXME
+ final TextureSequence.TextureFrame eglImgTex =
texFrameMap.get(new Integer(_getNextTextureID(moviePtr, blocking)));
if(null!=eglImgTex) {
lastTex = eglImgTex;
@@ -181,7 +181,7 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
}
return 0; // FIXME: return pts
}
-
+
private String replaceAll(String orig, String search, String repl) {
String dest=null;
// In case replaceAll / java.util.regex.* is not supported (-> CVM)
@@ -203,14 +203,14 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
}
private static native boolean initIDs0();
- private native long _createInstance();
+ private native long _createInstance();
private native void _destroyInstance(long moviePtr);
-
+
private native void _detachVideoRenderer(long moviePtr); // stop before
private native void _attachVideoRenderer(long moviePtr); // detach before
private native void _setStream(long moviePtr, int textureNum, String path);
private native void _activateStream(long moviePtr);
-
+
private native void _setStreamEGLImageTexture2D(long moviePtr, int tex, long image, long sync);
private native int _seek(long moviePtr, int position);
private native void _setPlaySpeed(long moviePtr, float rate);
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
index 3c468f358..2d74fa532 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
@@ -41,23 +41,23 @@ import com.jogamp.opengl.util.GLArrayDataEditable;
import com.jogamp.opengl.util.glsl.ShaderState;
/**
- * Used for 1:1 GLSL arrays, i.e. where the buffer data
- * represents this array only.
+ * Used for 1:1 GLSL arrays, i.e. where the buffer data
+ * represents this array only.
*/
-public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandler {
-
+public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandler {
+
public GLSLArrayHandler(GLArrayDataEditable ad) {
super(ad);
}
-
+
public final void setSubArrayVBOName(int vboName) {
throw new UnsupportedOperationException();
}
-
+
public final void addSubHandler(GLArrayHandlerFlat handler) {
throw new UnsupportedOperationException();
}
-
+
public final void enableState(GL gl, boolean enable, Object ext) {
final GL2ES2 glsl = gl.getGL2ES2();
if( null != ext ) {
@@ -66,12 +66,12 @@ public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandle
enableSimple(glsl, enable);
}
}
-
+
private final void enableShaderState(GL2ES2 glsl, boolean enable, ShaderState st) {
if(enable) {
/*
* This would be the non optimized code path:
- *
+ *
if(ad.isVBO()) {
glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
if(!ad.isVBOWritten()) {
@@ -108,13 +108,13 @@ public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandle
} else if(null!=buffer) {
st.vertexAttribPointer(glsl, ad);
}
-
+
st.enableVertexAttribArray(glsl, ad);
} else {
st.disableVertexAttribArray(glsl, ad);
}
}
-
+
private final void enableSimple(GL2ES2 glsl, boolean enable) {
final int location = ad.getLocation();
if( 0 > location ) {
@@ -123,7 +123,7 @@ public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandle
if(enable) {
/*
* This would be the non optimized code path:
- *
+ *
if(ad.isVBO()) {
glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
if(!ad.isVBOWritten()) {
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
index 855406db3..a5f78b5d6 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
@@ -37,7 +37,7 @@ import com.jogamp.opengl.util.GLArrayDataWrapper;
import com.jogamp.opengl.util.glsl.ShaderState;
/**
- * Used for interleaved GLSL arrays, i.e. where the buffer data itself is handled
+ * Used for interleaved GLSL arrays, i.e. where the buffer data itself is handled
* separately and interleaves many arrays.
*/
public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat {
@@ -50,7 +50,7 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat {
public GLArrayDataWrapper getData() {
return ad;
}
-
+
public final void syncData(GL gl, Object ext) {
final GL2ES2 glsl = gl.getGL2ES2();
if( null != ext ) {
@@ -62,7 +62,7 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat {
}
/**
* Due to probable application VBO switching, this might not make any sense ..
- *
+ *
if(!written) {
st.vertexAttribPointer(glsl, ad);
} else if(st.getAttribLocation(glsl, ad) >= 0) {
@@ -94,7 +94,7 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat {
} else {
glsl.glDisableVertexAttribArray(location);
}
- }
+ }
}
- }
+ }
}
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java
index c2048d652..bcc146d78 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java
@@ -40,8 +40,8 @@ import jogamp.opengl.util.GLVBOArrayHandler;
import com.jogamp.opengl.util.GLArrayDataEditable;
/**
- * Interleaved fixed function arrays, i.e. where this buffer data
- * represents many arrays.
+ * Interleaved fixed function arrays, i.e. where this buffer data
+ * represents many arrays.
*/
public class GLSLArrayHandlerInterleaved extends GLVBOArrayHandler implements GLArrayHandler {
private List subArrays = new ArrayList();
@@ -49,13 +49,13 @@ public class GLSLArrayHandlerInterleaved extends GLVBOArrayHandler implements GL
public GLSLArrayHandlerInterleaved(GLArrayDataEditable ad) {
super(ad);
}
-
+
public final void setSubArrayVBOName(int vboName) {
for(int i=0; i shaderRootClass, String shaderSrcRoot, String shaderBinRoot,
String vertexColorFile, String vertexColorLightFile,
String fragmentColorFile, String fragmentColorTextureFile) {
@@ -90,14 +90,14 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
this.pmvMatrix = new PMVMatrix();
}
- fixedFunction = new FixedFuncPipeline(this.gl, mode, this.pmvMatrix, shaderRootClass, shaderSrcRoot,
+ fixedFunction = new FixedFuncPipeline(this.gl, mode, this.pmvMatrix, shaderRootClass, shaderSrcRoot,
shaderBinRoot, vertexColorFile, vertexColorLightFile, fragmentColorFile, fragmentColorTextureFile);
}
public boolean verbose() { return fixedFunction.verbose(); }
public void setVerbose(boolean v) { fixedFunction.setVerbose(v); }
-
+
public void destroy() {
fixedFunction.destroy(gl);
fixedFunction = null;
@@ -111,16 +111,16 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
public PMVMatrix getMatrix() { return pmvMatrix; }
//
- // FixedFuncHookIf - hooks
+ // FixedFuncHookIf - hooks
//
public void glDrawArrays(int mode, int first, int count) {
fixedFunction.glDrawArrays(gl, mode, first, count);
}
public void glDrawElements(int mode, int count, int type, java.nio.Buffer indices) {
- fixedFunction.glDrawElements(gl, mode, count, type, indices);
+ fixedFunction.glDrawElements(gl, mode, count, type, indices);
}
public void glDrawElements(int mode, int count, int type, long indices_buffer_offset) {
- fixedFunction.glDrawElements(gl, mode, count, type, indices_buffer_offset);
+ fixedFunction.glDrawElements(gl, mode, count, type, indices_buffer_offset);
}
public void glActiveTexture(int texture) {
@@ -136,7 +136,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
if(fixedFunction.glEnable(cap, false)) {
gl.glDisable(cap);
}
- }
+ }
public void glGetFloatv(int pname, java.nio.FloatBuffer params) {
if(PMVMatrix.isMatrixGetName(pname)) {
pmvMatrix.glGetFloatv(pname, params);
@@ -165,7 +165,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
gl.glGetIntegerv(pname, params, params_offset);
}
-
+
public void glTexEnvi(int target, int pname, int value) {
fixedFunction.glTexEnvi(target, pname, value);
}
@@ -179,7 +179,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
fixedFunction.glBindTexture(target, texture);
gl.glBindTexture(target, texture);
}
- public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border,
+ public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border,
int format, int type, Buffer pixels) {
// align internalformat w/ format, an ES2 requirement
switch(internalformat) {
@@ -212,8 +212,8 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
public void glPointParameterfv(int pname, java.nio.FloatBuffer params) {
fixedFunction.glPointParameterfv(pname, params);
}
-
- //
+
+ //
// MatrixIf
//
public int glGetMatrixMode() {
@@ -253,29 +253,29 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
pmvMatrix.glScalef(x, y, z);
}
public void glOrtho(double left, double right, double bottom, double top, double near_val, double far_val) {
- glOrthof((float) left, (float) right, (float) bottom, (float) top, (float) near_val, (float) far_val);
+ glOrthof((float) left, (float) right, (float) bottom, (float) top, (float) near_val, (float) far_val);
}
public void glOrthof(float left, float right, float bottom, float top, float zNear, float zFar) {
pmvMatrix.glOrthof(left, right, bottom, top, zNear, zFar);
}
public void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) {
- glFrustumf((float) left, (float) right, (float) bottom, (float) top, (float) zNear, (float) zFar);
+ glFrustumf((float) left, (float) right, (float) bottom, (float) top, (float) zNear, (float) zFar);
}
public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) {
pmvMatrix.glFrustumf(left, right, bottom, top, zNear, zFar);
}
- //
+ //
// LightingIf
//
public void glColor4f(float red, float green, float blue, float alpha) {
fixedFunction.glColor4f(gl, red, green, blue, alpha);
}
-
+
public void glColor4ub(byte red, byte green, byte blue, byte alpha) {
- glColor4f(ValueConv.byte_to_float(red, false),
- ValueConv.byte_to_float(green, false),
- ValueConv.byte_to_float(blue, false),
+ glColor4f(ValueConv.byte_to_float(red, false),
+ ValueConv.byte_to_float(green, false),
+ ValueConv.byte_to_float(blue, false),
ValueConv.byte_to_float(alpha, false) );
}
public void glLightfv(int light, int pname, java.nio.FloatBuffer params) {
@@ -299,17 +299,17 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
//
public void glShadeModel(int mode) {
fixedFunction.glShadeModel(gl, mode);
- }
+ }
public void glAlphaFunc(int func, float ref) {
fixedFunction.glAlphaFunc(func, ref);
}
-
- /** ES2 supports CullFace implicit
+
+ /** ES2 supports CullFace implicit
public void glCullFace(int faceName) {
fixedFunction.glCullFace(faceName);
gl.glCullFace(faceName);
} */
-
+
//
// PointerIf
//
@@ -340,7 +340,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
public void glVertexPointer(int size, int type, int stride, java.nio.Buffer pointer) {
- glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
}
public void glVertexPointer(int size, int type, int stride, long pointer_buffer_offset) {
@@ -348,7 +348,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
if(vboName==0) {
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
- glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
}
@@ -368,7 +368,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
fixedFunction.glColorPointer(gl, array);
}
public void glColorPointer(int size, int type, int stride, java.nio.Buffer pointer) {
- glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
}
public void glColorPointer(int size, int type, int stride, long pointer_buffer_offset) {
@@ -376,7 +376,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
if(vboName==0) {
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
- glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
}
@@ -399,7 +399,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
fixedFunction.glNormalPointer(gl, array);
}
public void glNormalPointer(int type, int stride, java.nio.Buffer pointer) {
- glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, GLBuffers.isGLTypeFixedPoint(type), stride,
pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
}
public void glNormalPointer(int type, int stride, long pointer_buffer_offset) {
@@ -407,7 +407,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
if(vboName==0) {
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
- glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, GLBuffers.isGLTypeFixedPoint(type), stride,
null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
}
@@ -428,7 +428,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
public void glTexCoordPointer(int size, int type, int stride, java.nio.Buffer pointer) {
glTexCoordPointer(
- GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
}
public void glTexCoordPointer(int size, int type, int stride, long pointer_buffer_offset) {
@@ -437,7 +437,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
glTexCoordPointer(
- GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
+ GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride,
null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER) );
}
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
index 5349745ea..187fdb309 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
@@ -59,25 +59,25 @@ import com.jogamp.opengl.util.glsl.ShaderState;
import com.jogamp.opengl.util.glsl.fixedfunc.ShaderSelectionMode;
/**
- *
+ *
*
- * Note: Certain GL FFP state values (e.g.: alphaTestFunc and cullFace)
- * are mapped to a lower number range so they can be stored in low precision storage,
+ * Note: Certain GL FFP state values (e.g.: alphaTestFunc and cullFace)
+ * are mapped to a lower number range so they can be stored in low precision storage,
* i.e. in a 'lowp int' (GL ES2).
*
*/
public class FixedFuncPipeline {
protected static final boolean DEBUG;
-
+
static {
Debug.initSingleton();
DEBUG = Debug.isPropertyDefined("jogl.debug.FixedFuncPipeline", true);
}
-
+
/** The maximum texture units which could be used, depending on {@link ShaderSelectionMode}. */
public static final int MAX_TEXTURE_UNITS = 8;
public static final int MAX_LIGHTS = 8;
-
+
public FixedFuncPipeline(GL2ES2 gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix) {
shaderRootClass = FixedFuncPipeline.class;
shaderSrcRoot = shaderSrcRootDef;
@@ -88,8 +88,8 @@ public class FixedFuncPipeline {
fragmentColorTextureFile = fragmentColorTextureFileDef;
init(gl, mode, pmvMatrix);
}
- public FixedFuncPipeline(GL2ES2 gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix,
- Class> shaderRootClass, String shaderSrcRoot,
+ public FixedFuncPipeline(GL2ES2 gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix,
+ Class> shaderRootClass, String shaderSrcRoot,
String shaderBinRoot,
String vertexColorFile, String vertexColorLightFile,
String fragmentColorFile, String fragmentColorTextureFile) {
@@ -100,9 +100,9 @@ public class FixedFuncPipeline {
this.vertexColorLightFile = vertexColorLightFile;
this.fragmentColorFile = fragmentColorFile;
this.fragmentColorTextureFile = fragmentColorTextureFile;
- init(gl, mode, pmvMatrix);
+ init(gl, mode, pmvMatrix);
}
-
+
public ShaderSelectionMode getShaderSelectionMode() { return requestedShaderSelectionMode; }
public void setShaderSelectionMode(ShaderSelectionMode mode) { requestedShaderSelectionMode=mode; }
public ShaderSelectionMode getCurrentShaderSelectionMode() { return currentShaderSelectionMode; }
@@ -153,21 +153,21 @@ public class FixedFuncPipeline {
colorStatic.put(1, green);
colorStatic.put(2, blue);
colorStatic.put(3, alpha);
-
+
shaderState.useProgram(gl, true);
- final GLUniformData ud = shaderState.getUniform(mgl_ColorStatic);
+ final GLUniformData ud = shaderState.getUniform(mgl_ColorStatic);
if(null!=ud) {
// same data object ..
shaderState.uniform(gl, ud);
} else {
throw new GLException("Failed to update: mgl_ColorStatic");
- }
+ }
}
-
+
//
// Arrays / States
//
-
+
public void glEnableClientState(GL2ES2 gl, int glArrayIndex) {
glToggleClientState(gl, glArrayIndex, true);
}
@@ -202,7 +202,7 @@ public class FixedFuncPipeline {
break;
}
}
-
+
public void glVertexPointer(GL2ES2 gl, GLArrayData data) {
shaderState.useProgram(gl, true);
shaderState.vertexAttribPointer(gl, data);
@@ -217,14 +217,14 @@ public class FixedFuncPipeline {
shaderState.useProgram(gl, true);
shaderState.vertexAttribPointer(gl, data);
}
-
+
//
// MULTI-TEXTURE
//
/** Enables/Disables the named texture unit (if changed), returns previous state */
private boolean glEnableTexture(boolean enable, int unit) {
- final boolean isEnabled = 0 != ( textureEnabledBits & ( 1 << activeTextureUnit ) );
+ final boolean isEnabled = 0 != ( textureEnabledBits & ( 1 << activeTextureUnit ) );
if( isEnabled != enable ) {
if(enable) {
textureEnabledBits |= ( 1 << unit );
@@ -237,7 +237,7 @@ public class FixedFuncPipeline {
}
return isEnabled;
}
-
+
public void glClientActiveTexture(int textureUnit) {
textureUnit -= GL.GL_TEXTURE0;
if(0 <= textureUnit && textureUnit "+toHexString(ifmt));
}
} else {
- System.err.println("FixedFuncPipeline: Unimplemented glTexImage2D: target "+toHexString(target)+", internalformat "+toHexString(internalformat));
+ System.err.println("FixedFuncPipeline: Unimplemented glTexImage2D: target "+toHexString(target)+", internalformat "+toHexString(internalformat));
}
}
/*
public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border,
- int format, int type, long pixels_buffer_offset) {
+ int format, int type, long pixels_buffer_offset) {
textureFormat.put(activeTextureUnit, internalformat);
textureFormatDirty = true;
}*/
-
+
public void glTexEnvi(int target, int pname, int value) {
if(GL2ES1.GL_TEXTURE_ENV == target && GL2ES1.GL_TEXTURE_ENV_MODE == pname) {
final int mode;
@@ -351,7 +351,7 @@ public class FixedFuncPipeline {
if( value != textureEnvMode.get(activeTextureUnit) ) {
textureEnvMode.put(activeTextureUnit, value);
textureEnvModeDirty = true;
- }
+ }
}
public void glGetTexEnviv(int target, int pname, IntBuffer params) { // FIXME
System.err.println("FixedFuncPipeline: Unimplemented glGetTexEnviv: target "+toHexString(target)+", pname "+toHexString(pname));
@@ -359,13 +359,13 @@ public class FixedFuncPipeline {
public void glGetTexEnviv(int target, int pname, int[] params, int params_offset) { // FIXME
System.err.println("FixedFuncPipeline: Unimplemented glGetTexEnviv: target "+toHexString(target)+", pname "+toHexString(pname));
}
-
+
//
// Point Sprites
//
public void glPointSize(float size) {
pointParams.put(0, size);
- pointParamsDirty = true;
+ pointParamsDirty = true;
}
public void glPointParameterf(int pname, float param) {
switch(pname) {
@@ -379,7 +379,7 @@ public class FixedFuncPipeline {
pointParams.put(4+3, param);
break;
}
- pointParamsDirty = true;
+ pointParamsDirty = true;
}
public void glPointParameterfv(int pname, float[] params, int params_offset) {
switch(pname) {
@@ -389,7 +389,7 @@ public class FixedFuncPipeline {
pointParams.put(4+2, params[params_offset + 2]);
break;
}
- pointParamsDirty = true;
+ pointParamsDirty = true;
}
public void glPointParameterfv(int pname, java.nio.FloatBuffer params) {
final int o = params.position();
@@ -400,24 +400,24 @@ public class FixedFuncPipeline {
pointParams.put(4+2, params.get(o + 2));
break;
}
- pointParamsDirty = true;
+ pointParamsDirty = true;
}
// private int[] pointTexObj = new int[] { 0 };
-
+
private void glDrawPoints(GL2ES2 gl, GLRunnable2
*
*/
+ @Override
public final boolean shallLinkGlobal() { return true; }
/**
diff --git a/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java
index a22454d60..f175acf28 100644
--- a/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java
@@ -127,6 +127,7 @@ public class GLOffscreenAutoDrawableImpl extends GLAutoDrawableDelegate implemen
return ((GLFBODrawableImpl)drawable).getFBObject(bufferName);
}
+ @Override
public final FBObject.TextureAttachment getTextureBuffer(int bufferName) {
return ((GLFBODrawableImpl)drawable).getTextureBuffer(bufferName);
}
diff --git a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
index 2238d49bc..6de92f533 100644
--- a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
+++ b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
@@ -52,6 +52,7 @@ public class GLRunnableTask implements GLRunnable {
isFlushed = false;
}
+ @Override
public boolean run(GLAutoDrawable drawable) {
boolean res = true;
if(null == notifyObject) {
diff --git a/src/jogl/classes/jogamp/opengl/GLWorkerThread.java b/src/jogl/classes/jogamp/opengl/GLWorkerThread.java
index 979c6dc0a..100b46a5e 100644
--- a/src/jogl/classes/jogamp/opengl/GLWorkerThread.java
+++ b/src/jogl/classes/jogamp/opengl/GLWorkerThread.java
@@ -222,6 +222,7 @@ public class GLWorkerThread {
protected static String getThreadName() { return Thread.currentThread().getName(); }
static class WorkerRunnable implements Runnable {
+ @Override
public void run() {
// Notify starting thread that we're ready
synchronized (lock) {
diff --git a/src/jogl/classes/jogamp/opengl/MemoryObject.java b/src/jogl/classes/jogamp/opengl/MemoryObject.java
index df793dadd..d10747690 100644
--- a/src/jogl/classes/jogamp/opengl/MemoryObject.java
+++ b/src/jogl/classes/jogamp/opengl/MemoryObject.java
@@ -59,10 +59,12 @@ public class MemoryObject {
/**
* @return the 32bit hash value generated via {@link HashUtil#getAddrSizeHash32_EqualDist(long, long)}.
*/
+ @Override
public int hashCode() {
return hash;
}
+ @Override
public String toString() {
return "MemoryObject[addr 0x"+Long.toHexString(addr)+", size 0x"+Long.toHexString(size)+", hash32: 0x"+Integer.toHexString(hash)+"]";
}
diff --git a/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java b/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java
index eddb36975..283ecdb9d 100644
--- a/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java
+++ b/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java
@@ -252,6 +252,7 @@ public class SharedResourceRunner implements Runnable {
// done
}
+ @Override
public final void run() {
final String threadName = getThreadName();
diff --git a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java
index 6ffe46b36..bf700d970 100644
--- a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java
+++ b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java
@@ -72,6 +72,7 @@ public class ThreadingImpl {
static {
threadingPlugin =
AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public ToolkitThreadingPlugin run() {
final String singleThreadProp;
{
diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
index cd1bb45c9..72c9ac54b 100644
--- a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
+++ b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
@@ -54,10 +54,12 @@ public class AWTThreadingPlugin implements ToolkitThreadingPlugin {
public AWTThreadingPlugin() {}
+ @Override
public final boolean isToolkitThread() throws GLException {
return EventQueue.isDispatchThread();
}
+ @Override
public final boolean isOpenGLThread() throws GLException {
switch (ThreadingImpl.getMode()) {
case ST_AWT:
@@ -83,6 +85,7 @@ public class AWTThreadingPlugin implements ToolkitThreadingPlugin {
}
}
+ @Override
public final void invokeOnOpenGLThread(boolean wait, Runnable r) throws GLException {
switch (ThreadingImpl.getMode()) {
case ST_AWT:
diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java
index 5faee1307..ff07b04d0 100644
--- a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java
+++ b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java
@@ -147,6 +147,7 @@ public class AWTTilePainter {
this.flipVertical = true;
}
+ @Override
public String toString() { return renderer.toString(); }
public void setIsGLOriented(boolean v) {
diff --git a/src/jogl/classes/jogamp/opengl/awt/Java2D.java b/src/jogl/classes/jogamp/opengl/awt/Java2D.java
index 7a8ddf0b4..886cd9368 100644
--- a/src/jogl/classes/jogamp/opengl/awt/Java2D.java
+++ b/src/jogl/classes/jogamp/opengl/awt/Java2D.java
@@ -116,6 +116,7 @@ public class Java2D {
static {
AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Object run() {
if (DEBUG) {
System.err.println("Checking for Java2D/OpenGL support");
@@ -565,6 +566,7 @@ public class Java2D {
private static int getOGLUtilitiesIntField(final String name) {
Integer i = AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Integer run() {
try {
Class> utils = Class.forName("sun.java2d.opengl.OGLUtilities");
@@ -608,6 +610,7 @@ public class Java2D {
System.err.println("Starting initialization of J2D FBO share context");
}
invokeWithOGLSharedContextCurrent(device.getDefaultConfiguration(), new Runnable() {
+ @Override
public void run() {
j2dFBOShareContext = GLDrawableFactory.getFactory(GLProfile.getDefault(GLProfile.getDefaultDevice())).createExternalGLContext();
}
diff --git a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
index a29d1e6aa..9173a38cb 100644
--- a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
+++ b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
@@ -54,6 +54,7 @@ public class VersionApplet extends Applet {
this.f = f;
this.va = va;
}
+ @Override
public void windowClosing(WindowEvent ev) {
f.setVisible(false);
va.stop();
@@ -129,24 +130,28 @@ public class VersionApplet extends Applet {
}
}
+ @Override
public void init() {
System.err.println("VersionApplet: init() - begin");
my_init();
System.err.println("VersionApplet: init() - end");
}
+ @Override
public void start() {
System.err.println("VersionApplet: start() - begin");
canvas.setVisible(true);
System.err.println("VersionApplet: start() - end");
}
+ @Override
public void stop() {
System.err.println("VersionApplet: stop() - begin");
canvas.setVisible(false);
System.err.println("VersionApplet: stop() - end");
}
+ @Override
public void destroy() {
System.err.println("VersionApplet: destroy() - start");
my_release();
@@ -154,6 +159,7 @@ public class VersionApplet extends Applet {
}
class GLInfo implements GLEventListener {
+ @Override
public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
String s = JoglVersion.getGLInfo(gl, null).toString();
@@ -161,12 +167,15 @@ public class VersionApplet extends Applet {
tareaVersion.append(s);
}
+ @Override
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
}
+ @Override
public void display(GLAutoDrawable drawable) {
}
+ @Override
public void dispose(GLAutoDrawable drawable) {
}
}
diff --git a/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java
index 1179e2b7f..7b85c3e75 100644
--- a/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java
@@ -47,20 +47,24 @@ public final class DesktopES2DynamicLibraryBundleInfo extends GLDynamicLibraryBu
super();
}
+ @Override
public final List getToolGetProcAddressFuncNameList() {
List res = new ArrayList();
res.add("eglGetProcAddress");
return res;
}
+ @Override
public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) {
return EGL.eglGetProcAddress(toolGetProcAddressHandle, funcName);
}
+ @Override
public final boolean useToolGetProcAdressFirst(String funcName) {
return true;
}
+ @Override
public final List> getToolLibNames() {
final List> libsList = new ArrayList>();
final List libsGL = new ArrayList();
@@ -90,6 +94,7 @@ public final class DesktopES2DynamicLibraryBundleInfo extends GLDynamicLibraryBu
return libsList;
}
+ @Override
public final List getGlueLibNames() {
return glueLibNames;
}
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
index 89f34432d..3d864ad76 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
@@ -65,6 +65,7 @@ public class EGLDisplayUtil {
this.createdStack = DEBUG ? new Throwable() : null;
}
+ @Override
public String toString() {
return "EGLDisplay[0x"+Long.toHexString(eglDisplay)+": refCnt "+refCount+"]";
}
@@ -248,9 +249,11 @@ public class EGLDisplayUtil {
}
public static final EGLGraphicsDevice.EGLDisplayLifecycleCallback eglLifecycleCallback = new EGLGraphicsDevice.EGLDisplayLifecycleCallback() {
+ @Override
public long eglGetAndInitDisplay(long[] nativeDisplayID) {
return eglGetDisplayAndInitialize(nativeDisplayID);
}
+ @Override
public void eglTerminate(long eglDisplayHandle) {
EGLDisplayUtil.eglTerminate(eglDisplayHandle);
}
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
index bf269c548..ab28fb3fb 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
@@ -115,6 +115,7 @@ public abstract class EGLDrawable extends GLDrawableImpl {
}
}
+ @Override
protected void destroyHandle() {
final EGLWrappedSurface eglws = (EGLWrappedSurface) surface;
if(DEBUG) {
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
index 9ffcea864..361ec26ff 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
@@ -35,6 +35,7 @@ public final class EGLES1DynamicLibraryBundleInfo extends EGLDynamicLibraryBundl
super();
}
+ @Override
public final List> getToolLibNames() {
final List> libsList = new ArrayList>();
{
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
index de1f0a42e..74738463f 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
@@ -40,6 +40,7 @@ public final class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundl
super();
}
+ @Override
public final List> getToolLibNames() {
final List> libsList = new ArrayList>();
{
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 5764a6178..31fa14fbb 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -115,6 +115,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
private EGLGraphicsConfigurationFactory() {
}
+ @Override
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl (
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
index 5083c854f..dac058dc7 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
@@ -44,6 +44,7 @@ public class EGLUpstreamSurfaceHook implements UpstreamSurfaceHook.MutableSize {
static String getThreadName() { return Thread.currentThread().getName(); }
+ @Override
public final void setSize(int width, int height) {
if(null != upstreamSurfaceHookMutableSize) {
upstreamSurfaceHookMutableSize.setSize(width, height);
diff --git a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
index b4383c2e6..717b1255c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
+++ b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
@@ -164,6 +164,7 @@ public class GLUquadricImpl implements GLUquadric {
replaceImmModeSink();
}
+ @Override
public void enableImmModeSink(boolean val) {
if(gl.isGL2()) {
immModeSinkEnabled=val;
@@ -175,10 +176,12 @@ public class GLUquadricImpl implements GLUquadric {
}
}
+ @Override
public boolean isImmModeSinkEnabled() {
return immModeSinkEnabled;
}
+ @Override
public void setImmMode(boolean val) {
if(immModeSinkEnabled) {
immModeSinkImmediate=val;
@@ -187,10 +190,12 @@ public class GLUquadricImpl implements GLUquadric {
}
}
+ @Override
public boolean getImmMode() {
return immModeSinkImmediate;
}
+ @Override
public ImmModeSink replaceImmModeSink() {
if(!immModeSinkEnabled) return null;
@@ -222,6 +227,7 @@ public class GLUquadricImpl implements GLUquadric {
return res;
}
+ @Override
public void resetImmModeSink(GL gl) {
if(immModeSinkEnabled) {
immModeSink.reset(gl);
diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java
index f57c2310f..4213dfd46 100644
--- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java
+++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java
@@ -92,6 +92,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
/**
* Pushes eval bit
*/
+ @Override
public void bgnmap1f() {
// DONE
if (output_triangles) {
@@ -108,6 +109,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
/**
* Pops all OpenGL attributes
*/
+ @Override
public void endmap1f() {
// DONE
if (output_triangles) {
@@ -127,6 +129,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
* @param order curve order
* @param ps control points
*/
+ @Override
public void map1f(int type, float ulo, float uhi, int stride, int order,
CArrayOfFloats ps) {
if (output_triangles) {
@@ -153,6 +156,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
* Calls opengl enable
* @param type what to enable
*/
+ @Override
public void enable(int type) {
// DONE
gl.glEnable(type);
@@ -164,6 +168,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
* @param u1 low u
* @param u2 high u
*/
+ @Override
public void mapgrid1f(int nu, float u1, float u2) {
if (output_triangles) {
// System.out.println("TODO curveevaluator.mapgrid1f");
@@ -179,6 +184,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
* @param from lowest param
* @param to highest param
*/
+ @Override
public void mapmesh1f(int style, int from, int to) {
/* //DEBUG drawing control points
this.poradi++;
diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
index 155c4f9a9..e9c9fca3f 100644
--- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
+++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
@@ -72,6 +72,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
/**
* Pushes eval bit
*/
+ @Override
public void bgnmap2f() {
if (output_triangles) {
@@ -88,6 +89,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
* Sets glPolygonMode
* @param style polygon mode (N_MESHFILL/N_MESHLINE/N_MESHPOINT)
*/
+ @Override
public void polymode(int style) {
if (!output_triangles) {
switch (style) {
@@ -109,6 +111,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
/**
* Pops all attributes
*/
+ @Override
public void endmap2f() {
// TODO Auto-generated method stub
if (output_triangles) {
@@ -126,6 +129,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
* @param vlo
* @param vhi
*/
+ @Override
public void domain2f(float ulo, float uhi, float vlo, float vhi) {
// DONE
}
@@ -139,6 +143,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
* @param v0 lowest v
* @param v1 highest v
*/
+ @Override
public void mapgrid2f(int nu, float u0, float u1, int nv, float v0, float v1) {
if (output_triangles) {
@@ -157,6 +162,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
* @param vmin minimum V
* @param vmax maximum V
*/
+ @Override
public void mapmesh2f(int style, int umin, int umax, int vmin, int vmax) {
if (output_triangles) {
// System.out.println("TODO openglsurfaceavaluator.mapmesh2f output_triangles");
@@ -195,6 +201,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
* @param vorder surface order in v direction
* @param pts control points
*/
+ @Override
public void map2f(int type, float ulo, float uhi, int ustride, int uorder,
float vlo, float vhi, int vstride, int vorder, CArrayOfFloats pts) {
// TODO Auto-generated method stub
@@ -210,6 +217,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
* Calls opengl enable
* @param type what to enable
*/
+ @Override
public void enable(int type) {
//DONE
gl.glEnable(type);
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java
index 5269024b4..0c155ff96 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java
@@ -56,6 +56,7 @@ public class Extract1010102 implements Extract {
public Extract1010102() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
long uint = 0;
@@ -76,6 +77,7 @@ public class Extract1010102 implements Extract {
extractComponents[3] = (float)( ( uint & 0x00000003 ) ) / 3.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11110000,00000000 == 0xF000
// 00001111,00000000 == 0x0F00
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java
index 6982931d3..5208ea537 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java
@@ -56,6 +56,7 @@ public class Extract1555rev implements Extract {
public Extract1555rev() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
int ushort = 0;
@@ -76,6 +77,7 @@ public class Extract1555rev implements Extract {
extractComponents[3] = (float)( ( ushort & 0x8000 ) >> 15);
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 00000000,00011111 == 0x001F
// 00000011,11100000 == 0x03E0
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java
index 1c7db6218..1bf8abcc3 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java
@@ -56,6 +56,7 @@ public class Extract2101010rev implements Extract {
public Extract2101010rev() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
long uint = 0;
@@ -76,6 +77,7 @@ public class Extract2101010rev implements Extract {
extractComponents[3] = (float)( ( uint & 0xC0000000 ) >> 30 ) / 3.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11110000,00000000 == 0xF000
// 00001111,00000000 == 0x0F00
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java
index 672c86c32..c86b39e63 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java
@@ -56,6 +56,7 @@ public class Extract233rev implements Extract {
public Extract233rev() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
// 11100000 == 0xe0
// 00011100 == 0x1c
@@ -66,6 +67,7 @@ public class Extract233rev implements Extract {
extractComponents[2] = (float)((ubyte & 0xC0) >> 6) / 3.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11100000 == 0xE0
// 00011100 == 0x1C
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java
index 6cdbc5cb0..706f0c3f2 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java
@@ -56,6 +56,7 @@ public class Extract332 implements Extract {
public Extract332() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
// 11100000 == 0xe0
// 00011100 == 0x1c
@@ -66,6 +67,7 @@ public class Extract332 implements Extract {
extractComponents[2] = (float)((ubyte & 0x03)) / 3.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11100000 == 0xE0
// 00011100 == 0x1C
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java
index b36b9fb82..182d66ce2 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java
@@ -56,6 +56,7 @@ public class Extract4444 implements Extract {
public Extract4444() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
int ushort = 0;
@@ -76,6 +77,7 @@ public class Extract4444 implements Extract {
extractComponents[3] = (float)( ( ushort & 0x000F ) ) / 15.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11110000,00000000 == 0xF000
// 00001111,00000000 == 0x0F00
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java
index b7a3ed55f..52ecdc17c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java
@@ -56,6 +56,7 @@ public class Extract4444rev implements Extract {
public Extract4444rev() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
int ushort = 0;
@@ -76,6 +77,7 @@ public class Extract4444rev implements Extract {
extractComponents[3] = (float)( ( ushort & 0xF000 ) >> 12 ) / 15.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11110000,00000000 == 0xF000
// 00001111,00000000 == 0x0F00
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java
index 4dc566b25..21f53aa1d 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java
@@ -56,6 +56,7 @@ public class Extract5551 implements Extract {
public Extract5551() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
int ushort = 0;
@@ -76,6 +77,7 @@ public class Extract5551 implements Extract {
extractComponents[3] = (float)( ( ushort & 0xF000 ) );
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11110000,00000000 == 0xF000
// 00001111,00000000 == 0x0F00
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java
index e198e46d4..7408c45b2 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java
@@ -56,6 +56,7 @@ public class Extract565 implements Extract {
public Extract565() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
int ushort = 0;
@@ -74,6 +75,7 @@ public class Extract565 implements Extract {
extractComponents[2] = (float)( ( ushort & 0x001F ) ) / 31.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11111000,00000000 == 0xF800
// 00000111,11100000 == 0x07E0
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java
index fe19540ee..adaafa7ea 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java
@@ -56,6 +56,7 @@ public class Extract565rev implements Extract {
public Extract565rev() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
int ushort = 0;
@@ -74,6 +75,7 @@ public class Extract565rev implements Extract {
extractComponents[2] = (float)( ( ushort & 0xF800 ) >> 11 ) / 31.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 00000000,00111111 == 0x001F
// 00000111,11100000 == 0x07E0
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java
index 4602f2af9..be155d578 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java
@@ -56,6 +56,7 @@ public class Extract8888 implements Extract {
public Extract8888() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
long uint = 0;
@@ -76,6 +77,7 @@ public class Extract8888 implements Extract {
extractComponents[3] = (float)( ( uint & 0x000000FF ) ) / 255.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11110000,00000000 == 0xF000
// 00001111,00000000 == 0x0F00
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java
index 373cb102a..294e60e12 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java
@@ -56,6 +56,7 @@ public class Extract8888rev implements Extract {
public Extract8888rev() {
}
+ @Override
public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) {
long uint = 0;
@@ -76,6 +77,7 @@ public class Extract8888rev implements Extract {
extractComponents[3] = (float)( ( uint & 0xFF000000 ) >> 24 ) / 255.0f;
}
+ @Override
public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) {
// 11110000,00000000 == 0xF000
// 00001111,00000000 == 0x0F00
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java
index ac0f2f290..1dd8bff8a 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java
@@ -56,6 +56,7 @@ public class ExtractFloat implements ExtractPrimitive {
public ExtractFloat() {
}
+ @Override
public double extract( boolean isSwap, ByteBuffer data ) {
float f = 0;
if( isSwap ) {
@@ -67,6 +68,7 @@ public class ExtractFloat implements ExtractPrimitive {
return( f );
}
+ @Override
public void shove( double value, int index, ByteBuffer data ) {
assert(0.0 <= value && value < 1.0);
data.asFloatBuffer().put( index, (float)value );
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java
index 399386e30..dcbe52a40 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java
@@ -56,12 +56,14 @@ public class ExtractSByte implements ExtractPrimitive {
public ExtractSByte() {
}
+ @Override
public double extract( boolean isSwap, ByteBuffer sbyte ) {
byte b = sbyte.get();
assert( b <= 127 );
return( b );
}
+ @Override
public void shove( double value, int index, ByteBuffer data ) {
data.position( index );
data.put( (byte)value );
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java
index be3fb3092..547bd944a 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java
@@ -56,6 +56,7 @@ public class ExtractSInt implements ExtractPrimitive {
public ExtractSInt() {
}
+ @Override
public double extract( boolean isSwap, ByteBuffer uint ) {
int i = 0;
if( isSwap ) {
@@ -67,6 +68,7 @@ public class ExtractSInt implements ExtractPrimitive {
return( i );
}
+ @Override
public void shove( double value, int index, ByteBuffer data ) {
assert(0.0 <= value && value < Integer.MAX_VALUE);
IntBuffer ib = data.asIntBuffer();
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java
index 1e123c9b4..7dc172976 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java
@@ -56,6 +56,7 @@ public class ExtractSShort implements ExtractPrimitive {
public ExtractSShort() {
}
+ @Override
public double extract( boolean isSwap, ByteBuffer ushort ) {
short s = 0;
if( isSwap ) {
@@ -67,6 +68,7 @@ public class ExtractSShort implements ExtractPrimitive {
return( s );
}
+ @Override
public void shove( double value, int index, ByteBuffer data ) {
assert(0.0 <= value && value < 32768.0);
ShortBuffer sb = data.asShortBuffer();
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java
index 26ca5cd40..3e933811c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java
@@ -56,12 +56,14 @@ public class ExtractUByte implements ExtractPrimitive {
public ExtractUByte() {
}
+ @Override
public double extract( boolean isSwap, ByteBuffer ubyte ) {
int i = 0x000000FF & ubyte.get();
assert( i <= 255 );
return( i );
}
+ @Override
public void shove( double value, int index, ByteBuffer data ) {
assert(0.0 <= value && value < 256.0);
data.position( index );
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java
index 8c94c89fc..1c34828b3 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java
@@ -56,6 +56,7 @@ public class ExtractUInt implements ExtractPrimitive {
public ExtractUInt() {
}
+ @Override
public double extract( boolean isSwap, ByteBuffer uint ) {
long i = 0;
if( isSwap ) {
@@ -67,6 +68,7 @@ public class ExtractUInt implements ExtractPrimitive {
return( i );
}
+ @Override
public void shove( double value, int index, ByteBuffer data ) {
assert(0.0 <= value && value < 0xFFFFFFFF);
IntBuffer ib = data.asIntBuffer();
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java
index 55115c6f7..8e0d25c42 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java
@@ -56,6 +56,7 @@ public class ExtractUShort implements ExtractPrimitive {
public ExtractUShort() {
}
+ @Override
public double extract( boolean isSwap, ByteBuffer ushort ) {
int i = 0;
if( isSwap ) {
@@ -67,6 +68,7 @@ public class ExtractUShort implements ExtractPrimitive {
return( i );
}
+ @Override
public void shove( double value, int index, ByteBuffer data ) {
assert(0.0 <= value && value < 65536.0);
ShortBuffer sb = data.asShortBuffer();
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java
index 474056cc3..1ac0fd438 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java
@@ -81,6 +81,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqHeapDeletePriorityQ */
+ @Override
void pqDeletePriorityQ() {
handles = null;
nodes = null;
@@ -137,6 +138,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqHeapInit */
+ @Override
boolean pqInit() {
int i;
@@ -152,6 +154,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
/* really __gl_pqHeapInsert */
/* returns LONG_MAX iff out of memory */
+ @Override
int pqInsert(Object keyNew) {
int curr;
int free;
@@ -207,6 +210,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqHeapExtractMin */
+ @Override
Object pqExtractMin() {
jogamp.opengl.glu.tessellator.PriorityQ.PQnode[] n = nodes;
jogamp.opengl.glu.tessellator.PriorityQ.PQhandleElem[] h = handles;
@@ -229,6 +233,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqHeapDelete */
+ @Override
void pqDelete(int hCurr) {
jogamp.opengl.glu.tessellator.PriorityQ.PQnode[] n = nodes;
jogamp.opengl.glu.tessellator.PriorityQ.PQhandleElem[] h = handles;
@@ -252,10 +257,12 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
freeList = hCurr;
}
+ @Override
Object pqMinimum() {
return handles[nodes[1].handle].key;
}
+ @Override
boolean pqIsEmpty() {
return size == 0;
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java
index f9e0225e3..cf54b15c3 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java
@@ -71,6 +71,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqSortDeletePriorityQ */
+ @Override
void pqDeletePriorityQ() {
if (heap != null) heap.pqDeletePriorityQ();
order = null;
@@ -100,6 +101,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqSortInit */
+ @Override
boolean pqInit() {
int p, r, i, j;
int piv;
@@ -191,6 +193,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
/* really __gl_pqSortInsert */
/* returns LONG_MAX iff out of memory */
+ @Override
int pqInsert(Object keyNew) {
int curr;
@@ -220,6 +223,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqSortExtractMin */
+ @Override
Object pqExtractMin() {
Object sortMin, heapMin;
@@ -240,6 +244,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqSortMinimum */
+ @Override
Object pqMinimum() {
Object sortMin, heapMin;
@@ -257,11 +262,13 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
}
/* really __gl_pqSortIsEmpty */
+ @Override
boolean pqIsEmpty() {
return (size == 0) && heap.pqIsEmpty();
}
/* really __gl_pqSortDelete */
+ @Override
void pqDelete(int curr) {
if (curr >= 0) {
heap.pqDelete(curr);
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
index 1801e1c59..a2e973508 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
@@ -279,6 +279,7 @@ class Render {
}
private static class RenderTriangle implements renderCallBack {
+ @Override
public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
/* Just add the triangle to a triangle list, so we can render all
* the separate triangles at once.
@@ -323,6 +324,7 @@ class Render {
}
private static class RenderFan implements renderCallBack {
+ @Override
public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
/* Render as many CCW triangles as possible in a fan starting from
* edge "e". The fan *should* contain exactly "size" triangles
@@ -345,6 +347,7 @@ class Render {
}
private static class RenderStrip implements renderCallBack {
+ @Override
public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
/* Render as many CCW triangles as possible in a strip starting from
* edge "e". The strip *should* contain exactly "size" triangles
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
index b4a400c1c..364a7f198 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
@@ -1150,6 +1150,7 @@ class Sweep {
*/ {
/* __gl_dictListNewDict */
tess.dict = Dict.dictNewDict(tess, new Dict.DictLeq() {
+ @Override
public boolean leq(Object frame, Object key1, Object key2) {
return EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2);
}
@@ -1231,6 +1232,7 @@ class Sweep {
/* __gl_pqSortNewPriorityQ */
pq = tess.pq = PriorityQ.pqNewPriorityQ(new PriorityQ.Leq() {
+ @Override
public boolean leq(Object key1, Object key2) {
return Geom.VertLeq(((GLUvertex) key1), (GLUvertex) key2);
}
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 5cc4003fe..03aae3f78 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -822,6 +822,7 @@ public class MacOSXCGLContext extends GLContextImpl
texID = fbod.getTextureBuffer(GL.GL_FRONT).getName();
pbufferHandle = 0;
fbod.setSwapBufferContext(new GLFBODrawableImpl.SwapBufferContext() {
+ @Override
public void swapBuffers(boolean doubleBuffered) {
MacOSXCGLContext.NSOpenGLImpl.this.swapBuffers();
} } ) ;
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
index 6f86e840b..994eee8d7 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -229,6 +229,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
}
}
+ @Override
protected final SharedResource getOrCreateSharedResourceImpl(AbstractGraphicsDevice adevice) {
final String connection = adevice.getConnection();
SharedResource sr;
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
index 535c4d2d3..13e249a58 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
@@ -59,6 +59,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration
super(screen, capsChosen, capsRequested);
}
+ @Override
public Object clone() {
return super.clone();
}
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
index e761be7b7..db2a1df68 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
@@ -59,6 +59,7 @@ public class MacOSXCGLGraphicsConfigurationFactory extends GLGraphicsConfigurati
private MacOSXCGLGraphicsConfigurationFactory() {
}
+ @Override
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java
index c08259665..21923531f 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java
@@ -63,6 +63,7 @@ public class MacOSXAWTCGLGraphicsConfigurationFactory extends GLGraphicsConfigur
private MacOSXAWTCGLGraphicsConfigurationFactory() {
}
+ @Override
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
index 5f9b25530..0d4452864 100644
--- a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
+++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
@@ -46,12 +46,14 @@ public class GLArrayHandlerInterleaved extends GLVBOArrayHandler implements GLAr
super(ad);
}
+ @Override
public final void setSubArrayVBOName(int vboName) {
for(int i=0; i() {
+ @Override
public DynamicLibraryBundle run() {
return new DynamicLibraryBundle(new FFMPEGDynamicLibraryBundleInfo());
} } );
@@ -272,6 +273,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
// lookup
AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Object run() {
for(int i = 0; i() {
+ @Override
public Object run() {
final ProcAddressTable pt = ctx.getGLProcAddressTable();
final long procAddrGLTexSubImage2D = pt.getAddressFor("glTexSubImage2D");
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
index 2d74fa532..3b443fdd0 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
@@ -50,14 +50,17 @@ public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandle
super(ad);
}
+ @Override
public final void setSubArrayVBOName(int vboName) {
throw new UnsupportedOperationException();
}
+ @Override
public final void addSubHandler(GLArrayHandlerFlat handler) {
throw new UnsupportedOperationException();
}
+ @Override
public final void enableState(GL gl, boolean enable, Object ext) {
final GL2ES2 glsl = gl.getGL2ES2();
if( null != ext ) {
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
index a5f78b5d6..34a381d7d 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
@@ -47,10 +47,12 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat {
this.ad = ad;
}
+ @Override
public GLArrayDataWrapper getData() {
return ad;
}
+ @Override
public final void syncData(GL gl, Object ext) {
final GL2ES2 glsl = gl.getGL2ES2();
if( null != ext ) {
@@ -77,6 +79,7 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat {
}*/
}
+ @Override
public final void enableState(GL gl, boolean enable, Object ext) {
final GL2ES2 glsl = gl.getGL2ES2();
if( null != ext ) {
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java
index bcc146d78..b175bb5dc 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java
@@ -50,12 +50,14 @@ public class GLSLArrayHandlerInterleaved extends GLVBOArrayHandler implements GL
super(ad);
}
+ @Override
public final void setSubArrayVBOName(int vboName) {
for(int i=0; i 0) {
eobrun--;
@@ -1288,6 +1299,7 @@ public class JPEGDecoder {
}
}
class ACSuccessiveDecoder implements DecoderFunction {
+ @Override
public void decode(ComponentIn component, int[] zz) throws IOException {
int k = spectralStart, e = spectralEnd, r = 0;
while (k <= e) {
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java
index 906ce6373..e6afd8694 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java
@@ -315,6 +315,7 @@ public class ImageLine {
/**
* Basic info
*/
+ @Override
public String toString() {
return "row=" + rown + " cols=" + imgInfo.cols + " bpc=" + imgInfo.bitDepth + " size=" + scanline.length;
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java
index 438a69984..4636c3955 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java
@@ -92,6 +92,7 @@ public class ImageLineHelper {
public double[] maxdif = { BIG_VALUE_NEG, BIG_VALUE_NEG, BIG_VALUE_NEG, BIG_VALUE }; // maxima
public final int channels; // diferencia
+ @Override
public String toString() {
return channels == 3 ? String.format(
"prom=%.1f (%.1f %.1f %.1f) max=%.1f (%.1f %.1f %.1f) min=%.1f (%.1f %.1f %.1f)", promlum, prom[0],
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java b/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java
index 1f598a5de..9e64c3eb1 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java
@@ -186,6 +186,7 @@ public class PngHelperInternal {
}
private static final ThreadLocal crcProvider = new ThreadLocal() {
+ @Override
protected CRC32 initialValue() {
return new CRC32();
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java b/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java
index 73442e0bb..0412beb8c 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java
@@ -994,6 +994,7 @@ public class PngReader {
/**
* Basic info, for debugging.
*/
+ @Override
public String toString() { // basic info
return "filename=" + filename + " " + imgInfo.toString();
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java
index 82abb902d..4e8bf5635 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java
@@ -47,12 +47,14 @@ public class ChunkHelper {
public static final String zTXt = "zTXt";
private static final ThreadLocal inflaterProvider = new ThreadLocal() {
+ @Override
protected Inflater initialValue() {
return new Inflater();
}
};
private static final ThreadLocal deflaterProvider = new ThreadLocal() {
+ @Override
protected Deflater initialValue() {
return new Deflater();
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java
index 3aba26cca..dcb1958df 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java
@@ -108,6 +108,7 @@ public class ChunkRaw {
return new ByteArrayInputStream(data);
}
+ @Override
public String toString() {
return "chunkid=" + ChunkHelper.toString(idbytes) + " len=" + len;
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java
index 3e0d03051..75107d761 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java
@@ -59,12 +59,14 @@ public class ChunksList {
protected static List getXById(final List list, final String id, final String innerid) {
if (innerid == null)
return ChunkHelper.filterList(list, new ChunkPredicate() {
+ @Override
public boolean match(PngChunk c) {
return c.id.equals(id);
}
});
else
return ChunkHelper.filterList(list, new ChunkPredicate() {
+ @Override
public boolean match(PngChunk c) {
if (!c.id.equals(id))
return false;
@@ -152,12 +154,14 @@ public class ChunksList {
*/
public List getEquivalent(final PngChunk c2) {
return ChunkHelper.filterList(chunks, new ChunkPredicate() {
+ @Override
public boolean match(PngChunk c) {
return ChunkHelper.equivalent(c, c2);
}
});
}
+ @Override
public String toString() {
return "ChunkList: read: " + chunks.size();
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java
index 3b84ab800..c502e9071 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java
@@ -149,6 +149,7 @@ public class ChunksListForWrite extends ChunksList {
return queuedChunks;
}
+ @Override
public String toString() {
return "ChunkList: written: " + chunks.size() + " queue: " + queuedChunks.size();
}
@@ -156,6 +157,7 @@ public class ChunksListForWrite extends ChunksList {
/**
* for debugging
*/
+ @Override
public String toStringFull() {
StringBuilder sb = new StringBuilder(toString());
sb.append("\n Written:\n");
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java
index 5247169e0..7df5ba021 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java
@@ -12,6 +12,7 @@ public abstract class PngChunkSingle extends PngChunk {
super(id, imgInfo);
}
+ @Override
public final boolean allowsMultiple() {
return false;
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java
index fa3649613..139603448 100644
--- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java
+++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java
@@ -41,6 +41,7 @@ public class PngMetadata {
throw new PngjException("cannot set chunk : readonly metadata");
if (lazyOverwrite) {
ChunkHelper.trimList(cl.getQueuedChunks(), new ChunkPredicate() {
+ @Override
public boolean match(PngChunk c2) {
return ChunkHelper.equivalent(c, c2);
}
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index 203af110c..95485b033 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -92,6 +92,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
synchronized(WindowsWGLDrawableFactory.class) {
if( null == windowsWGLDynamicLookupHelper ) {
windowsWGLDynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public DesktopGLDynamicLookupHelper run() {
DesktopGLDynamicLookupHelper tmp;
try {
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index cb445f005..5f2b0c227 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -119,6 +119,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
return cfg;
}
+ @Override
public Object clone() {
return super.clone();
}
@@ -715,6 +716,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
return createPixelFormatDescriptor(0, 0);
}
+ @Override
public String toString() {
return "WindowsWGLGraphicsConfiguration["+getScreen()+", pfdID " + getPixelFormatID() + ", ARB-Choosen " + isChoosenByARB() +
",\n\trequested " + getRequestedCapabilities() +
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index 9e917a0eb..961295208 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -79,6 +79,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
private WindowsWGLGraphicsConfigurationFactory() {
}
+ @Override
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
index ddfcbb55b..96bd0bdd0 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
@@ -68,6 +68,7 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GLGraphicsConfigu
private WindowsAWTWGLGraphicsConfigurationFactory() {
}
+ @Override
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
index 3f0841b6c..78e549508 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
@@ -95,6 +95,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
synchronized(X11GLXDrawableFactory.class) {
if( null == x11GLXDynamicLookupHelper ) {
x11GLXDynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public DesktopGLDynamicLookupHelper run() {
DesktopGLDynamicLookupHelper tmp;
try {
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
index 5aea33f21..4d1ed3985 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
@@ -69,6 +69,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
this.chooser=chooser;
}
+ @Override
public Object clone() {
return super.clone();
}
@@ -478,6 +479,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
return tmp.get(tmp.position());
}
+ @Override
public String toString() {
return "X11GLXGraphicsConfiguration["+getScreen()+", visualID " + toHexString(getXVisualID()) + ", fbConfigID " + toHexString(getFBConfigID()) +
",\n\trequested " + getRequestedCapabilities()+
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index abe310a3f..6050dabbb 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -92,6 +92,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
private X11GLXGraphicsConfigurationFactory() {
}
+ @Override
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
if (!(absScreen instanceof X11GraphicsScreen)) {
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
index 15f3355d0..aa9b876dd 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
@@ -109,6 +109,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
}
// open access to superclass method
+ @Override
public void setChosenCapabilities(CapabilitiesImmutable capsChosen) {
super.setChosenCapabilities(capsChosen);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
index d3cf5bff6..83d6efa75 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
@@ -87,6 +87,7 @@ public class AWTGraphicsScreen extends DefaultGraphicsScreen implements Cloneabl
return new AWTGraphicsScreen(AWTGraphicsDevice.createDefault());
}
+ @Override
public Object clone() {
return super.clone();
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
index e350aaff4..27275c6e0 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
@@ -119,6 +119,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol {
* otherwise return the AWT/Swing close operation value translated to
* a {@link WindowClosingProtocol} value .
*/
+ @Override
public final WindowClosingMode getDefaultCloseOperation() {
synchronized(closingListenerLock) {
if(defaultCloseOperationSetByUser) {
@@ -129,6 +130,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol {
return AWTMisc.getNWClosingOperation(comp);
}
+ @Override
public final WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
synchronized(closingListenerLock) {
final WindowClosingMode _op = defaultCloseOperation;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
index e4d3884a7..c02fc0a04 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
@@ -247,6 +247,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #setElem(int, int)
* @see #setElem(int, int, int)
*/
+ @Override
public int getElem(int i) {
return data.get(i+offset);
}
@@ -260,6 +261,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #setElem(int, int)
* @see #setElem(int, int, int)
*/
+ @Override
public int getElem(int bank, int i) {
return bankdata[bank].get(i+offsets[bank]);
}
@@ -273,6 +275,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #getElem(int)
* @see #getElem(int, int)
*/
+ @Override
public void setElem(int i, int val) {
data.put(i+offset, val);
}
@@ -286,6 +289,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #getElem(int)
* @see #getElem(int, int)
*/
+ @Override
public void setElem(int bank, int i, int val) {
bankdata[bank].put(i+offsets[bank], val);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
index 89df7f853..99ca006fa 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
@@ -43,6 +43,7 @@ public class MacOSXGraphicsDevice extends DefaultGraphicsDevice implements Clone
super(NativeWindowFactory.TYPE_MACOSX, AbstractGraphicsDevice.DEFAULT_CONNECTION, unitID);
}
+ @Override
public Object clone() {
return super.clone();
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
index 6057f6700..361d61c65 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
@@ -122,6 +122,7 @@ public class SWTAccessor {
static {
AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Object run() {
NativeWindowFactory.initSingleton(); // last resort ..
return null;
@@ -360,6 +361,7 @@ public class SWTAccessor {
if(null != OS_gtk_class) {
invoke(true, new Runnable() {
+ @Override
public void run() {
if(realize) {
callStaticMethodL2V(OS_gtk_widget_realize, handle);
@@ -434,6 +436,7 @@ public class SWTAccessor {
public static long newGC(final Control swtControl, final GCData gcData) {
final Object[] o = new Object[1];
invoke(true, new Runnable() {
+ @Override
public void run() {
o[0] = ReflectionUtil.callMethod(swtControl, swt_control_internal_new_GC, new Object[] { gcData });
}
@@ -447,6 +450,7 @@ public class SWTAccessor {
public static void disposeGC(final Control swtControl, final long gc, final GCData gcData) {
invoke(true, new Runnable() {
+ @Override
public void run() {
if(swt_uses_long_handles) {
ReflectionUtil.callMethod(swtControl, swt_control_internal_dispose_GC, new Object[] { new Long(gc), gcData });
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java
index 7468d254b..643982715 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java
@@ -47,6 +47,7 @@ public class WindowsGraphicsDevice extends DefaultGraphicsDevice implements Clon
super(NativeWindowFactory.TYPE_WINDOWS, connection, unitID);
}
+ @Override
public Object clone() {
return super.clone();
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
index 8aac7095a..700937829 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
@@ -63,6 +63,7 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl
return X11Lib.DefaultVisualID(getDevice().getHandle(), getIndex());
}
+ @Override
public Object clone() {
return super.clone();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
index 6095db052..77cbe2995 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
@@ -76,6 +76,7 @@ public class DefaultCapabilitiesChooser implements CapabilitiesChooser {
private final static int NO_SCORE = -9999999;
private final static int COLOR_MISMATCH_PENALTY_SCALE = 36;
+ @Override
public int chooseCapabilities(final CapabilitiesImmutable desired,
final List extends CapabilitiesImmutable> available,
final int windowSystemRecommendedChoice) {
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java
index 3e32f30df..42d7f3a23 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java
@@ -69,18 +69,22 @@ public class DefaultGraphicsConfiguration implements Cloneable, AbstractGraphics
}
}
+ @Override
final public AbstractGraphicsScreen getScreen() {
return screen;
}
+ @Override
final public CapabilitiesImmutable getChosenCapabilities() {
return capabilitiesChosen;
}
+ @Override
final public CapabilitiesImmutable getRequestedCapabilities() {
return capabilitiesRequested;
}
+ @Override
public AbstractGraphicsConfiguration getNativeGraphicsConfiguration() {
return this;
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java
index ffcad235c..4bd548916 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java
@@ -54,10 +54,12 @@ public class DefaultGraphicsScreen implements Cloneable, AbstractGraphicsScreen
}
}
+ @Override
public AbstractGraphicsDevice getDevice() {
return device;
}
+ @Override
public int getIndex() {
return idx;
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
index e1aa91959..c09e6eaa4 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
@@ -80,10 +80,12 @@ public abstract class GraphicsConfigurationFactory {
this.hash32 = hash32;
}
+ @Override
public final int hashCode() {
return hash32;
}
+ @Override
public final boolean equals(Object obj) {
if(this == obj) { return true; }
if (obj instanceof DeviceCapsType) {
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index bad72f355..6962ce505 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -123,6 +123,7 @@ public abstract class NativeWindowFactory {
return AccessController.doPrivileged(new PrivilegedAction() {
private final File vcliblocation = new File(
"/opt/vc/lib/libbcm_host.so");
+ @Override
public Boolean run() {
if ( vcliblocation.isFile() ) {
return Boolean.TRUE;
@@ -160,12 +161,14 @@ public abstract class NativeWindowFactory {
final String[] _tmp = new String[] { null };
AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Object run() {
Platform.initSingleton(); // last resort ..
_DEBUG[0] = Debug.debug("NativeWindow");
_tmp[0] = Debug.getProperty("nativewindow.ws.name", true);
Runtime.getRuntime().addShutdownHook(
new Thread(new Runnable() {
+ @Override
public void run() {
NativeWindowFactory.shutdown(true);
} }, "NativeWindowFactory_ShutdownHook" ) ) ;
@@ -318,6 +321,7 @@ public abstract class NativeWindowFactory {
ReflectionUtil.isClassAvailable("com.jogamp.nativewindow.awt.AWTGraphicsDevice", cl) ) {
Method[] jawtUtilMethods = AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Method[] run() {
try {
Class> _jawtUtilClass = Class.forName(JAWTUtilClassName, true, NativeWindowFactory.class.getClassLoader());
diff --git a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
index eb0a6cf04..0af2bdaf9 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
@@ -122,5 +122,6 @@ public interface ProxySurface extends MutableSurface {
public void clearUpstreamOptionBits(int v);
public StringBuilder toString(StringBuilder sink);
+ @Override
public String toString();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java b/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java
index 4ee71ee79..4ed79b1dc 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java
@@ -120,6 +120,7 @@ public interface VisualIDHolder {
this.type = type;
}
+ @Override
public int compare(VisualIDHolder vid1, VisualIDHolder vid2) {
final int id1 = vid1.getVisualID(type);
final int id2 = vid2.getVisualID(type);
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
index b8b48a46c..b8dc53c83 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
@@ -45,10 +45,12 @@ public class Dimension implements Cloneable, DimensionImmutable {
this.height=height;
}
+ @Override
public Object cloneMutable() {
return clone();
}
+ @Override
public Object clone() {
try {
return super.clone();
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java
index 9caa433a6..e6cacf4ff 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java
@@ -59,8 +59,10 @@ public interface DimensionImmutable extends WriteCloneable, Comparabletrue if the two dimensions are equal;
* otherwise false.
*/
+ @Override
boolean equals(Object obj);
+ @Override
int hashCode();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java b/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java
index dbd997c60..c84359dcd 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java
@@ -45,10 +45,12 @@ public class Insets implements Cloneable, InsetsImmutable {
this.b=bottom;
}
+ @Override
public Object cloneMutable() {
return clone();
}
+ @Override
protected Object clone() {
try {
return super.clone();
@@ -99,6 +101,7 @@ public class Insets implements Cloneable, InsetsImmutable {
return sum3 * (sum3 + 1)/2 + val2;
}
+ @Override
public String toString() {
return new String("[ l "+l+", r "+r+" - t "+t+", b "+b+" - "+getTotalWidth()+"x"+getTotalHeight()+"]");
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java
index 0f99a7861..8256068cd 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java
@@ -59,8 +59,10 @@ public interface InsetsImmutable extends WriteCloneable {
* @return true if the two Insets are equal;
* otherwise false.
*/
+ @Override
boolean equals(Object obj);
+ @Override
int hashCode();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java
index aba515d52..57c6fb716 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java
@@ -42,10 +42,12 @@ public class Point implements Cloneable, PointImmutable {
this(0, 0);
}
+ @Override
public Object cloneMutable() {
return clone();
}
+ @Override
public Object clone() {
try {
return super.clone();
@@ -95,6 +97,7 @@ public class Point implements Cloneable, PointImmutable {
return hash;
}
+ @Override
public String toString() {
return new String( x + " / " + y );
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java
index f5377e059..08c628cc1 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java
@@ -54,8 +54,10 @@ public interface PointImmutable extends WriteCloneable, Comparabletrue if the two points are equal;
* otherwise false.
*/
+ @Override
public boolean equals(Object obj);
+ @Override
public int hashCode();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java
index 3a51fb67d..8dc8f4562 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java
@@ -47,10 +47,12 @@ public class Rectangle implements Cloneable, RectangleImmutable {
this.height=height;
}
+ @Override
public Object cloneMutable() {
return clone();
}
+ @Override
protected Object clone() {
try {
return super.clone();
@@ -191,6 +193,7 @@ public class Rectangle implements Cloneable, RectangleImmutable {
return sum3 * (sum3 + 1)/2 + val2;
}
+ @Override
public String toString() {
return new String("[ "+x+" / "+y+" "+width+" x "+height+" ]");
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java
index ce735f53f..7ca92ff53 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java
@@ -78,8 +78,10 @@ public interface RectangleImmutable extends WriteCloneable, Comparabletrue if the two rectangles are equal;
* otherwise false.
*/
+ @Override
boolean equals(Object obj);
+ @Override
int hashCode();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
index 917f7e230..f1749dfa6 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
@@ -56,6 +56,7 @@ public class SurfaceSize implements Comparable {
return bitsPerPixel;
}
+ @Override
public final String toString() {
return new String("[ "+resolution+" x "+bitsPerPixel+" bpp ]");
}
@@ -89,6 +90,7 @@ public class SurfaceSize implements Comparable {
* @return true if the two dimensions are equal;
* otherwise false.
*/
+ @Override
public final boolean equals(Object obj) {
if(this == obj) { return true; }
if (obj instanceof SurfaceSize) {
@@ -99,6 +101,7 @@ public class SurfaceSize implements Comparable {
return false;
}
+ @Override
public final int hashCode() {
// 31 * x == (x << 5) - x
int hash = 31 + getResolution().hashCode();
diff --git a/src/nativewindow/classes/jogamp/nativewindow/Debug.java b/src/nativewindow/classes/jogamp/nativewindow/Debug.java
index a7bf536ec..b7197dbca 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/Debug.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/Debug.java
@@ -54,6 +54,7 @@ public class Debug extends PropertyAccess {
static {
AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Object run() {
PropertyAccess.addTrustedPrefix("nativewindow.");
return null;
diff --git a/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java
index b3b5d2131..8fb819251 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java
@@ -36,6 +36,7 @@ package jogamp.nativewindow;
import javax.media.nativewindow.*;
public class DefaultGraphicsConfigurationFactoryImpl extends GraphicsConfigurationFactory {
+ @Override
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID) {
return new DefaultGraphicsConfiguration(screen, capsChosen, capsRequested);
diff --git a/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java
index 5fdbbf697..cadef9bf1 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java
@@ -72,6 +72,7 @@ public class GlobalToolkitLock implements ToolkitLock {
// nop
}
+ @Override
public String toString() {
return "GlobalToolkitLock[obj 0x"+Integer.toHexString(hashCode())+", isOwner "+globalLock.isOwner(Thread.currentThread())+", "+globalLock.toString()+"]";
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
index 36a25acfb..e7eb13756 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
@@ -39,6 +39,7 @@ import com.jogamp.common.util.cache.TempJarCache;
public class NWJNILibLoader extends JNILibLoaderBase {
public static boolean loadNativeWindow(final String ossuffix) {
return AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Boolean run() {
Platform.initSingleton();
final String libName = "nativewindow_"+ossuffix ;
diff --git a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java
index e3f6ab5ca..22ac3bd94 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java
@@ -51,6 +51,7 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory {
// This subclass of NativeWindowFactory handles the case of
// NativeWindows being passed in
+ @Override
protected NativeWindow getNativeWindowImpl(Object winObj, AbstractGraphicsConfiguration config) throws IllegalArgumentException {
if (winObj instanceof NativeWindow) {
// Use the NativeWindow directly
diff --git a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java
index d8ce98acb..bda20522c 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java
@@ -64,6 +64,7 @@ public class NullToolkitLock implements ToolkitLock {
// nop
}
+ @Override
public String toString() {
return "NullToolkitLock[]";
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java b/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java
index 8a1048c6f..097fffead 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java
@@ -253,6 +253,7 @@ public abstract class ProxySurfaceImpl implements ProxySurface {
return surfaceLock.getOwner();
}
+ @Override
public final StringBuilder getUpstreamOptionBits(StringBuilder sink) {
if(null == sink) {
sink = new StringBuilder();
diff --git a/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java
index 51dd58543..f1efb8133 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java
@@ -73,6 +73,7 @@ public class ResourceToolkitLock implements ToolkitLock {
// nop
}
+ @Override
public String toString() {
return "ResourceToolkitLock[obj 0x"+Integer.toHexString(hashCode())+", isOwner "+lock.isOwner(Thread.currentThread())+", "+lock.toString()+"]";
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java
index e20d3d138..7b74e1f1f 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java
@@ -142,6 +142,7 @@ public class SharedResourceToolkitLock implements ToolkitLock {
}
}
+ @Override
public String toString() {
return "SharedResourceToolkitLock[refCount "+refCount+", handle 0x"+Long.toHexString(handle)+", obj 0x"+Integer.toHexString(hashCode())+", isOwner "+lock.isOwner(Thread.currentThread())+", "+lock.toString()+"]";
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java b/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java
index d11e240fa..1e83232bb 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java
@@ -74,6 +74,7 @@ public class SurfaceUpdatedHelper implements SurfaceUpdatedListener {
}
}
+ @Override
public void surfaceUpdated(Object updater, NativeSurface ns, long when) {
synchronized(surfaceUpdatedListenersLock) {
for(int i = 0; i < surfaceUpdatedListeners.size(); i++ ) {
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java
index 815facbee..a5da41424 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java
@@ -50,6 +50,7 @@ import java.security.PrivilegedAction;
public class JAWTJNILibLoader extends NWJNILibLoader {
static {
AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Object run() {
// Make sure that awt.dll is loaded before loading jawt.dll. Otherwise
// a Dialog with "awt.dll not found" might pop up.
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
index 32946fe2d..5a1d915ce 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
@@ -320,6 +320,7 @@ public class JAWTUtil {
j2dExist = ok;
PrivilegedDataBlob1 pdb1 = (PrivilegedDataBlob1) AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public Object run() {
PrivilegedDataBlob1 d = new PrivilegedDataBlob1();
try {
@@ -352,9 +353,11 @@ public class JAWTUtil {
jawtLock = LockFactory.createRecursiveLock();
jawtToolkitLock = new ToolkitLock() {
+ @Override
public final void lock() {
JAWTUtil.lockToolkit();
}
+ @Override
public final void unlock() {
JAWTUtil.unlockToolkit();
}
@@ -380,6 +383,7 @@ public class JAWTUtil {
} else {
final ArrayList