Java Code Examples for

The following are Jave code examples for showing how to use detachFromGLContext() of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: vlc-example-streamplayer   File:   Source Code and License Vote up 6 votes
public void run() {

    synchronized (this) {
        /* Ideally, all devices are running Android O, and we can create a SurfaceTexture
         * without an OpenGL context and we can specify the thread (Handler) where to run
         * SurfaceTexture callbacks. But this is not the case. The SurfaceTexture has to be
         * created from a new thread with a prepared looper in order to don't use the
         * MainLooper one (and have deadlock when we stop VLC from the mainloop).
        mLooper = Looper.myLooper();
        mSurfaceTexture = new SurfaceTexture(0);
        /* The OpenGL texture will be attached from the OpenGL Thread */