56 lines
1.6 KiB
Java
56 lines
1.6 KiB
Java
package c.o.a.w;
|
|
|
|
import android.graphics.SurfaceTexture;
|
|
import android.opengl.GLSurfaceView;
|
|
import android.view.SurfaceHolder;
|
|
import c.o.a.w.d;
|
|
/* compiled from: GlCameraPreview */
|
|
public class c implements SurfaceHolder.Callback {
|
|
public final /* synthetic */ GLSurfaceView i;
|
|
public final /* synthetic */ d.c j;
|
|
public final /* synthetic */ d k;
|
|
|
|
/* compiled from: GlCameraPreview */
|
|
public class a implements Runnable {
|
|
public a() {
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
d.c cVar = c.this.j;
|
|
SurfaceTexture surfaceTexture = d.this.k;
|
|
if (surfaceTexture != null) {
|
|
surfaceTexture.setOnFrameAvailableListener(null);
|
|
d.this.k.release();
|
|
d.this.k = null;
|
|
}
|
|
c.o.a.r.c cVar2 = d.this.l;
|
|
if (cVar2 != null) {
|
|
cVar2.b();
|
|
d.this.l = null;
|
|
}
|
|
}
|
|
}
|
|
|
|
public c(d dVar, GLSurfaceView gLSurfaceView, d.c cVar) {
|
|
this.k = dVar;
|
|
this.i = gLSurfaceView;
|
|
this.j = cVar;
|
|
}
|
|
|
|
@Override // android.view.SurfaceHolder.Callback
|
|
public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i2, int i3) {
|
|
}
|
|
|
|
@Override // android.view.SurfaceHolder.Callback
|
|
public void surfaceCreated(SurfaceHolder surfaceHolder) {
|
|
}
|
|
|
|
@Override // android.view.SurfaceHolder.Callback
|
|
public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
|
|
this.k.g();
|
|
this.i.queueEvent(new a());
|
|
this.k.j = false;
|
|
}
|
|
}
|