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 calling thread.
     * It will implicitly bind its texture to the GL_TEXTURE_EXTERNAL_OES 
texture target.
     */
    public void updateTexImage() {
        nativeUpdateTexImage();
    }


I suspect the key is figuring out what "while the OpenGL ES context that 
owns the texture is current on the calling thread" means.

Anyone have some Advil and a Babel fish?


On Thursday, November 29, 2012 2:50:15 PM UTC-6, bob wrote:
>
> 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 with uncaught exception 
> (group=0x40c521f8)
> E/AndroidRuntime( 4995): FATAL EXCEPTION: main
> E/AndroidRuntime( 4995): java.lang.RuntimeException: Error during 
> updateTexImage (see logs)
> E/AndroidRuntime( 4995): at 
> android.graphics.SurfaceTexture.updateTexImage(SurfaceTexture.java:164)
> E/AndroidRuntime( 4995): at 
> com.example.android.basicglsurfaceview.GLES20TriangleRenderer$1.onFrameAvailable(GLES20TriangleRenderer.java:137)
> E/AndroidRuntime( 4995): at 
> android.graphics.SurfaceTexture$EventHandler.handleMessage(SurfaceTexture.java:244)
> E/AndroidRuntime( 4995): at 
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime( 4995): at android.os.Looper.loop(Looper.java:137)
> E/AndroidRuntime( 4995): at 
> android.app.ActivityThread.main(ActivityThread.java:4507)
> E/AndroidRuntime( 4995): at java.lang.reflect.Method.invokeNative(Native 
> Method)
> E/AndroidRuntime( 4995): at 
> java.lang.reflect.Method.invoke(Method.java:511)
> E/AndroidRuntime( 4995): at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:978)
> E/AndroidRuntime( 4995): at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
> E/AndroidRuntime( 4995): at dalvik.system.NativeStart.main(Native Method)
>
> Any ideas?
>
>
> On Thursday, November 29, 2012 1:49:55 PM UTC-6, Romain Guy (Google) wrote:
>>
>> 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 <[email protected]> wrote:
>>
>>> 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));
>>>         
>>>         
>>>         
>>> try {
>>>  Statics.mp.prepare();
>>> } catch (IllegalStateException e1) {
>>> // TODO Auto-generated catch block
>>>  e1.printStackTrace();
>>> } catch (IOException e1) {
>>> // TODO Auto-generated catch block
>>>  e1.printStackTrace();
>>> }
>>>         Statics.mp.start();
>>>         
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> -- 
>> Romain Guy
>> Android framework engineer
>> [email protected]
>>
>>  

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to