diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av/impl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java | 17 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java | 16 |
2 files changed, 25 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java index ce9df21cf..32c863553 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java @@ -222,6 +222,11 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { final List<String> avutil = new ArrayList<String>(); avutil.add("avutil"); // default + + avutil.add("libavutil.so.52"); // dummy future proof + avutil.add("libavutil.so.51"); // 0.8 + avutil.add("libavutil.so.50"); // 0.7 + avutil.add("avutil-52"); // dummy future proof avutil.add("avutil-51"); // 0.8 avutil.add("avutil-50"); // 0.7 @@ -229,6 +234,12 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { final List<String> avformat = new ArrayList<String>(); avformat.add("avformat"); // default + + avformat.add("libavformat.so.55"); // dummy future proof + avformat.add("libavformat.so.54"); // 0.? + avformat.add("libavformat.so.53"); // 0.8 + avformat.add("libavformat.so.52"); // 0.7 + avformat.add("avformat-55"); // dummy future proof avformat.add("avformat-54"); // 0.? avformat.add("avformat-53"); // 0.8 @@ -237,6 +248,12 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { final List<String> avcodec = new ArrayList<String>(); avcodec.add("avcodec"); // default + + avcodec.add("libavcodec.so.55"); // dummy future proof + avcodec.add("libavcodec.so.54"); // 0.? + avcodec.add("libavcodec.so.53"); // 0.8 + avcodec.add("libavcodec.so.52"); // 0.7 + avcodec.add("avcodec-55"); // dummy future proof avcodec.add("avcodec-54"); // 0.? avcodec.add("avcodec-53"); // 0.8 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 7d10cff4d..4be2bcb58 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -192,14 +192,14 @@ public class FFMPEGMediaPlayer extends EGLMediaPlayerImpl { System.out.println("setURL: p1 "+this); setStream0(moviePtr, urlS, -1, -1); System.out.println("setURL: p2 "+this); - int tf; + int tf, tif=GL.GL_RGBA; // texture format and internal format switch(vBytesPerPixelPerPlane) { - case 1: tf = GL2ES2.GL_RED; break; - case 3: tf = GL2ES2.GL_RGB; break; - case 4: tf = GL2ES2.GL_RGBA; break; + case 1: tf = GL2ES2.GL_ALPHA; tif=GL.GL_ALPHA; break; + case 3: tf = GL2ES2.GL_RGB; tif=GL.GL_RGB; break; + case 4: tf = GL2ES2.GL_RGBA; tif=GL.GL_RGBA; break; default: throw new RuntimeException("Unsupported bytes-per-pixel / plane "+vBytesPerPixelPerPlane); } - setTextureFormat(tf); + setTextureFormat(tif, tf); setTextureType(GL.GL_UNSIGNED_BYTE); GLContextImpl ctx = (GLContextImpl)gl.getContext(); ProcAddressTable pt = ctx.getGLProcAddressTable(); @@ -296,9 +296,9 @@ public class FFMPEGMediaPlayer extends EGLMediaPlayerImpl { " vec2 v_off = vec2("+tc_w_1+", 0.5);\n"+ " vec2 tc_half = texCoord*0.5;\n"+ " float y,u,v,r,g,b;\n"+ - " y = texture2D(image, texCoord).r;\n"+ - " u = texture2D(image, u_off+tc_half).r;\n"+ - " v = texture2D(image, v_off+tc_half).r;\n"+ + " y = texture2D(image, texCoord).a;\n"+ + " u = texture2D(image, u_off+tc_half).a;\n"+ + " v = texture2D(image, v_off+tc_half).a;\n"+ " y = 1.1643*(y-0.0625);\n"+ " u = u-0.5;\n"+ " v = v-0.5;\n"+ |