From 8a032a2c1f247819bdb08382fbebcc4cd896b3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xerxes=20R=C3=A5nby?= Date: Wed, 18 Dec 2013 17:54:45 +0100 Subject: [PATCH] ALAudioSink GLMediaPlayerImpl FFMPEGMediaPlayer: Verbosity only w/ DEBUG flag. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Xerxes RĂ„nby --- src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java | 2 +- .../classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 6 ++++-- .../jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java b/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java index 1229eb7b8b..8b12f8a286 100644 --- a/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java +++ b/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java @@ -487,7 +487,7 @@ private final int dequeueBuffer(boolean wait) { // clip wait at [2 .. 100] ms final int avgBufferDura = chosenFormat.getBytesDuration( alBufferBytesQueued / alFramesPlaying.size() ); final int sleep = Math.max(2, Math.min(100, releaseBufferLimes * avgBufferDura)); - if( DEBUG || true ) { + if( DEBUG ) { System.err.println(getThreadName()+": ALAudioSink: Dequeue.wait["+i+"]: avgBufferDura "+avgBufferDura+", releaseBufferLimes "+releaseBufferLimes+", sleep "+sleep+" ms, playImpl "+(AL.AL_PLAYING == getSourceState())+", processed "+val[0]+", "+this); } unlockContext(); diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index 0de308cd1a..0bd1aa932a 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -757,7 +757,9 @@ private final void removeAllTextureFrames(GL gl) { } texFrames[i] = null; } - System.err.println(Thread.currentThread().getName()+"> Clear TexFrame["+i+"]: "+frame+" -> null"); + if( DEBUG ) { + System.err.println(Thread.currentThread().getName()+"> Clear TexFrame["+i+"]: "+frame+" -> null"); + } } } } @@ -1609,4 +1611,4 @@ protected static final int getPropIntVal(Map props, String key) } return 0; } -} \ No newline at end of file +} 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 034b9457eb..20e80c9f2e 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -185,6 +185,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { final boolean avResampleLoaded = FFMPEGDynamicLibraryBundleInfo.avResampleLoaded(); final VersionNumber swResampleVersion = FFMPEGDynamicLibraryBundleInfo.swResampleVersion; final boolean swResampleLoaded = FFMPEGDynamicLibraryBundleInfo.swResampleLoaded(); + if( DEBUG ) { System.err.println("LIB_AV Codec : "+avCodecVersion+" [cc "+avCodecMajorVersionCC+"]"); System.err.println("LIB_AV Format : "+avFormatVersion+" [cc "+avFormatMajorVersionCC+"]"); System.err.println("LIB_AV Util : "+avUtilVersion+" [cc "+avUtilMajorVersionCC+"]"); @@ -192,6 +193,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { System.err.println("LIB_SW Resample: "+swResampleVersion+" [cc "+swResampleMajorVersionCC+", loaded "+swResampleLoaded+"]"); System.err.println("LIB_AV Device : [loaded "+FFMPEGDynamicLibraryBundleInfo.avDeviceLoaded()+"]"); System.err.println("LIB_AV Class : "+(null!= natives ? natives.getClass().getSimpleName() : "n/a")); + } libAVVersionGood = avCodecMajorVersionCC == avCodecVersion.getMajor() && avFormatMajorVersionCC == avFormatVersion.getMajor() && avUtilMajorVersionCC == avUtilVersion.getMajor() &&