InstantCameraView$CameraGLThread.smali
.class public Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;
.super Lim/tpelyyftgw/messenger/DispatchQueue;
.source "InstantCameraView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lim/tpelyyftgw/ui/components/InstantCameraView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "CameraGLThread"
.end annotation
# instance fields
.field private final DO_REINIT_MESSAGE:I
.field private final DO_RENDER_MESSAGE:I
.field private final DO_SETSESSION_MESSAGE:I
.field private final DO_SHUTDOWN_MESSAGE:I
.field private final EGL_CONTEXT_CLIENT_VERSION:I
.field private final EGL_OPENGL_ES2_BIT:I
.field private cameraId:Ljava/lang/Integer;
.field private cameraSurface:Landroid/graphics/SurfaceTexture;
.field private currentSession:Lim/tpelyyftgw/messenger/camera/CameraSession;
.field private drawProgram:I
.field private egl10:Ljavax/microedition/khronos/egl/EGL10;
.field private eglConfig:Ljavax/microedition/khronos/egl/EGLConfig;
.field private eglContext:Ljavax/microedition/khronos/egl/EGLContext;
.field private eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
.field private eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
.field private gl:Ljavax/microedition/khronos/opengles/GL;
.field private initied:Z
.field private positionHandle:I
.field private recording:Z
.field private rotationAngle:I
.field private surfaceTexture:Landroid/graphics/SurfaceTexture;
.field private textureHandle:I
.field private textureMatrixHandle:I
.field final synthetic this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
.field private vertexMatrixHandle:I
.field private videoEncoder:Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Lim/tpelyyftgw/ui/components/InstantCameraView;Landroid/graphics/SurfaceTexture;II)V
.registers 11
.param p1, "this$0" # Lim/tpelyyftgw/ui/components/InstantCameraView;
.param p2, "surface" # Landroid/graphics/SurfaceTexture;
.param p3, "surfaceWidth" # I
.param p4, "surfaceHeight" # I
.line 951
iput-object p1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
.line 952
const-string v0, "CameraGLThread"
invoke-direct {p0, v0}, Lim/tpelyyftgw/messenger/DispatchQueue;-><init>(Ljava/lang/String;)V
.line 917
const/16 v0, 0x3098
iput v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->EGL_CONTEXT_CLIENT_VERSION:I
.line 918
const/4 v0, 0x4
iput v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->EGL_OPENGL_ES2_BIT:I
.line 932
const/4 v0, 0x0
iput v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->DO_RENDER_MESSAGE:I
.line 933
const/4 v1, 0x1
iput v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->DO_SHUTDOWN_MESSAGE:I
.line 934
const/4 v1, 0x2
iput v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->DO_REINIT_MESSAGE:I
.line 935
const/4 v1, 0x3
iput v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->DO_SETSESSION_MESSAGE:I
.line 947
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
iput-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraId:Ljava/lang/Integer;
.line 953
iput-object p2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->surfaceTexture:Landroid/graphics/SurfaceTexture;
.line 955
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->previewSize:Lim/tpelyyftgw/messenger/camera/Size;
invoke-static {p1}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1200(Lim/tpelyyftgw/ui/components/InstantCameraView;)Lim/tpelyyftgw/messenger/camera/Size;
move-result-object v0
invoke-virtual {v0}, Lim/tpelyyftgw/messenger/camera/Size;->getWidth()I
move-result v0
.line 956
.local v0, "width":I
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->previewSize:Lim/tpelyyftgw/messenger/camera/Size;
invoke-static {p1}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1200(Lim/tpelyyftgw/ui/components/InstantCameraView;)Lim/tpelyyftgw/messenger/camera/Size;
move-result-object v1
invoke-virtual {v1}, Lim/tpelyyftgw/messenger/camera/Size;->getHeight()I
move-result v1
.line 958
.local v1, "height":I
int-to-float v2, p3
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
move-result v3
int-to-float v3, v3
div-float/2addr v2, v3
.line 960
.local v2, "scale":F
int-to-float v3, v0
mul-float v3, v3, v2
float-to-int v0, v3
.line 961
int-to-float v3, v1
mul-float v3, v3, v2
float-to-int v1, v3
.line 962
const/high16 v3, 0x3f800000 # 1.0f
if-le v0, v1, :cond_4f
.line 963
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleX:F
invoke-static {p1, v3}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1302(Lim/tpelyyftgw/ui/components/InstantCameraView;F)F
.line 964
int-to-float v3, v0
int-to-float v4, p4
div-float/2addr v3, v4
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleY:F
invoke-static {p1, v3}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1402(Lim/tpelyyftgw/ui/components/InstantCameraView;F)F
goto :goto_58
.line 966
:cond_4f
int-to-float v4, v1
int-to-float v5, p3
div-float/2addr v4, v5
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleX:F
invoke-static {p1, v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1302(Lim/tpelyyftgw/ui/components/InstantCameraView;F)F
.line 967
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleY:F
invoke-static {p1, v3}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1402(Lim/tpelyyftgw/ui/components/InstantCameraView;F)F
.line 969
:goto_58
return-void
.end method
.method private initGL()Z
.registers 18
.line 972
move-object/from16 v0, p0
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_b
.line 973
const-string v1, "start init gl"
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->d(Ljava/lang/String;)V
.line 975
:cond_b
invoke-static {}, Ljavax/microedition/khronos/egl/EGLContext;->getEGL()Ljavax/microedition/khronos/egl/EGL;
move-result-object v1
check-cast v1, Ljavax/microedition/khronos/egl/EGL10;
iput-object v1, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
.line 977
sget-object v2, Ljavax/microedition/khronos/egl/EGL10;->EGL_DEFAULT_DISPLAY:Ljava/lang/Object;
invoke-interface {v1, v2}, Ljavax/microedition/khronos/egl/EGL10;->eglGetDisplay(Ljava/lang/Object;)Ljavax/microedition/khronos/egl/EGLDisplay;
move-result-object v1
iput-object v1, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
.line 978
sget-object v2, Ljavax/microedition/khronos/egl/EGL10;->EGL_NO_DISPLAY:Ljavax/microedition/khronos/egl/EGLDisplay;
const/4 v3, 0x0
if-ne v1, v2, :cond_46
.line 979
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_42
.line 980
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "eglGetDisplay failed "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v2}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v2
invoke-static {v2}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 982
:cond_42
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 983
return v3
.line 986
:cond_46
const/4 v1, 0x2
new-array v2, v1, [I
.line 987
.local v2, "version":[I
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
invoke-interface {v4, v5, v2}, Ljavax/microedition/khronos/egl/EGL10;->eglInitialize(Ljavax/microedition/khronos/egl/EGLDisplay;[I)Z
move-result v4
if-nez v4, :cond_79
.line 988
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_75
.line 989
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "eglInitialize failed "
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v4}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v4
invoke-static {v4}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 991
:cond_75
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 992
return v3
.line 995
:cond_79
const/4 v4, 0x1
new-array v11, v4, [I
.line 996
.local v11, "configsCount":[I
new-array v12, v4, [Ljavax/microedition/khronos/egl/EGLConfig;
.line 997
.local v12, "configs":[Ljavax/microedition/khronos/egl/EGLConfig;
const/16 v5, 0xf
new-array v7, v5, [I
fill-array-data v7, :array_310
.line 1007
.local v7, "configSpec":[I
iget-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v6, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
const/4 v9, 0x1
move-object v8, v12
move-object v10, v11
invoke-interface/range {v5 .. v10}, Ljavax/microedition/khronos/egl/EGL10;->eglChooseConfig(Ljavax/microedition/khronos/egl/EGLDisplay;[I[Ljavax/microedition/khronos/egl/EGLConfig;I[I)Z
move-result v5
if-nez v5, :cond_b8
.line 1008
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_b4
.line 1009
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "eglChooseConfig failed "
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v4}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v4
invoke-static {v4}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1011
:cond_b4
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1012
return v3
.line 1013
:cond_b8
aget v5, v11, v3
if-lez v5, :cond_302
.line 1014
aget-object v5, v12, v3
iput-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglConfig:Ljavax/microedition/khronos/egl/EGLConfig;
.line 1023
const/4 v6, 0x3
new-array v8, v6, [I
fill-array-data v8, :array_332
.line 1024
.local v8, "attrib_list":[I
iget-object v9, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v10, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
sget-object v13, Ljavax/microedition/khronos/egl/EGL10;->EGL_NO_CONTEXT:Ljavax/microedition/khronos/egl/EGLContext;
invoke-interface {v9, v10, v5, v13, v8}, Ljavax/microedition/khronos/egl/EGL10;->eglCreateContext(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLConfig;Ljavax/microedition/khronos/egl/EGLContext;[I)Ljavax/microedition/khronos/egl/EGLContext;
move-result-object v5
iput-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
.line 1025
if-nez v5, :cond_fa
.line 1026
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_f6
.line 1027
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "eglCreateContext failed "
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v4}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v4
invoke-static {v4}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1029
:cond_f6
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1030
return v3
.line 1033
:cond_fa
iget-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->surfaceTexture:Landroid/graphics/SurfaceTexture;
instance-of v9, v5, Landroid/graphics/SurfaceTexture;
if-eqz v9, :cond_2fe
.line 1034
iget-object v9, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v10, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
iget-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglConfig:Ljavax/microedition/khronos/egl/EGLConfig;
const/4 v14, 0x0
invoke-interface {v9, v10, v13, v5, v14}, Ljavax/microedition/khronos/egl/EGL10;->eglCreateWindowSurface(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLConfig;Ljava/lang/Object;[I)Ljavax/microedition/khronos/egl/EGLSurface;
move-result-object v5
iput-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
.line 1040
if-eqz v5, :cond_2d8
sget-object v9, Ljavax/microedition/khronos/egl/EGL10;->EGL_NO_SURFACE:Ljavax/microedition/khronos/egl/EGLSurface;
if-ne v5, v9, :cond_115
goto/16 :goto_2d8
.line 1047
:cond_115
iget-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v9, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
iget-object v10, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
iget-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
invoke-interface {v5, v9, v10, v10, v13}, Ljavax/microedition/khronos/egl/EGL10;->eglMakeCurrent(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLContext;)Z
move-result v5
if-nez v5, :cond_149
.line 1048
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_145
.line 1049
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "eglMakeCurrent failed "
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v4}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v4
invoke-static {v4}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1051
:cond_145
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1052
return v3
.line 1054
:cond_149
iget-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
invoke-virtual {v5}, Ljavax/microedition/khronos/egl/EGLContext;->getGL()Ljavax/microedition/khronos/opengles/GL;
move-result-object v5
iput-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->gl:Ljavax/microedition/khronos/opengles/GL;
.line 1056
iget-object v5, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleX:F
invoke-static {v5}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1300(Lim/tpelyyftgw/ui/components/InstantCameraView;)F
move-result v5
const/high16 v9, 0x3f800000 # 1.0f
div-float v5, v9, v5
const/high16 v10, 0x40000000 # 2.0f
div-float/2addr v5, v10
.line 1057
.local v5, "tX":F
iget-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleY:F
invoke-static {v13}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1400(Lim/tpelyyftgw/ui/components/InstantCameraView;)F
move-result v13
div-float/2addr v9, v13
div-float/2addr v9, v10
.line 1058
.local v9, "tY":F
const/16 v10, 0xc
new-array v10, v10, [F
fill-array-data v10, :array_33c
.line 1064
.local v10, "verticesData":[F
const/16 v13, 0x8
new-array v13, v13, [F
const/high16 v15, 0x3f000000 # 0.5f
sub-float v16, v15, v5
aput v16, v13, v3
sub-float v16, v15, v9
aput v16, v13, v4
add-float v16, v5, v15
aput v16, v13, v1
sub-float v1, v15, v9
aput v1, v13, v6
sub-float v1, v15, v5
const/4 v6, 0x4
aput v1, v13, v6
const/4 v1, 0x5
add-float v16, v9, v15
aput v16, v13, v1
const/4 v1, 0x6
add-float v16, v5, v15
aput v16, v13, v1
const/4 v1, 0x7
add-float/2addr v15, v9
aput v15, v13, v1
move-object v1, v13
.line 1071
.local v1, "texData":[F
new-instance v13, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
iget-object v15, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
invoke-direct {v13, v15, v14}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;-><init>(Lim/tpelyyftgw/ui/components/InstantCameraView;Lim/tpelyyftgw/ui/components/InstantCameraView$1;)V
iput-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->videoEncoder:Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
.line 1073
iget-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
array-length v14, v10
mul-int/lit8 v14, v14, 0x4
invoke-static {v14}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;
move-result-object v14
invoke-static {}, Ljava/nio/ByteOrder;->nativeOrder()Ljava/nio/ByteOrder;
move-result-object v15
invoke-virtual {v14, v15}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
move-result-object v14
invoke-virtual {v14}, Ljava/nio/ByteBuffer;->asFloatBuffer()Ljava/nio/FloatBuffer;
move-result-object v14
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->vertexBuffer:Ljava/nio/FloatBuffer;
invoke-static {v13, v14}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1602(Lim/tpelyyftgw/ui/components/InstantCameraView;Ljava/nio/FloatBuffer;)Ljava/nio/FloatBuffer;
.line 1074
iget-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->vertexBuffer:Ljava/nio/FloatBuffer;
invoke-static {v13}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1600(Lim/tpelyyftgw/ui/components/InstantCameraView;)Ljava/nio/FloatBuffer;
move-result-object v13
invoke-virtual {v13, v10}, Ljava/nio/FloatBuffer;->put([F)Ljava/nio/FloatBuffer;
move-result-object v13
invoke-virtual {v13, v3}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;
.line 1076
iget-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
array-length v14, v1
mul-int/lit8 v14, v14, 0x4
invoke-static {v14}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;
move-result-object v6
invoke-static {}, Ljava/nio/ByteOrder;->nativeOrder()Ljava/nio/ByteOrder;
move-result-object v14
invoke-virtual {v6, v14}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
move-result-object v6
invoke-virtual {v6}, Ljava/nio/ByteBuffer;->asFloatBuffer()Ljava/nio/FloatBuffer;
move-result-object v6
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->textureBuffer:Ljava/nio/FloatBuffer;
invoke-static {v13, v6}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1702(Lim/tpelyyftgw/ui/components/InstantCameraView;Ljava/nio/FloatBuffer;)Ljava/nio/FloatBuffer;
.line 1077
iget-object v6, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->textureBuffer:Ljava/nio/FloatBuffer;
invoke-static {v6}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1700(Lim/tpelyyftgw/ui/components/InstantCameraView;)Ljava/nio/FloatBuffer;
move-result-object v6
invoke-virtual {v6, v1}, Ljava/nio/FloatBuffer;->put([F)Ljava/nio/FloatBuffer;
move-result-object v6
invoke-virtual {v6, v3}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;
.line 1079
iget-object v6, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->mSTMatrix:[F
invoke-static {v6}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1800(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v6
invoke-static {v6, v3}, Landroid/opengl/Matrix;->setIdentityM([FI)V
.line 1081
iget-object v6, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
const v13, 0x8b31
const-string v14, "uniform mat4 uMVPMatrix;\nuniform mat4 uSTMatrix;\nattribute vec4 aPosition;\nattribute vec4 aTextureCoord;\nvarying vec2 vTextureCoord;\nvoid main() {\n gl_Position = uMVPMatrix * aPosition;\n vTextureCoord = (uSTMatrix * aTextureCoord).xy;\n}\n"
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView;->loadShader(ILjava/lang/String;)I
invoke-static {v6, v13, v14}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1900(Lim/tpelyyftgw/ui/components/InstantCameraView;ILjava/lang/String;)I
move-result v6
.line 1082
.local v6, "vertexShader":I
iget-object v13, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
const v14, 0x8b30
const-string v15, "#extension GL_OES_EGL_image_external : require\nprecision lowp float;\nvarying vec2 vTextureCoord;\nuniform samplerExternalOES sTexture;\nvoid main() {\n gl_FragColor = texture2D(sTexture, vTextureCoord);\n}\n"
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView;->loadShader(ILjava/lang/String;)I
invoke-static {v13, v14, v15}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1900(Lim/tpelyyftgw/ui/components/InstantCameraView;ILjava/lang/String;)I
move-result v13
.line 1083
.local v13, "fragmentShader":I
if-eqz v6, :cond_2cb
if-eqz v13, :cond_2cb
.line 1084
invoke-static {}, Landroid/opengl/GLES20;->glCreateProgram()I
move-result v14
iput v14, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
.line 1085
invoke-static {v14, v6}, Landroid/opengl/GLES20;->glAttachShader(II)V
.line 1086
iget v14, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
invoke-static {v14, v13}, Landroid/opengl/GLES20;->glAttachShader(II)V
.line 1087
iget v14, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
invoke-static {v14}, Landroid/opengl/GLES20;->glLinkProgram(I)V
.line 1088
new-array v14, v4, [I
.line 1089
.local v14, "linkStatus":[I
iget v15, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
const v4, 0x8b82
invoke-static {v15, v4, v14, v3}, Landroid/opengl/GLES20;->glGetProgramiv(II[II)V
.line 1090
aget v4, v14, v3
if-nez v4, :cond_23f
.line 1091
sget-boolean v4, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v4, :cond_237
.line 1092
const-string v4, "failed link shader"
invoke-static {v4}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1094
:cond_237
iget v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
invoke-static {v4}, Landroid/opengl/GLES20;->glDeleteProgram(I)V
.line 1095
iput v3, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
goto :goto_267
.line 1097
:cond_23f
iget v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
const-string v15, "aPosition"
invoke-static {v4, v15}, Landroid/opengl/GLES20;->glGetAttribLocation(ILjava/lang/String;)I
move-result v4
iput v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->positionHandle:I
.line 1098
iget v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
const-string v15, "aTextureCoord"
invoke-static {v4, v15}, Landroid/opengl/GLES20;->glGetAttribLocation(ILjava/lang/String;)I
move-result v4
iput v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->textureHandle:I
.line 1099
iget v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
const-string v15, "uMVPMatrix"
invoke-static {v4, v15}, Landroid/opengl/GLES20;->glGetUniformLocation(ILjava/lang/String;)I
move-result v4
iput v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->vertexMatrixHandle:I
.line 1100
iget v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
const-string v15, "uSTMatrix"
invoke-static {v4, v15}, Landroid/opengl/GLES20;->glGetUniformLocation(ILjava/lang/String;)I
move-result v4
iput v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->textureMatrixHandle:I
.line 1102
.end local v14 # "linkStatus":[I
:goto_267
nop
.line 1110
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v4
const/4 v14, 0x1
invoke-static {v14, v4, v3}, Landroid/opengl/GLES20;->glGenTextures(I[II)V
.line 1111
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v4
aget v4, v4, v3
const v14, 0x8d65
invoke-static {v14, v4}, Landroid/opengl/GLES20;->glBindTexture(II)V
.line 1112
const/16 v4, 0x2801
const/16 v15, 0x2601
invoke-static {v14, v4, v15}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1113
const/16 v4, 0x2800
invoke-static {v14, v4, v15}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1114
const/16 v4, 0x2802
const v15, 0x812f
invoke-static {v14, v4, v15}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1115
const/16 v4, 0x2803
invoke-static {v14, v4, v15}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1117
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->mMVPMatrix:[F
invoke-static {v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2100(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v4
invoke-static {v4, v3}, Landroid/opengl/Matrix;->setIdentityM([FI)V
.line 1119
new-instance v4, Landroid/graphics/SurfaceTexture;
iget-object v14, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v14}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v14
aget v3, v14, v3
invoke-direct {v4, v3}, Landroid/graphics/SurfaceTexture;-><init>(I)V
iput-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
.line 1120
new-instance v3, Lim/tpelyyftgw/ui/components/-$$Lambda$InstantCameraView$CameraGLThread$QMCoXhxArzXbi-7MrJ8NSKbEixk;
invoke-direct {v3, v0}, Lim/tpelyyftgw/ui/components/-$$Lambda$InstantCameraView$CameraGLThread$QMCoXhxArzXbi-7MrJ8NSKbEixk;-><init>(Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;)V
invoke-virtual {v4, v3}, Landroid/graphics/SurfaceTexture;->setOnFrameAvailableListener(Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;)V
.line 1121
iget-object v3, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView;->createCamera(Landroid/graphics/SurfaceTexture;)V
invoke-static {v3, v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2200(Lim/tpelyyftgw/ui/components/InstantCameraView;Landroid/graphics/SurfaceTexture;)V
.line 1122
sget-boolean v3, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v3, :cond_2c9
.line 1123
const-string v3, "gl initied"
invoke-static {v3}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1126
:cond_2c9
const/4 v3, 0x1
return v3
.line 1103
:cond_2cb
sget-boolean v4, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v4, :cond_2d4
.line 1104
const-string v4, "failed creating shader"
invoke-static {v4}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1106
:cond_2d4
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1107
return v3
.line 1041
.end local v1 # "texData":[F
.end local v5 # "tX":F
.end local v6 # "vertexShader":I
.end local v9 # "tY":F
.end local v10 # "verticesData":[F
.end local v13 # "fragmentShader":I
:cond_2d8
:goto_2d8
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_2fa
.line 1042
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "createWindowSurface failed "
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v4}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v4
invoke-static {v4}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1044
:cond_2fa
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1045
return v3
.line 1036
:cond_2fe
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1037
return v3
.line 1016
.end local v8 # "attrib_list":[I
:cond_302
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_30b
.line 1017
const-string v1, "eglConfig not initialized"
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1019
:cond_30b
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1020
return v3
nop
:array_310
.array-data 4
0x3040
0x4
0x3024
0x8
0x3023
0x8
0x3022
0x8
0x3021
0x0
0x3025
0x0
0x3026
0x0
0x3038
.end array-data
:array_332
.array-data 4
0x3098
0x2
0x3038
.end array-data
:array_33c
.array-data 4
-0x40800000 # -1.0f
-0x40800000 # -1.0f
0x0
0x3f800000 # 1.0f
-0x40800000 # -1.0f
0x0
-0x40800000 # -1.0f
0x3f800000 # 1.0f
0x0
0x3f800000 # 1.0f
0x3f800000 # 1.0f
0x0
.end array-data
.end method
.method private onDraw(Ljava/lang/Integer;)V
.registers 12
.param p1, "cameraId" # Ljava/lang/Integer;
.line 1160
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->initied:Z
if-nez v0, :cond_5
.line 1161
return-void
.line 1164
:cond_5
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v1}, Ljavax/microedition/khronos/egl/EGL10;->eglGetCurrentContext()Ljavax/microedition/khronos/egl/EGLContext;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_23
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
const/16 v2, 0x3059
invoke-interface {v1, v2}, Ljavax/microedition/khronos/egl/EGL10;->eglGetCurrentSurface(I)Ljavax/microedition/khronos/egl/EGLSurface;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_54
.line 1165
:cond_23
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
iget-object v3, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
invoke-interface {v0, v1, v2, v2, v3}, Ljavax/microedition/khronos/egl/EGL10;->eglMakeCurrent(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLContext;)Z
move-result v0
if-nez v0, :cond_54
.line 1166
sget-boolean v0, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v0, :cond_53
.line 1167
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "eglMakeCurrent failed "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v1}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v1
invoke-static {v1}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1169
:cond_53
return-void
.line 1172
:cond_54
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
invoke-virtual {v0}, Landroid/graphics/SurfaceTexture;->updateTexImage()V
.line 1174
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->recording:Z
const/4 v1, 0x1
if-nez v0, :cond_91
.line 1175
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->videoEncoder:Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraFile:Ljava/io/File;
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2300(Lim/tpelyyftgw/ui/components/InstantCameraView;)Ljava/io/File;
move-result-object v2
invoke-static {}, Landroid/opengl/EGL14;->eglGetCurrentContext()Landroid/opengl/EGLContext;
move-result-object v3
invoke-virtual {v0, v2, v3}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->startRecording(Ljava/io/File;Landroid/opengl/EGLContext;)V
.line 1176
iput-boolean v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->recording:Z
.line 1177
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->currentSession:Lim/tpelyyftgw/messenger/camera/CameraSession;
invoke-virtual {v0}, Lim/tpelyyftgw/messenger/camera/CameraSession;->getCurrentOrientation()I
move-result v0
.line 1178
.local v0, "orientation":I
const/16 v2, 0x5a
if-eq v0, v2, :cond_7d
const/16 v2, 0x10e
if-ne v0, v2, :cond_91
.line 1179
:cond_7d
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleX:F
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1300(Lim/tpelyyftgw/ui/components/InstantCameraView;)F
move-result v2
.line 1180
.local v2, "temp":F
iget-object v3, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleY:F
invoke-static {v3}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1400(Lim/tpelyyftgw/ui/components/InstantCameraView;)F
move-result v4
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleX:F
invoke-static {v3, v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1302(Lim/tpelyyftgw/ui/components/InstantCameraView;F)F
.line 1181
iget-object v3, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->scaleY:F
invoke-static {v3, v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1402(Lim/tpelyyftgw/ui/components/InstantCameraView;F)F
.line 1185
.end local v0 # "orientation":I
.end local v2 # "temp":F
:cond_91
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->videoEncoder:Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v3
invoke-virtual {v0, v2, p1, v3, v4}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->frameAvailable(Landroid/graphics/SurfaceTexture;Ljava/lang/Integer;J)V
.line 1187
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->mSTMatrix:[F
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1800(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v2
invoke-virtual {v0, v2}, Landroid/graphics/SurfaceTexture;->getTransformMatrix([F)V
.line 1189
iget v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->drawProgram:I
invoke-static {v0}, Landroid/opengl/GLES20;->glUseProgram(I)V
.line 1190
const v0, 0x84c0
invoke-static {v0}, Landroid/opengl/GLES20;->glActiveTexture(I)V
.line 1191
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v0}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v0
const/4 v2, 0x0
aget v0, v0, v2
const v3, 0x8d65
invoke-static {v3, v0}, Landroid/opengl/GLES20;->glBindTexture(II)V
.line 1193
iget v4, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->positionHandle:I
const/4 v5, 0x3
const/16 v6, 0x1406
const/4 v7, 0x0
const/16 v8, 0xc
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->vertexBuffer:Ljava/nio/FloatBuffer;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1600(Lim/tpelyyftgw/ui/components/InstantCameraView;)Ljava/nio/FloatBuffer;
move-result-object v9
invoke-static/range {v4 .. v9}, Landroid/opengl/GLES20;->glVertexAttribPointer(IIIZILjava/nio/Buffer;)V
.line 1194
iget v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->positionHandle:I
invoke-static {v0}, Landroid/opengl/GLES20;->glEnableVertexAttribArray(I)V
.line 1196
iget v4, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->textureHandle:I
const/4 v5, 0x2
const/16 v8, 0x8
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->textureBuffer:Ljava/nio/FloatBuffer;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1700(Lim/tpelyyftgw/ui/components/InstantCameraView;)Ljava/nio/FloatBuffer;
move-result-object v9
invoke-static/range {v4 .. v9}, Landroid/opengl/GLES20;->glVertexAttribPointer(IIIZILjava/nio/Buffer;)V
.line 1197
iget v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->textureHandle:I
invoke-static {v0}, Landroid/opengl/GLES20;->glEnableVertexAttribArray(I)V
.line 1199
iget v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->textureMatrixHandle:I
iget-object v4, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->mSTMatrix:[F
invoke-static {v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$1800(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v4
invoke-static {v0, v1, v2, v4, v2}, Landroid/opengl/GLES20;->glUniformMatrix4fv(IIZ[FI)V
.line 1200
iget v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->vertexMatrixHandle:I
iget-object v4, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->mMVPMatrix:[F
invoke-static {v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2100(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v4
invoke-static {v0, v1, v2, v4, v2}, Landroid/opengl/GLES20;->glUniformMatrix4fv(IIZ[FI)V
.line 1202
const/4 v0, 0x5
const/4 v1, 0x4
invoke-static {v0, v2, v1}, Landroid/opengl/GLES20;->glDrawArrays(III)V
.line 1204
iget v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->positionHandle:I
invoke-static {v0}, Landroid/opengl/GLES20;->glDisableVertexAttribArray(I)V
.line 1205
iget v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->textureHandle:I
invoke-static {v0}, Landroid/opengl/GLES20;->glDisableVertexAttribArray(I)V
.line 1206
invoke-static {v3, v2}, Landroid/opengl/GLES20;->glBindTexture(II)V
.line 1207
invoke-static {v2}, Landroid/opengl/GLES20;->glUseProgram(I)V
.line 1209
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
invoke-interface {v0, v1, v2}, Ljavax/microedition/khronos/egl/EGL10;->eglSwapBuffers(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;)Z
.line 1210
return-void
.end method
# virtual methods
.method public finish()V
.registers 7
.line 1137
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
const/4 v1, 0x0
if-eqz v0, :cond_1d
.line 1138
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
sget-object v3, Ljavax/microedition/khronos/egl/EGL10;->EGL_NO_SURFACE:Ljavax/microedition/khronos/egl/EGLSurface;
sget-object v4, Ljavax/microedition/khronos/egl/EGL10;->EGL_NO_SURFACE:Ljavax/microedition/khronos/egl/EGLSurface;
sget-object v5, Ljavax/microedition/khronos/egl/EGL10;->EGL_NO_CONTEXT:Ljavax/microedition/khronos/egl/EGLContext;
invoke-interface {v0, v2, v3, v4, v5}, Ljavax/microedition/khronos/egl/EGL10;->eglMakeCurrent(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLContext;)Z
.line 1139
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
iget-object v3, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
invoke-interface {v0, v2, v3}, Ljavax/microedition/khronos/egl/EGL10;->eglDestroySurface(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;)Z
.line 1140
iput-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
.line 1142
:cond_1d
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
if-eqz v0, :cond_2a
.line 1143
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v3, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
invoke-interface {v2, v3, v0}, Ljavax/microedition/khronos/egl/EGL10;->eglDestroyContext(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLContext;)Z
.line 1144
iput-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
.line 1146
:cond_2a
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
if-eqz v0, :cond_35
.line 1147
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v2, v0}, Ljavax/microedition/khronos/egl/EGL10;->eglTerminate(Ljavax/microedition/khronos/egl/EGLDisplay;)Z
.line 1148
iput-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
.line 1150
:cond_35
return-void
.end method
.method public handleMessage(Landroid/os/Message;)V
.registers 11
.param p1, "inputMessage" # Landroid/os/Message;
.line 1220
iget v0, p1, Landroid/os/Message;->what:I
.line 1222
.local v0, "what":I
if-eqz v0, :cond_12b
const/4 v1, 0x1
if-eq v0, v1, :cond_113
const/4 v2, 0x2
const/4 v3, 0x0
if-eq v0, v2, :cond_4b
const/4 v1, 0x3
if-eq v0, v1, :cond_10
goto/16 :goto_133
.line 1268
:cond_10
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_19
.line 1269
const-string v1, "set gl rednderer session"
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->d(Ljava/lang/String;)V
.line 1271
:cond_19
iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v1, Lim/tpelyyftgw/messenger/camera/CameraSession;
.line 1272
.local v1, "newSession":Lim/tpelyyftgw/messenger/camera/CameraSession;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->currentSession:Lim/tpelyyftgw/messenger/camera/CameraSession;
if-ne v2, v1, :cond_47
.line 1273
invoke-virtual {v2}, Lim/tpelyyftgw/messenger/camera/CameraSession;->getWorldAngle()I
move-result v2
iput v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->rotationAngle:I
.line 1274
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->mMVPMatrix:[F
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2100(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v2
invoke-static {v2, v3}, Landroid/opengl/Matrix;->setIdentityM([FI)V
.line 1275
iget v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->rotationAngle:I
if-eqz v2, :cond_133
.line 1276
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->mMVPMatrix:[F
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2100(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v3
const/4 v4, 0x0
iget v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->rotationAngle:I
int-to-float v5, v2
const/4 v6, 0x0
const/4 v7, 0x0
const/high16 v8, 0x3f800000 # 1.0f
invoke-static/range {v3 .. v8}, Landroid/opengl/Matrix;->rotateM([FIFFFF)V
goto/16 :goto_133
.line 1279
:cond_47
iput-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->currentSession:Lim/tpelyyftgw/messenger/camera/CameraSession;
.line 1281
goto/16 :goto_133
.line 1237
.end local v1 # "newSession":Lim/tpelyyftgw/messenger/camera/CameraSession;
:cond_4b
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
iget-object v4, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglDisplay:Ljavax/microedition/khronos/egl/EGLDisplay;
iget-object v5, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglSurface:Ljavax/microedition/khronos/egl/EGLSurface;
iget-object v6, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->eglContext:Ljavax/microedition/khronos/egl/EGLContext;
invoke-interface {v2, v4, v5, v5, v6}, Ljavax/microedition/khronos/egl/EGL10;->eglMakeCurrent(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLContext;)Z
move-result v2
if-nez v2, :cond_7c
.line 1238
sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v1, :cond_7b
.line 1239
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "eglMakeCurrent failed "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->egl10:Ljavax/microedition/khronos/egl/EGL10;
invoke-interface {v2}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
move-result v2
invoke-static {v2}, Landroid/opengl/GLUtils;->getEGLErrorString(I)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->d(Ljava/lang/String;)V
.line 1241
:cond_7b
return-void
.line 1244
:cond_7c
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
if-eqz v2, :cond_b2
.line 1245
iget-object v4, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->moldSTMatrix:[F
invoke-static {v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2400(Lim/tpelyyftgw/ui/components/InstantCameraView;)[F
move-result-object v4
invoke-virtual {v2, v4}, Landroid/graphics/SurfaceTexture;->getTransformMatrix([F)V
.line 1246
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
const/4 v4, 0x0
invoke-virtual {v2, v4}, Landroid/graphics/SurfaceTexture;->setOnFrameAvailableListener(Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;)V
.line 1247
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
invoke-virtual {v2}, Landroid/graphics/SurfaceTexture;->release()V
.line 1248
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->oldCameraTexture:[I
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2500(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v2
iget-object v4, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v4
aget v4, v4, v3
aput v4, v2, v3
.line 1249
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
const/4 v4, 0x0
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTextureAlpha:F
invoke-static {v2, v4}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2602(Lim/tpelyyftgw/ui/components/InstantCameraView;F)F
.line 1250
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v2
aput v3, v2, v3
.line 1252
:cond_b2
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraId:Ljava/lang/Integer;
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
move-result v2
add-int/2addr v2, v1
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
iput-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraId:Ljava/lang/Integer;
.line 1253
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# setter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraReady:Z
invoke-static {v2, v3}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2702(Lim/tpelyyftgw/ui/components/InstantCameraView;Z)Z
.line 1255
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v2
invoke-static {v1, v2, v3}, Landroid/opengl/GLES20;->glGenTextures(I[II)V
.line 1256
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v1}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v1
aget v1, v1, v3
const v2, 0x8d65
invoke-static {v2, v1}, Landroid/opengl/GLES20;->glBindTexture(II)V
.line 1257
const/16 v1, 0x2801
const/16 v4, 0x2601
invoke-static {v2, v1, v4}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1258
const/16 v1, 0x2800
invoke-static {v2, v1, v4}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1259
const/16 v1, 0x2802
const v4, 0x812f
invoke-static {v2, v1, v4}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1260
const/16 v1, 0x2803
invoke-static {v2, v1, v4}, Landroid/opengl/GLES20;->glTexParameteri(III)V
.line 1262
new-instance v1, Landroid/graphics/SurfaceTexture;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
# getter for: Lim/tpelyyftgw/ui/components/InstantCameraView;->cameraTexture:[I
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2000(Lim/tpelyyftgw/ui/components/InstantCameraView;)[I
move-result-object v2
aget v2, v2, v3
invoke-direct {v1, v2}, Landroid/graphics/SurfaceTexture;-><init>(I)V
iput-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
.line 1263
new-instance v2, Lim/tpelyyftgw/ui/components/-$$Lambda$InstantCameraView$CameraGLThread$EY6W0AdFzDQ9y8XeaXi2xVpxcsM;
invoke-direct {v2, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$InstantCameraView$CameraGLThread$EY6W0AdFzDQ9y8XeaXi2xVpxcsM;-><init>(Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;)V
invoke-virtual {v1, v2}, Landroid/graphics/SurfaceTexture;->setOnFrameAvailableListener(Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;)V
.line 1264
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraSurface:Landroid/graphics/SurfaceTexture;
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView;->createCamera(Landroid/graphics/SurfaceTexture;)V
invoke-static {v1, v2}, Lim/tpelyyftgw/ui/components/InstantCameraView;->access$2200(Lim/tpelyyftgw/ui/components/InstantCameraView;Landroid/graphics/SurfaceTexture;)V
.line 1265
goto :goto_133
.line 1227
:cond_113
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->finish()V
.line 1228
iget-boolean v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->recording:Z
if-eqz v1, :cond_121
.line 1229
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->videoEncoder:Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
iget v2, p1, Landroid/os/Message;->arg1:I
invoke-virtual {v1, v2}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->stopRecording(I)V
.line 1231
:cond_121
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
move-result-object v1
.line 1232
.local v1, "looper":Landroid/os/Looper;
if-eqz v1, :cond_133
.line 1233
invoke-virtual {v1}, Landroid/os/Looper;->quit()V
goto :goto_133
.line 1224
.end local v1 # "looper":Landroid/os/Looper;
:cond_12b
iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v1, Ljava/lang/Integer;
invoke-direct {p0, v1}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->onDraw(Ljava/lang/Integer;)V
.line 1225
nop
.line 1284
:cond_133
:goto_133
return-void
.end method
.method public synthetic lambda$handleMessage$1$InstantCameraView$CameraGLThread(Landroid/graphics/SurfaceTexture;)V
.registers 2
.param p1, "surfaceTexture" # Landroid/graphics/SurfaceTexture;
.line 1263
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->requestRender()V
return-void
.end method
.method public synthetic lambda$initGL$0$InstantCameraView$CameraGLThread(Landroid/graphics/SurfaceTexture;)V
.registers 2
.param p1, "surfaceTexture" # Landroid/graphics/SurfaceTexture;
.line 1120
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->requestRender()V
return-void
.end method
.method public reinitForNewCamera()V
.registers 4
.line 1130
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/InstantCameraView;->getHandler()Landroid/os/Handler;
move-result-object v0
.line 1131
.local v0, "handler":Landroid/os/Handler;
if-eqz v0, :cond_11
.line 1132
const/4 v1, 0x2
invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v1
const/4 v2, 0x0
invoke-virtual {p0, v1, v2}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->sendMessage(Landroid/os/Message;I)V
.line 1134
:cond_11
return-void
.end method
.method public requestRender()V
.registers 4
.line 1294
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/InstantCameraView;->getHandler()Landroid/os/Handler;
move-result-object v0
.line 1295
.local v0, "handler":Landroid/os/Handler;
if-eqz v0, :cond_12
.line 1296
iget-object v1, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->cameraId:Ljava/lang/Integer;
const/4 v2, 0x0
invoke-virtual {v0, v2, v1}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v1
invoke-virtual {p0, v1, v2}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->sendMessage(Landroid/os/Message;I)V
.line 1298
:cond_12
return-void
.end method
.method public run()V
.registers 2
.line 1214
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->initGL()Z
move-result v0
iput-boolean v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->initied:Z
.line 1215
invoke-super {p0}, Lim/tpelyyftgw/messenger/DispatchQueue;->run()V
.line 1216
return-void
.end method
.method public setCurrentSession(Lim/tpelyyftgw/messenger/camera/CameraSession;)V
.registers 5
.param p1, "session" # Lim/tpelyyftgw/messenger/camera/CameraSession;
.line 1153
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/InstantCameraView;->getHandler()Landroid/os/Handler;
move-result-object v0
.line 1154
.local v0, "handler":Landroid/os/Handler;
if-eqz v0, :cond_11
.line 1155
const/4 v1, 0x3
invoke-virtual {v0, v1, p1}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v1
const/4 v2, 0x0
invoke-virtual {p0, v1, v2}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->sendMessage(Landroid/os/Message;I)V
.line 1157
:cond_11
return-void
.end method
.method public shutdown(I)V
.registers 5
.param p1, "send" # I
.line 1287
iget-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->this$0:Lim/tpelyyftgw/ui/components/InstantCameraView;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/InstantCameraView;->getHandler()Landroid/os/Handler;
move-result-object v0
.line 1288
.local v0, "handler":Landroid/os/Handler;
if-eqz v0, :cond_11
.line 1289
const/4 v1, 0x1
const/4 v2, 0x0
invoke-virtual {v0, v1, p1, v2}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v1
invoke-virtual {p0, v1, v2}, Lim/tpelyyftgw/ui/components/InstantCameraView$CameraGLThread;->sendMessage(Landroid/os/Message;I)V
.line 1291
:cond_11
return-void
.end method