From f4574bf6846f2084f6a403552f7be6e845107c73 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 1 Nov 2013 12:38:54 +0100 Subject: Bug 885 - GLMediaPlayer: Allow single threaded mode - Especially where multiple media textures (Android) or shared GL context are not usable. - GLMediaPlayer: - TEXTURE_COUNT_MIN is the new minimum: '1' - i.e. no multithreading, single threaded player - TEXTURE_COUNT_DEFAULT is '4' - multithreaded - GLMediaPlayerImpl: - Add Single threaded mode, but perform initStreamImpl(..) off-thread. - --- src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java index 3f6b78d7e..f0864f949 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java @@ -186,8 +186,11 @@ public interface GLMediaPlayer extends TextureSequence { public static final boolean DEBUG = Debug.debug("GLMediaPlayer"); public static final boolean DEBUG_NATIVE = Debug.debug("GLMediaPlayer.Native"); - /** Minimum texture count, value {@value}. */ - public static final int TEXTURE_COUNT_MIN = 4; + /** Default texture count, value {@value}. */ + public static final int TEXTURE_COUNT_DEFAULT = 4; + + /** Minimum texture count, value {@value}. Using the minimum texture count disables multi-threaded decoding. */ + public static final int TEXTURE_COUNT_MIN = 1; /** Constant {@value} for mute or not available. See Audio and video Stream IDs. */ public static final int STREAM_ID_NONE = -2; @@ -350,7 +353,7 @@ public interface GLMediaPlayer extends TextureSequence { * @param vid video stream id, see audio and video Stream IDs * @param aid video stream id, see audio and video Stream IDs * @param textureCount desired number of buffered textures to be decoded off-thread, will be validated by implementation. - * The minimum value is {@link #TEXTURE_COUNT_MIN}. + * The minimum value is {@link #TEXTURE_COUNT_DEFAULT}. * Ignored if video is muted. * @throws IllegalStateException if not invoked in {@link State#Uninitialized} * @throws IllegalArgumentException if arguments are invalid -- cgit v1.2.3