H264State.smali
.class public Lcom/facebook/common/h264/report/H264State;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final MASK_ERR:I = 0xc
.field public static final STAT_BIGO_ERR:I = 0x8
.field public static final STAT_BOUND:I = 0x2
.field public static final STAT_FUN_1:I = 0x10
.field public static final STAT_FUN_2:I = 0x20
.field public static final STAT_FUN_3:I = 0x40
.field public static final STAT_PLATFORM_ERR:I = 0x4
# instance fields
.field private final mStat:Ljava/util/concurrent/atomic/AtomicInteger;
# direct methods
.method public constructor <init>()V
.registers 3
.line 10
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 20
new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;
const/4 v1, 0x0
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V
iput-object v0, p0, Lcom/facebook/common/h264/report/H264State;->mStat:Ljava/util/concurrent/atomic/AtomicInteger;
return-void
.end method
.method private changeStatInSafe(I)V
.registers 5
.line 75
:cond_0
iget-object v0, p0, Lcom/facebook/common/h264/report/H264State;->mStat:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
or-int v1, v0, p1
.line 77
iget-object v2, p0, Lcom/facebook/common/h264/report/H264State;->mStat:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v2, v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
move-result v0
if-eqz v0, :cond_0
return-void
.end method
.method public static newStat()Lcom/facebook/common/h264/report/H264State;
.registers 1
.line 23
new-instance v0, Lcom/facebook/common/h264/report/H264State;
invoke-direct {v0}, Lcom/facebook/common/h264/report/H264State;-><init>()V
return-object v0
.end method
# virtual methods
.method public bigoErr()Lcom/facebook/common/h264/report/H264State;
.registers 2
const/16 v0, 0x8
.line 37
invoke-direct {p0, v0}, Lcom/facebook/common/h264/report/H264State;->changeStatInSafe(I)V
return-object p0
.end method
.method public bound()Lcom/facebook/common/h264/report/H264State;
.registers 2
const/4 v0, 0x2
.line 27
invoke-direct {p0, v0}, Lcom/facebook/common/h264/report/H264State;->changeStatInSafe(I)V
return-object p0
.end method
.method public func1()Lcom/facebook/common/h264/report/H264State;
.registers 2
const/16 v0, 0x10
.line 42
invoke-direct {p0, v0}, Lcom/facebook/common/h264/report/H264State;->changeStatInSafe(I)V
return-object p0
.end method
.method public func2()Lcom/facebook/common/h264/report/H264State;
.registers 2
const/16 v0, 0x20
.line 47
invoke-direct {p0, v0}, Lcom/facebook/common/h264/report/H264State;->changeStatInSafe(I)V
return-object p0
.end method
.method public func3()Lcom/facebook/common/h264/report/H264State;
.registers 2
const/16 v0, 0x40
.line 52
invoke-direct {p0, v0}, Lcom/facebook/common/h264/report/H264State;->changeStatInSafe(I)V
return-object p0
.end method
.method public isBound()Z
.registers 3
.line 57
iget-object v0, p0, Lcom/facebook/common/h264/report/H264State;->mStat:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
const/4 v1, 0x2
and-int/2addr v0, v1
if-ne v0, v1, :cond_c
const/4 v0, 0x1
return v0
:cond_c
const/4 v0, 0x0
return v0
.end method
.method public isBoundSuccess()Z
.registers 3
.line 61
iget-object v0, p0, Lcom/facebook/common/h264/report/H264State;->mStat:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
and-int/lit8 v0, v0, 0xe
const/4 v1, 0x2
if-ne v0, v1, :cond_d
const/4 v0, 0x1
return v0
:cond_d
const/4 v0, 0x0
return v0
.end method
.method public isDecodeSuccess()Z
.registers 2
.line 65
iget-object v0, p0, Lcom/facebook/common/h264/report/H264State;->mStat:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
and-int/lit8 v0, v0, 0xe
if-nez v0, :cond_c
const/4 v0, 0x1
return v0
:cond_c
const/4 v0, 0x0
return v0
.end method
.method public platformErr()Lcom/facebook/common/h264/report/H264State;
.registers 2
const/4 v0, 0x4
.line 32
invoke-direct {p0, v0}, Lcom/facebook/common/h264/report/H264State;->changeStatInSafe(I)V
return-object p0
.end method
.method public toInt()I
.registers 2
.line 69
iget-object v0, p0, Lcom/facebook/common/h264/report/H264State;->mStat:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
return v0
.end method
.method public toString()Ljava/lang/String;
.registers 7
.line 82
invoke-virtual {p0}, Lcom/facebook/common/h264/report/H264State;->isBound()Z
move-result v0
.line 83
invoke-virtual {p0}, Lcom/facebook/common/h264/report/H264State;->toInt()I
move-result v1
.line 84
invoke-static {p0}, Lcom/facebook/common/internal/Objects;->toStringHelper(Ljava/lang/Object;)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v2
const-string v3, "isBound"
.line 85
invoke-virtual {v2, v3, v0}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;Z)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v2
if-eqz v0, :cond_19
.line 86
invoke-virtual {p0}, Lcom/facebook/common/h264/report/H264State;->isBoundSuccess()Z
move-result v0
goto :goto_1d
:cond_19
invoke-virtual {p0}, Lcom/facebook/common/h264/report/H264State;->isDecodeSuccess()Z
move-result v0
:goto_1d
const-string v3, "success"
invoke-virtual {v2, v3, v0}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;Z)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v0
and-int/lit8 v2, v1, 0x8
const/16 v3, 0x8
const/4 v4, 0x1
const/4 v5, 0x0
if-ne v2, v3, :cond_2d
const/4 v2, 0x1
goto :goto_2e
:cond_2d
const/4 v2, 0x0
:goto_2e
const-string v3, "bigoErr"
.line 87
invoke-virtual {v0, v3, v2}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;Z)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v0
and-int/lit8 v2, v1, 0x4
const/4 v3, 0x4
if-ne v2, v3, :cond_3b
const/4 v2, 0x1
goto :goto_3c
:cond_3b
const/4 v2, 0x0
:goto_3c
const-string v3, "platformErr"
.line 88
invoke-virtual {v0, v3, v2}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;Z)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v0
and-int/lit8 v2, v1, 0x10
if-eqz v2, :cond_48
const/4 v2, 0x1
goto :goto_49
:cond_48
const/4 v2, 0x0
:goto_49
const-string v3, "func1"
.line 89
invoke-virtual {v0, v3, v2}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;Z)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v0
and-int/lit8 v2, v1, 0x20
if-eqz v2, :cond_55
const/4 v2, 0x1
goto :goto_56
:cond_55
const/4 v2, 0x0
:goto_56
const-string v3, "func2"
.line 90
invoke-virtual {v0, v3, v2}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;Z)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v0
and-int/lit8 v2, v1, 0x40
if-eqz v2, :cond_61
goto :goto_62
:cond_61
const/4 v4, 0x0
:goto_62
const-string v2, "func3"
.line 91
invoke-virtual {v0, v2, v4}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;Z)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v0
const-string v2, "int"
.line 92
invoke-virtual {v0, v2, v1}, Lcom/facebook/common/internal/Objects$ToStringHelper;->add(Ljava/lang/String;I)Lcom/facebook/common/internal/Objects$ToStringHelper;
move-result-object v0
.line 93
invoke-virtual {v0}, Lcom/facebook/common/internal/Objects$ToStringHelper;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method