diff options
author | Sven Gothel <[email protected]> | 2012-08-16 16:06:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-08-16 16:06:57 +0200 |
commit | 09a8151abe3934ccf17fa84d5b2000e259351312 (patch) | |
tree | e23c9b8da10e56ac8c194cc98866564084c981db /src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | |
parent | ef099612d2adb7223d928d2ba7a88f984501ddb9 (diff) |
Fix FFMPEGMediaPlayer: Use GL_ALPHA (texture format intern/data) instead of GL_RGBA/GL_ALPHA ; Load dedicated native libav/libffmpeg
- ES2 spec does not allow GL_RGBA/GL_ALPHA.
- Load dedicated native libs (libav/libffmpeg) since distributions don't create
symlink e.g. libavutil.so -> libavutil.so.53
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index d3d45e692..27c926704 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -62,6 +62,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { protected int textureCount; protected int textureTarget; protected int textureFormat; + protected int textureInternalFormat; protected int textureType; protected int texUnit; @@ -104,6 +105,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { this.textureCount=3; this.textureTarget=GL.GL_TEXTURE_2D; this.textureFormat = GL.GL_RGBA; + this.textureInternalFormat = GL.GL_RGBA; this.textureType = GL.GL_UNSIGNED_BYTE; this.texUnit = 0; this.state = State.Uninitialized; @@ -122,7 +124,10 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { public final int getTextureCount() { return textureCount; } protected final void setTextureTarget(int target) { textureTarget=target; } - protected final void setTextureFormat(int f) { textureFormat=f; } + 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];} @@ -361,9 +366,9 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { gl.glTexImage2D( textureTarget, // target 0, // level - GL.GL_RGBA, // internal format - tWidth, // width - tHeight, // height + textureInternalFormat, // internal format + tWidth, // width + tHeight, // height 0, // border textureFormat, textureType, |