VideoPusher$3.smali

.class Lcom/alivc/component/capture/VideoPusher$3;
.super Ljava/lang/Object;
.source "VideoPusher.java"

# interfaces
.implements Landroid/hardware/Camera$PreviewCallback;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/alivc/component/capture/VideoPusher;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/alivc/component/capture/VideoPusher;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method constructor <init>(Lcom/alivc/component/capture/VideoPusher;)V
    .registers 2
    .param p1, "this$0"    # Lcom/alivc/component/capture/VideoPusher;

    .line 349
    iput-object p1, p0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onPreviewFrame([BLandroid/hardware/Camera;)V
    .registers 23
    .param p1, "data"    # [B
    .param p2, "camera"    # Landroid/hardware/Camera;

    .line 352
    move-object/from16 v0, p0

    move-object/from16 v1, p2

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    .line 353
    .local v2, "time":J
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mVideoSourceListener:Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$800(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;

    move-result-object v4

    const-wide/16 v5, 0x0

    const-wide/16 v7, 0x3e8

    if-eqz v4, :cond_ca

    .line 354
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mTimeDelta:J
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$200(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v9

    cmp-long v4, v9, v5

    if-nez v4, :cond_2f

    .line 355
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v9

    mul-long v9, v9, v7

    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v11

    div-long/2addr v11, v7

    sub-long/2addr v9, v11

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mTimeDelta:J
    invoke-static {v4, v9, v10}, Lcom/alivc/component/capture/VideoPusher;->access$202(Lcom/alivc/component/capture/VideoPusher;J)J

    .line 357
    :cond_2f
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mPause:Z
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$900(Lcom/alivc/component/capture/VideoPusher;)Z

    move-result v4

    if-eqz v4, :cond_39

    goto/16 :goto_ca

    .line 363
    :cond_39
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;

    move-result-object v4

    if-eqz v4, :cond_ca

    .line 364
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mCustomRotation:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$400(Lcom/alivc/component/capture/VideoPusher;)I

    move-result v4

    const-wide/16 v9, 0x1

    if-lez v4, :cond_8b

    .line 365
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mVideoSourceListener:Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$800(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;

    move-result-object v11

    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v12

    div-long/2addr v12, v7

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mTimeDelta:J
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$200(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v14

    add-long/2addr v12, v14

    div-long v13, v12, v9

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    .line 366
    # getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;

    move-result-object v4

    invoke-virtual {v4}, Lcom/alivc/component/capture/VideoParam;->getCameraId()I

    move-result v15

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mCustomRotation:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$400(Lcom/alivc/component/capture/VideoPusher;)I

    move-result v16

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;

    move-result-object v4

    invoke-virtual {v4}, Lcom/alivc/component/capture/VideoParam;->getWidth()I

    move-result v17

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;

    move-result-object v4

    invoke-virtual {v4}, Lcom/alivc/component/capture/VideoParam;->getHeight()I

    move-result v18

    const/16 v19, 0x11

    .line 365
    move-object/from16 v12, p1

    invoke-interface/range {v11 .. v19}, Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;->onVideoFrame([BJIIIII)V

    goto :goto_ca

    .line 369
    :cond_8b
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mVideoSourceListener:Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$800(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;

    move-result-object v11

    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v12

    div-long/2addr v12, v7

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mTimeDelta:J
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$200(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v14

    add-long/2addr v12, v14

    div-long v13, v12, v9

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    .line 370
    # getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;

    move-result-object v4

    invoke-virtual {v4}, Lcom/alivc/component/capture/VideoParam;->getCameraId()I

    move-result v15

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mDataOrientation:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$500(Lcom/alivc/component/capture/VideoPusher;)I

    move-result v16

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;

    move-result-object v4

    invoke-virtual {v4}, Lcom/alivc/component/capture/VideoParam;->getWidth()I

    move-result v17

    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;

    move-result-object v4

    invoke-virtual {v4}, Lcom/alivc/component/capture/VideoParam;->getHeight()I

    move-result v18

    const/16 v19, 0x11

    .line 369
    move-object/from16 v12, p1

    invoke-interface/range {v11 .. v19}, Lcom/alivc/component/capture/VideoPusher$VideoSourceListener;->onVideoFrame([BJIIIII)V

    .line 376
    :cond_ca
    :goto_ca
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v9

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mLastCaptureTime:J
    invoke-static {v4, v9, v10}, Lcom/alivc/component/capture/VideoPusher;->access$602(Lcom/alivc/component/capture/VideoPusher;J)J

    .line 377
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # operator++ for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCounter:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$708(Lcom/alivc/component/capture/VideoPusher;)I

    .line 380
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCountTime:J
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$1000(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v9

    cmp-long v4, v9, v5

    if-nez v4, :cond_eb

    .line 381
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastCaptureTime:J
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$600(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v5

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCountTime:J
    invoke-static {v4, v5, v6}, Lcom/alivc/component/capture/VideoPusher;->access$1002(Lcom/alivc/component/capture/VideoPusher;J)J

    .line 383
    :cond_eb
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastCaptureTime:J
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$600(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v4

    iget-object v6, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCountTime:J
    invoke-static {v6}, Lcom/alivc/component/capture/VideoPusher;->access$1000(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v9

    sub-long/2addr v4, v9

    cmp-long v6, v4, v7

    if-lez v6, :cond_154

    .line 384
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "StatLog: video capture fps = "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v5, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCounter:I
    invoke-static {v5}, Lcom/alivc/component/capture/VideoPusher;->access$700(Lcom/alivc/component/capture/VideoPusher;)I

    move-result v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    const-string v5, "VideoPusher"

    invoke-static {v5, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 385
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCounter:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$700(Lcom/alivc/component/capture/VideoPusher;)I

    move-result v5

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mCurrentFps:I
    invoke-static {v4, v5}, Lcom/alivc/component/capture/VideoPusher;->access$1102(Lcom/alivc/component/capture/VideoPusher;I)I

    .line 386
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCounter:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$700(Lcom/alivc/component/capture/VideoPusher;)I

    move-result v4

    const/16 v5, 0xc

    const/4 v6, 0x0

    if-ge v4, v5, :cond_141

    .line 387
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mBelowMinFpsNumberTimes:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$1200(Lcom/alivc/component/capture/VideoPusher;)I

    move-result v4

    const/4 v5, 0x5

    if-le v4, v5, :cond_13b

    .line 389
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mBelowMinFpsNumberTimes:I
    invoke-static {v4, v6}, Lcom/alivc/component/capture/VideoPusher;->access$1202(Lcom/alivc/component/capture/VideoPusher;I)I

    goto :goto_146

    .line 391
    :cond_13b
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # operator++ for: Lcom/alivc/component/capture/VideoPusher;->mBelowMinFpsNumberTimes:I
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$1208(Lcom/alivc/component/capture/VideoPusher;)I

    goto :goto_146

    .line 394
    :cond_141
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mBelowMinFpsNumberTimes:I
    invoke-static {v4, v6}, Lcom/alivc/component/capture/VideoPusher;->access$1202(Lcom/alivc/component/capture/VideoPusher;I)I

    .line 397
    :goto_146
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCounter:I
    invoke-static {v4, v6}, Lcom/alivc/component/capture/VideoPusher;->access$702(Lcom/alivc/component/capture/VideoPusher;I)I

    .line 398
    iget-object v4, v0, Lcom/alivc/component/capture/VideoPusher$3;->this$0:Lcom/alivc/component/capture/VideoPusher;

    # getter for: Lcom/alivc/component/capture/VideoPusher;->mLastCaptureTime:J
    invoke-static {v4}, Lcom/alivc/component/capture/VideoPusher;->access$600(Lcom/alivc/component/capture/VideoPusher;)J

    move-result-wide v5

    # setter for: Lcom/alivc/component/capture/VideoPusher;->mLastFpsCountTime:J
    invoke-static {v4, v5, v6}, Lcom/alivc/component/capture/VideoPusher;->access$1002(Lcom/alivc/component/capture/VideoPusher;J)J

    .line 400
    :cond_154
    if-eqz v1, :cond_15c

    .line 401
    move-object/from16 v4, p1

    invoke-virtual {v1, v4}, Landroid/hardware/Camera;->addCallbackBuffer([B)V

    goto :goto_15e

    .line 400
    :cond_15c
    move-object/from16 v4, p1

    .line 403
    :goto_15e
    return-void
.end method