package x0;

import android.graphics.SurfaceTexture;
import android.opengl.EGLContext;
import android.opengl.EGLDisplay;
import android.opengl.EGLSurface;
import android.os.Handler;

/* JADX INFO: loaded from: classes.dex */
public final class e implements SurfaceTexture.OnFrameAvailableListener, Runnable {

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public static final int[] f18506w = {12352, 4, 12324, 8, 12323, 8, 12322, 8, 12321, 8, 12325, 0, 12327, 12344, 12339, 4, 12344};

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final Handler f18507q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final int[] f18508r = new int[1];

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public EGLDisplay f18509s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public EGLContext f18510t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public EGLSurface f18511u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public SurfaceTexture f18512v;

    public e(Handler handler) {
        this.f18507q = handler;
    }

    @Override // android.graphics.SurfaceTexture.OnFrameAvailableListener
    public final void onFrameAvailable(SurfaceTexture surfaceTexture) {
        this.f18507q.post(this);
    }

    @Override // java.lang.Runnable
    public final void run() {
        SurfaceTexture surfaceTexture = this.f18512v;
        if (surfaceTexture != null) {
            try {
                surfaceTexture.updateTexImage();
            } catch (RuntimeException unused) {
            }
        }
    }
}
