aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
index 9e390319a..eb4ef5713 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
@@ -96,6 +96,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
private int textureInternalFormat;
private int textureType;
private int texUnit;
+ private int userMaxChannels = -1; // not set
private int textureFragmentShaderHashCode;
@@ -248,6 +249,12 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
public final int[] getTextureWrapST() { return texWrapST; }
@Override
+ public final void setAudioChannelLimit(final int cc) {
+ userMaxChannels = Math.min(8, Math.max(1, cc));
+ }
+ protected int getAudioChannelLimit() { return userMaxChannels; }
+
+ @Override
public String getRequiredExtensionsShaderStub() {
if(GLES2.GL_TEXTURE_EXTERNAL_OES == textureTarget) {
return ShaderCode.createExtensionDirective(GLExtensions.OES_EGL_image_external, ShaderCode.ENABLE);