InstantCameraView$EncoderHandler.smali
.class Lim/tpelyyftgw/ui/components/InstantCameraView$EncoderHandler;
.super Landroid/os/Handler;
.source "InstantCameraView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lim/tpelyyftgw/ui/components/InstantCameraView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0xa
name = "EncoderHandler"
.end annotation
# instance fields
.field private mWeakEncoder:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;)V
.registers 3
.param p1, "encoder" # Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
.line 1309
invoke-direct {p0}, Landroid/os/Handler;-><init>()V
.line 1310
new-instance v0, Ljava/lang/ref/WeakReference;
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$EncoderHandler;->mWeakEncoder:Ljava/lang/ref/WeakReference;
.line 1311
return-void
.end method
# virtual methods
.method public exit()V
.registers 2
.line 1358
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
move-result-object v0
invoke-virtual {v0}, Landroid/os/Looper;->quit()V
.line 1359
return-void
.end method
.method public handleMessage(Landroid/os/Message;)V
.registers 11
.param p1, "inputMessage" # Landroid/os/Message;
.line 1315
iget v0, p1, Landroid/os/Message;->what:I
.line 1316
.local v0, "what":I
iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
.line 1318
.local v1, "obj":Ljava/lang/Object;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/InstantCameraView$EncoderHandler;->mWeakEncoder:Ljava/lang/ref/WeakReference;
invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
.line 1319
.local v2, "encoder":Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;
if-nez v2, :cond_f
.line 1320
return-void
.line 1323
:cond_f
if-eqz v0, :cond_4a
const/4 v3, 0x1
if-eq v0, v3, :cond_3b
const/4 v3, 0x2
if-eq v0, v3, :cond_23
const/4 v3, 0x3
if-eq v0, v3, :cond_1b
goto :goto_67
.line 1351
:cond_1b
iget-object v3, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v3, Lim/tpelyyftgw/ui/components/InstantCameraView$AudioBufferInfo;
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->handleAudioFrameAvailable(Lim/tpelyyftgw/ui/components/InstantCameraView$AudioBufferInfo;)V
invoke-static {v2, v3}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->access$3100(Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;Lim/tpelyyftgw/ui/components/InstantCameraView$AudioBufferInfo;)V
goto :goto_67
.line 1345
:cond_23
iget v3, p1, Landroid/os/Message;->arg1:I
int-to-long v3, v3
const/16 v5, 0x20
shl-long/2addr v3, v5
iget v5, p1, Landroid/os/Message;->arg2:I
int-to-long v5, v5
const-wide v7, 0xffffffffL
and-long/2addr v5, v7
or-long/2addr v3, v5
.line 1346
.local v3, "timestamp":J
iget-object v5, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v5, Ljava/lang/Integer;
.line 1347
.local v5, "cameraId":Ljava/lang/Integer;
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->handleVideoFrameAvailable(JLjava/lang/Integer;)V
invoke-static {v2, v3, v4, v5}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->access$3000(Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;JLjava/lang/Integer;)V
.line 1348
goto :goto_67
.line 1338
.end local v3 # "timestamp":J
.end local v5 # "cameraId":Ljava/lang/Integer;
:cond_3b
sget-boolean v3, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v3, :cond_44
.line 1339
const-string v3, "stop encoder"
invoke-static {v3}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1341
:cond_44
iget v3, p1, Landroid/os/Message;->arg1:I
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->handleStopRecording(I)V
invoke-static {v2, v3}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->access$2900(Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;I)V
.line 1342
goto :goto_67
.line 1326
:cond_4a
:try_start_4a
sget-boolean v3, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z
if-eqz v3, :cond_53
.line 1327
const-string v3, "start encoder"
invoke-static {v3}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
.line 1329
:cond_53
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->prepareEncoder()V
invoke-static {v2}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->access$2800(Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;)V
:try_end_56
.catch Ljava/lang/Exception; {:try_start_4a .. :try_end_56} :catch_57
.line 1334
goto :goto_67
.line 1330
:catch_57
move-exception v3
.line 1331
.local v3, "e":Ljava/lang/Exception;
invoke-static {v3}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V
.line 1332
const/4 v4, 0x0
# invokes: Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->handleStopRecording(I)V
invoke-static {v2, v4}, Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;->access$2900(Lim/tpelyyftgw/ui/components/InstantCameraView$VideoRecorder;I)V
.line 1333
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
move-result-object v4
invoke-virtual {v4}, Landroid/os/Looper;->quit()V
.line 1335
.end local v3 # "e":Ljava/lang/Exception;
nop
.line 1355
:goto_67
return-void
.end method