Re: [android-developers] how to play a video on an OpenGL texture

2013-05-16 Thread Linda Li
Did you get any good result? Could you share your code? Thanks in advance. I am looking at it too. It seems there are a bunch of spaces to modify in order to let video output to an OpenGL texture. Just a little wondering why Google doesn't publish an example, since it seems many people ask

Re: [android-developers] how to play a video on an OpenGL texture

2012-12-05 Thread bob
Yes, you're right. I had to change the bind calls to this: GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureID); Thanks. On Tuesday, December 4, 2012 6:06:18 PM UTC-6, RichardC wrote: I don't think your bind texture call is correct see *bold* below: *The texture object uses the

Re: [android-developers] how to play a video on an OpenGL texture

2012-12-04 Thread Fabien R
On 03/12/2012 17:50, bob wrote: I actually tried calling it in onDrawFrame, and that yields a slightly different error: 12-03 10:47:23.282: E/SurfaceTexture(2753): [unnamed-2753-0] updateTexImage: error binding external texture image 0x9046042f (slot 5): 0x502 How did you bind

Re: [android-developers] how to play a video on an OpenGL texture

2012-12-04 Thread bob
I fiddled with a bunch of approaches for binding. The current code looks like this: int[] textures = new int[1]; GLES20.glGenTextures(1, textures, 0); mTextureID = textures[0]; GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureID); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D,

Re: [android-developers] how to play a video on an OpenGL texture

2012-12-04 Thread RichardC
I don't think your bind texture call is correct see *bold* below: *The texture object uses the GL_TEXTURE_EXTERNAL_OES texture target, which is defined by the GL_OES_EGL_image_externalhttp://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txtOpenGL ES extension. This limits

Re: [android-developers] how to play a video on an OpenGL texture

2012-12-03 Thread Fabien R
On 30/11/2012 21:13, bob wrote: I've been baffling my brain with this some more. I suspect the solution to the problem lies in this text. /** * Update the texture image to the most recent frame from the image stream. This may only be * called while the OpenGL ES context

Re: [android-developers] how to play a video on an OpenGL texture

2012-12-03 Thread bob
I actually tried calling it in onDrawFrame, and that yields a slightly different error: 12-03 10:47:23.282: E/SurfaceTexture(2753): [unnamed-2753-0] updateTexImage: error binding external texture image 0x9046042f (slot 5): 0x502 12-03 10:47:23.342: W/dalvikvm(2753): threadid=11: thread

Re: [android-developers] how to play a video on an OpenGL texture

2012-11-30 Thread bob
I've been baffling my brain with this some more. I suspect the solution to the problem lies in this text. /** * Update the texture image to the most recent frame from the image stream. This may only be * called while the OpenGL ES context that owns the texture is current on the

[android-developers] how to play a video on an OpenGL texture

2012-11-29 Thread bob
Does anyone know how to play a video on an OpenGL texture? I tried something like this, but no dice: int[] textures = new int[1]; GLES20.glGenTextures(1, textures, 0); SurfaceTexture st = new SurfaceTexture(textures[0]); Statics.mp.setSurface(new Surface(st));

Re: [android-developers] how to play a video on an OpenGL texture

2012-11-29 Thread Romain Guy
You must call updateTexImage() on SurfaceTexture when a new frame is available (use an OnFrameAvailableListener to be notified.) On Thu, Nov 29, 2012 at 11:39 AM, bob b...@coolfone.comze.com wrote: Does anyone know how to play a video on an OpenGL texture? I tried something like this, but no

Re: [android-developers] how to play a video on an OpenGL texture

2012-11-29 Thread bob
I'm calling updateTexImage now, and I'm getting some weird error: E/libEGL ( 4995): validate_display:198 error 3008 (EGL_BAD_DISPLAY) E/SurfaceTexture( 4995): [unnamed-4995-0] error creating EGLImage: 0x3008 D/AndroidRuntime( 4995): Shutting down VM W/dalvikvm( 4995): threadid=1: thread exiting