aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/av
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-10 01:11:00 +0200
committerSven Gothel <[email protected]>2014-07-10 01:11:00 +0200
commitec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25 (patch)
treee405f17400b8d52ffe38347d226ca9927ac4f3ec /src/jogl/classes/jogamp/opengl/util/av
parentefa5f1110725d41b7ea58010fe34b2a8aacd185b (diff)
Bug 1031: Remove Deprecated Classes and Methods (JOGL)
Removed Deprecated Class: - com/jogamp/opengl/util/TGAWriter.java - Use TextureIO w/ .tga suffix - com/jogamp/opengl/util/awt/Screenshot.java - Use: - com.jogamp.opengl.util.GLReadBufferUtil, or - com.jogamp.opengl.util.awt.AWTGLReadBufferUtil The latter for reading into AWT BufferedImage See: TestBug461FBOSupersamplingSwingAWT, TestBug605FlippedImageAWT - javax/media/opengl/GLPbuffer.java - Use: caps.setPBuffer(true); final GLAutoDrawable pbuffer = GLDrawableFactory.getFactory( caps.getGLProfile() ).createOffscreenAutoDrawable(null, caps, null, 512, 512); - See: TestPBufferDeadlockAWT, .. Removed Deprecated Methods: - Constructor of AWT-GLCanvas, SWT-GLCanvas, AWT-GLJPanel with argument 'final GLContext shareWith' See GLSharedContextSetter, i.e. glCanvas.setSharedContext(..) ! - GLDrawableFactory.createOffscreenAutoDrawable(..) with argument 'final GLContext shareWith' See GLSharedContextSetter, i.e. offscreenAutoDrawable.setSharedContext(..) ! - GLDrawableFactory.createGLPbuffer(..), see above! - com.jogamp.opengl.util.av.AudioSink 'enqueueData(AudioDataFrame audioDataFrame)', use 'enqueueData(int, ByteBuffer, int)' - GLSharedContextSetter.areAllGLEventListenerInitialized(), migrated to GLAutoDrawable ! - GLBase's - glGetBoundBuffer(int), use getBoundBuffer(int) - glGetBufferSize(int), use getBufferStorage(int).getSize() - glIsVBOArrayBound(), use isVBOArrayBound() - glIsVBOElementArrayBound(), use isVBOElementArrayBound() - NEWT MouseEvent.BUTTON_NUMBER, use BUTTON_COUNT
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java22
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java5
2 files changed, 8 insertions, 19 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java b/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java
index a24e77b7d..117be5489 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/JavaSoundAudioSink.java
@@ -186,28 +186,22 @@ public class JavaSoundAudioSink implements AudioSink {
}
@Override
- public AudioFrame enqueueData(final AudioDataFrame audioDataFrame) {
- int byteSize = audioDataFrame.getByteSize();
- final ByteBuffer byteBuffer = audioDataFrame.getData();
- final byte[] bytes = new byte[byteSize];
+ public AudioFrame enqueueData(final int pts, final ByteBuffer byteBuffer, final int byteCount) {
+ final byte[] bytes = new byte[byteCount];
final int p = byteBuffer.position();
- byteBuffer.get(bytes, 0, byteSize);
+ byteBuffer.get(bytes, 0, byteCount);
byteBuffer.position(p);
int written = 0;
int len;
- while (byteSize > 0) {
- len = auline.write(bytes, written, byteSize);
- byteSize -= len;
+ int bytesLeft = byteCount;
+ while (bytesLeft > 0) {
+ len = auline.write(bytes, written, byteCount);
+ bytesLeft -= len;
written += len;
}
playImpl();
- return audioDataFrame;
- }
-
- @Override
- public AudioFrame enqueueData(final int pts, final ByteBuffer bytes, final int byteCount) {
- return enqueueData(new AudioDataFrame(pts, chosenFormat.getBytesDuration(byteCount), bytes, byteCount));
+ return new AudioDataFrame(pts, chosenFormat.getBytesDuration(byteCount), byteBuffer, byteCount);
}
@Override
diff --git a/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java b/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java
index 3aa9d7ab6..7e27f17c3 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/NullAudioSink.java
@@ -171,11 +171,6 @@ public class NullAudioSink implements AudioSink {
}
@Override
- public AudioFrame enqueueData(final AudioDataFrame audioDataFrame) {
- return enqueueData(audioDataFrame.getPTS(), audioDataFrame.getData(), audioDataFrame.getByteSize());
- }
-
- @Override
public AudioFrame enqueueData(final int pts, final ByteBuffer bytes, final int byteCount) {
if( !initialized || null == chosenFormat ) {
return null;