MMCAVPlayerTextureView.smali

.class public Lcom/mmc/player/MMCAVPlayerTextureView;
.super Landroid/view/TextureView;
.source "SourceFile"

# interfaces
.implements Lcom/mmc/player/IMMCAVPlayerView;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;
    }
.end annotation


# static fields
.field private static final MIN_VALUE:I = 0x64

.field private static final TAG:Ljava/lang/String; = "MMCAVPlayerTextureView"


# instance fields
.field private MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

.field private final PREFIX:Ljava/lang/String;

.field private addSurface:Landroid/view/Surface;

.field private disableTextureFps:Z

.field private enableReport:Z

.field private volatile enableSetNullSurface:Z

.field private mAnalysisListener:Lcom/mmc/player/analyze/MMCAnalysisListener;

.field private mMMCTextureViewListener:Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;

.field private mRenderMode:I

.field private mRenderRotation:I

.field private mSnapshotRunning:Z

.field private mSurface:Landroid/view/Surface;

.field private mSurfaceTexture:Landroid/graphics/SurfaceTexture;

.field private mVideoHeight:I

.field private mVideoRotation:I

.field private mVideoWidth:I

.field private final matrix:Landroid/graphics/Matrix;

.field private volatile renderByGL:Z

.field private rotation:I

.field private videoHeight:I

.field private videoWidth:I

.field private viewHeight:I

.field private viewWidth:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 4

    .line 1
    invoke-direct {p0, p1}, Landroid/view/TextureView;-><init>(Landroid/content/Context;)V

    const-string v0, "["

    .line 2
    invoke-static {v0}, Landroid/support/v4/media/c;->c(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 3
    invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I

    move-result v1

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

    const-string 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

    iput-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->PREFIX:Ljava/lang/String;

    const/4 v0, 0x0

    .line 4
    iput-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSnapshotRunning:Z

    .line 5
    new-instance v1, Landroid/graphics/Matrix;

    invoke-direct {v1}, Landroid/graphics/Matrix;-><init>()V

    iput-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    const/4 v1, 0x1

    .line 6
    iput v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    .line 7
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 8
    iput-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    .line 9
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    .line 10
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    .line 11
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoWidth:I

    .line 12
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoHeight:I

    .line 13
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->rotation:I

    .line 14
    iput-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableReport:Z

    .line 15
    iput-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableSetNullSurface:Z

    .line 16
    iput-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->disableTextureFps:Z

    .line 17
    invoke-direct {p0, p1}, Lcom/mmc/player/MMCAVPlayerTextureView;->initView(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4

    .line 21
    invoke-direct {p0, p1, p2}, Landroid/view/TextureView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const-string p2, "["

    .line 22
    invoke-static {p2}, Landroid/support/v4/media/c;->c(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p2

    .line 23
    invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I

    move-result v0

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

    const-string v0, "]"

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

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

    move-result-object p2

    iput-object p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->PREFIX:Ljava/lang/String;

    const/4 p2, 0x0

    .line 24
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSnapshotRunning:Z

    .line 25
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    const/4 v0, 0x1

    .line 26
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    .line 27
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 28
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    .line 29
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    .line 30
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    .line 31
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoWidth:I

    .line 32
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoHeight:I

    .line 33
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->rotation:I

    .line 34
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableReport:Z

    .line 35
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableSetNullSurface:Z

    .line 36
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->disableTextureFps:Z

    .line 37
    invoke-direct {p0, p1}, Lcom/mmc/player/MMCAVPlayerTextureView;->initView(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 4

    .line 41
    invoke-direct {p0, p1, p2, p3}, Landroid/view/TextureView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const-string p2, "["

    .line 42
    invoke-static {p2}, Landroid/support/v4/media/c;->c(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p2

    .line 43
    invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I

    move-result p3

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

    const-string p3, "]"

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

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

    move-result-object p2

    iput-object p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->PREFIX:Ljava/lang/String;

    const/4 p2, 0x0

    .line 44
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSnapshotRunning:Z

    .line 45
    new-instance p3, Landroid/graphics/Matrix;

    invoke-direct {p3}, Landroid/graphics/Matrix;-><init>()V

    iput-object p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    const/4 p3, 0x1

    .line 46
    iput p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    .line 47
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 48
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    .line 49
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    .line 50
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    .line 51
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoWidth:I

    .line 52
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoHeight:I

    .line 53
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->rotation:I

    .line 54
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableReport:Z

    .line 55
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableSetNullSurface:Z

    .line 56
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->disableTextureFps:Z

    .line 57
    invoke-direct {p0, p1}, Lcom/mmc/player/MMCAVPlayerTextureView;->initView(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
    .registers 5
    .annotation build Landroid/annotation/TargetApi;
        value = 0x15
    .end annotation

    .line 61
    invoke-direct {p0, p1, p2, p3, p4}, Landroid/view/TextureView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V

    const-string p2, "["

    .line 62
    invoke-static {p2}, Landroid/support/v4/media/c;->c(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p2

    .line 63
    invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I

    move-result p3

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

    const-string p3, "]"

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

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

    move-result-object p2

    iput-object p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->PREFIX:Ljava/lang/String;

    const/4 p2, 0x0

    .line 64
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSnapshotRunning:Z

    .line 65
    new-instance p3, Landroid/graphics/Matrix;

    invoke-direct {p3}, Landroid/graphics/Matrix;-><init>()V

    iput-object p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    const/4 p3, 0x1

    .line 66
    iput p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    .line 67
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 68
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    .line 69
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    .line 70
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    .line 71
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoWidth:I

    .line 72
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoHeight:I

    .line 73
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->rotation:I

    .line 74
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableReport:Z

    .line 75
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableSetNullSurface:Z

    .line 76
    iput-boolean p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->disableTextureFps:Z

    .line 77
    invoke-direct {p0, p1}, Lcom/mmc/player/MMCAVPlayerTextureView;->initView(Landroid/content/Context;)V

    return-void
.end method

.method public static synthetic a(Lcom/mmc/player/MMCAVPlayerTextureView;Lcom/mmc/player/SnapshotListener;Landroid/graphics/Bitmap;)V
    .registers 3

    invoke-direct {p0, p1, p2}, Lcom/mmc/player/MMCAVPlayerTextureView;->lambda$postBitmapToMainThread$0(Lcom/mmc/player/SnapshotListener;Landroid/graphics/Bitmap;)V

    return-void
.end method

.method public static synthetic access$100(Lcom/mmc/player/MMCAVPlayerTextureView;)V
    .registers 1

    invoke-direct {p0}, Lcom/mmc/player/MMCAVPlayerTextureView;->onSurfaceTextureDestroyed()V

    return-void
.end method

.method public static synthetic access$200(Lcom/mmc/player/MMCAVPlayerTextureView;)Z
    .registers 1

    iget-boolean p0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->disableTextureFps:Z

    return p0
.end method

.method public static synthetic access$300(Lcom/mmc/player/MMCAVPlayerTextureView;)Lcom/mmc/player/MMCMediaPlayer;
    .registers 1

    iget-object p0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    return-object p0
.end method

.method private adjustAspectRotation(II)V
    .registers 11

    .line 1
    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    if-eqz v0, :cond_5

    return-void

    .line 2
    :cond_5
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    if-lez v0, :cond_c9

    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    if-lez v0, :cond_c9

    .line 3
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    invoke-virtual {v0}, Landroid/graphics/Matrix;->reset()V

    .line 4
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoRotation:I

    const/16 v1, 0x10e

    if-eqz v0, :cond_36

    .line 5
    iget-object v2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    int-to-float v0, v0

    div-int/lit8 v3, p1, 0x2

    int-to-float v3, v3

    div-int/lit8 v4, p2, 0x2

    int-to-float v4, v4

    invoke-virtual {v2, v0, v3, v4}, Landroid/graphics/Matrix;->postRotate(FFF)Z

    .line 6
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoRotation:I

    const/16 v2, 0x5a

    if-eq v0, v2, :cond_2c

    if-ne v0, v1, :cond_36

    .line 7
    :cond_2c
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    int-to-float v2, p1

    int-to-float v5, p2

    div-float v6, v2, v5

    div-float/2addr v5, v2

    invoke-virtual {v0, v6, v5, v3, v4}, Landroid/graphics/Matrix;->postScale(FFFF)Z

    .line 8
    :cond_36
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    .line 9
    iget v2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    int-to-double v2, v2

    int-to-double v4, v0

    div-double/2addr v2, v4

    .line 10
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    if-nez v0, :cond_84

    int-to-double v4, p1

    mul-double v6, v4, v2

    double-to-int v0, v6

    if-le p2, v0, :cond_54

    .line 11
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    if-ne v0, v1, :cond_4f

    div-double/2addr v4, v2

    double-to-int v0, v4

    move v2, p1

    goto :goto_61

    :cond_4f
    int-to-double v4, p2

    div-double/2addr v4, v2

    double-to-int v0, v4

    move v2, p2

    goto :goto_61

    .line 12
    :cond_54
    iget v4, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    if-ne v4, v1, :cond_5f

    int-to-double v4, p2

    mul-double v4, v4, v2

    double-to-int v0, v4

    move v2, v0

    move v0, p2

    goto :goto_61

    :cond_5f
    move v2, v0

    move v0, p1

    .line 13
    :goto_61
    iget-object v3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    int-to-float v0, v0

    int-to-float v4, p1

    div-float/2addr v0, v4

    int-to-float v2, v2

    int-to-float v4, p2

    div-float/2addr v2, v4

    div-int/lit8 p1, p1, 0x2

    int-to-float p1, p1

    div-int/lit8 p2, p2, 0x2

    int-to-float p2, p2

    invoke-virtual {v3, v0, v2, p1, p2}, Landroid/graphics/Matrix;->postScale(FFFF)Z

    .line 14
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    if-ne v0, v1, :cond_7e

    .line 15
    iget-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    rsub-int v0, v0, 0x168

    int-to-float v0, v0

    invoke-virtual {v1, v0, p1, p2}, Landroid/graphics/Matrix;->postRotate(FFF)Z

    .line 16
    :cond_7e
    iget-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    invoke-virtual {p0, p1}, Landroid/view/TextureView;->setTransform(Landroid/graphics/Matrix;)V

    goto :goto_c9

    :cond_84
    const/4 v4, 0x1

    if-ne v0, v4, :cond_c9

    int-to-double v4, p1

    mul-double v6, v4, v2

    double-to-int v0, v6

    if-le p2, v0, :cond_9b

    .line 17
    iget v4, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    if-ne v4, v1, :cond_98

    int-to-double v4, p2

    mul-double v4, v4, v2

    double-to-int v0, v4

    move v2, v0

    move v0, p2

    goto :goto_a7

    :cond_98
    move v2, v0

    move v0, p1

    goto :goto_a7

    .line 18
    :cond_9b
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    if-ne v0, v1, :cond_a3

    div-double/2addr v4, v2

    double-to-int v0, v4

    move v2, p1

    goto :goto_a7

    :cond_a3
    int-to-double v4, p2

    div-double/2addr v4, v2

    double-to-int v0, v4

    move v2, p2

    .line 19
    :goto_a7
    iget-object v3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    int-to-float v0, v0

    int-to-float v4, p1

    div-float/2addr v0, v4

    int-to-float v2, v2

    int-to-float v4, p2

    div-float/2addr v2, v4

    div-int/lit8 p1, p1, 0x2

    int-to-float p1, p1

    div-int/lit8 p2, p2, 0x2

    int-to-float p2, p2

    invoke-virtual {v3, v0, v2, p1, p2}, Landroid/graphics/Matrix;->postScale(FFFF)Z

    .line 20
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    if-ne v0, v1, :cond_c4

    .line 21
    iget-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    rsub-int v0, v0, 0x168

    int-to-float v0, v0

    invoke-virtual {v1, v0, p1, p2}, Landroid/graphics/Matrix;->postRotate(FFF)Z

    .line 22
    :cond_c4
    iget-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->matrix:Landroid/graphics/Matrix;

    invoke-virtual {p0, p1}, Landroid/view/TextureView;->setTransform(Landroid/graphics/Matrix;)V

    :cond_c9
    :goto_c9
    return-void
.end method

.method private initView(Landroid/content/Context;)V
    .registers 2

    const-string p1, "mmc_render_by_gl"

    .line 1
    invoke-static {p1}, Lcom/mmc/player/config/MMCConfigManager;->getBooleanForKey(Ljava/lang/String;)Z

    move-result p1

    iput-boolean p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    .line 2
    new-instance p1, Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;

    invoke-direct {p1, p0}, Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;-><init>(Lcom/mmc/player/MMCAVPlayerTextureView;)V

    iput-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mMMCTextureViewListener:Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;

    .line 3
    invoke-virtual {p0, p1}, Landroid/view/TextureView;->setSurfaceTextureListener(Landroid/view/TextureView$SurfaceTextureListener;)V

    const-string p1, "mmc_enable_set_null_surface_while_destroy"

    .line 4
    invoke-static {p1}, Lcom/mmc/player/config/MMCConfigManager;->getBooleanForKey(Ljava/lang/String;)Z

    move-result p1

    iput-boolean p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableSetNullSurface:Z

    const-string p1, "disable_texture_fps"

    .line 5
    invoke-static {p1}, Lcom/mmc/player/config/MMCConfigManager;->getBooleanForKey(Ljava/lang/String;)Z

    move-result p1

    iput-boolean p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->disableTextureFps:Z

    return-void
.end method

.method private synthetic lambda$postBitmapToMainThread$0(Lcom/mmc/player/SnapshotListener;Landroid/graphics/Bitmap;)V
    .registers 3

    if-eqz p1, :cond_5

    .line 1
    invoke-interface {p1, p2}, Lcom/mmc/player/SnapshotListener;->onSnapshot(Landroid/graphics/Bitmap;)V

    :cond_5
    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSnapshotRunning:Z

    return-void
.end method

.method private onSurfaceTextureDestroyed()V
    .registers 3

    .line 1
    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    const/4 v1, 0x0

    if-nez v0, :cond_9

    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->enableSetNullSurface:Z

    if-eqz v0, :cond_e

    .line 2
    :cond_9
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {v0, v1}, Lcom/mmc/player/MMCMediaPlayer;->setRenderSurface(Landroid/view/Surface;)V

    .line 3
    :cond_e
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    if-eqz v0, :cond_17

    .line 4
    invoke-virtual {v0}, Landroid/view/Surface;->release()V

    .line 5
    iput-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    :cond_17
    return-void
.end method

.method private postBitmapToMainThread(Lcom/mmc/player/SnapshotListener;Landroid/graphics/Bitmap;)V
    .registers 6

    if-eqz p1, :cond_14

    .line 1
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    .line 2
    new-instance v1, Lcom/google/android/exoplayer2/video/j;

    const/4 v2, 0x1

    invoke-direct {v1, p0, p1, p2, v2}, Lcom/google/android/exoplayer2/video/j;-><init>(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;I)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_14
    return-void
.end method

.method private setRenderSurface(Landroid/view/Surface;II)V
    .registers 5

    if-eqz p1, :cond_6

    if-lez p2, :cond_6

    if-gtz p3, :cond_9

    .line 1
    :cond_6
    invoke-static {p1}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    :cond_9
    if-eqz p1, :cond_66

    if-lez p2, :cond_66

    if-lez p3, :cond_66

    .line 2
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->addSurface:Landroid/view/Surface;

    if-ne p1, v0, :cond_1c

    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    if-ne p2, v0, :cond_1c

    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    if-ne p3, v0, :cond_1c

    return-void

    .line 3
    :cond_1c
    iput-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->addSurface:Landroid/view/Surface;

    .line 4
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    .line 5
    iput p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    .line 6
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->addSurface:Landroid/view/Surface;

    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    .line 7
    new-instance v0, Lcom/mmc/player/common/MMCRenderSurface;

    invoke-direct {v0}, Lcom/mmc/player/common/MMCRenderSurface;-><init>()V

    .line 8
    iput p2, v0, Lcom/mmc/player/common/MMCRenderSurface;->mParentWidth:I

    .line 9
    iput p3, v0, Lcom/mmc/player/common/MMCRenderSurface;->mParentHeight:I

    .line 10
    iput-object p1, v0, Lcom/mmc/player/common/MMCRenderSurface;->mSurface:Ljava/lang/Object;

    .line 11
    new-instance p2, Lcom/mmc/player/common/MMCAttributes;

    invoke-direct {p2}, Lcom/mmc/player/common/MMCAttributes;-><init>()V

    const-string p3, "attr_obj_addRenderSurface"

    .line 12
    invoke-virtual {p2, p3, v0}, Lcom/mmc/player/common/MMCAttributes;->setObject(Ljava/lang/String;Ljava/lang/Object;)Lcom/mmc/player/common/MMCAttributes;

    .line 13
    iget-object p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    if-eqz p3, :cond_66

    .line 14
    invoke-virtual {p3}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p3

    if-eqz p3, :cond_5c

    .line 15
    iget-object p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p3}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p3

    invoke-virtual {p3, p2}, Lcom/mmc/player/render/SurfaceRender;->setOpt(Lcom/mmc/player/common/MMCAttributes;)I

    .line 16
    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    iget-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    .line 17
    invoke-virtual {p1}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p1

    invoke-static {p1}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_66

    .line 18
    :cond_5c
    iget-object p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    invoke-static {p2}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    .line 19
    iget-object p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p2, p1}, Lcom/mmc/player/MMCMediaPlayer;->setSurface(Landroid/view/Surface;)V

    :cond_66
    :goto_66
    return-void
.end method

.method private setSurfaceRenderMode(I)V
    .registers 4

    .line 1
    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    if-eqz v0, :cond_23

    .line 2
    new-instance v0, Lcom/mmc/player/common/MMCAttributes;

    invoke-direct {v0}, Lcom/mmc/player/common/MMCAttributes;-><init>()V

    .line 3
    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    const-string v1, "attr_uint32_setScaleMode"

    invoke-virtual {v0, v1, p1}, Lcom/mmc/player/common/MMCAttributes;->setObject(Ljava/lang/String;Ljava/lang/Object;)Lcom/mmc/player/common/MMCAttributes;

    .line 4
    iget-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p1}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p1

    if-eqz p1, :cond_23

    .line 5
    iget-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p1}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p1

    invoke-virtual {p1, v0}, Lcom/mmc/player/render/SurfaceRender;->setOpt(Lcom/mmc/player/common/MMCAttributes;)I

    :cond_23
    return-void
.end method

.method private updateConfig(II)V
    .registers 4

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, p2, v0}, Lcom/mmc/player/MMCAVPlayerTextureView;->updateConfig(IIF)V

    return-void
.end method

.method private updateConfig(IIF)V
    .registers 5

    .line 2
    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    if-eqz v0, :cond_59

    .line 3
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoWidth:I

    if-ne p1, v0, :cond_14

    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoHeight:I

    if-ne p2, v0, :cond_14

    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->rotation:I

    int-to-float v0, v0

    cmpl-float v0, p3, v0

    if-nez v0, :cond_14

    return-void

    .line 4
    :cond_14
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoWidth:I

    .line 5
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->videoHeight:I

    float-to-int v0, p3

    .line 6
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->rotation:I

    .line 7
    new-instance v0, Lcom/mmc/player/common/MMCConfiguration;

    invoke-direct {v0}, Lcom/mmc/player/common/MMCConfiguration;-><init>()V

    .line 8
    iput p1, v0, Lcom/mmc/player/common/MMCConfiguration;->mVideoWidth:I

    .line 9
    iput p2, v0, Lcom/mmc/player/common/MMCConfiguration;->mVideoHeight:I

    .line 10
    iget-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p1}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p1

    if-eqz p1, :cond_35

    .line 11
    iget-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p1}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p1

    invoke-virtual {p1, v0}, Lcom/mmc/player/render/SurfaceRender;->configure(Lcom/mmc/player/common/MMCConfiguration;)I

    :cond_35
    const/4 p1, 0x0

    cmpl-float p1, p3, p1

    if-eqz p1, :cond_59

    .line 12
    new-instance p1, Lcom/mmc/player/common/MMCAttributes;

    invoke-direct {p1}, Lcom/mmc/player/common/MMCAttributes;-><init>()V

    .line 13
    invoke-static {p3}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object p2

    const-string p3, "attr_float_rotateAngle"

    invoke-virtual {p1, p3, p2}, Lcom/mmc/player/common/MMCAttributes;->setObject(Ljava/lang/String;Ljava/lang/Object;)Lcom/mmc/player/common/MMCAttributes;

    .line 14
    iget-object p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p2}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p2

    if-eqz p2, :cond_59

    .line 15
    iget-object p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {p2}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object p2

    invoke-virtual {p2, p1}, Lcom/mmc/player/render/SurfaceRender;->setOpt(Lcom/mmc/player/common/MMCAttributes;)I

    :cond_59
    return-void
.end method

.method private updateViewSize(II)V
    .registers 4

    .line 1
    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    if-eqz v0, :cond_15

    const/16 v0, 0x64

    if-le p1, v0, :cond_15

    if-gt p2, v0, :cond_b

    goto :goto_15

    .line 2
    :cond_b
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    invoke-direct {p0, v0, p1, p2}, Lcom/mmc/player/MMCAVPlayerTextureView;->setRenderSurface(Landroid/view/Surface;II)V

    .line 3
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    .line 4
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    nop

    :cond_15
    :goto_15
    return-void
.end method


# virtual methods
.method public getView()Landroid/view/View;
    .registers 1

    return-object p0
.end method

.method public onAttachedToWindow()V
    .registers 1

    invoke-super {p0}, Landroid/view/TextureView;->onAttachedToWindow()V

    return-void
.end method

.method public onDetachedFromWindow()V
    .registers 2

    .line 1
    invoke-super {p0}, Landroid/view/View;->onDetachedFromWindow()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mAnalysisListener:Lcom/mmc/player/analyze/MMCAnalysisListener;

    return-void
.end method

.method public onLayout(ZIIII)V
    .registers 6

    .line 1
    invoke-super/range {p0 .. p5}, Landroid/view/View;->onLayout(ZIIII)V

    .line 2
    invoke-virtual {p0}, Landroid/view/View;->getWidth()I

    move-result p1

    .line 3
    invoke-virtual {p0}, Landroid/view/View;->getHeight()I

    move-result p2

    .line 4
    invoke-direct {p0, p1, p2}, Lcom/mmc/player/MMCAVPlayerTextureView;->updateViewSize(II)V

    .line 5
    invoke-direct {p0, p1, p2}, Lcom/mmc/player/MMCAVPlayerTextureView;->adjustAspectRotation(II)V

    return-void
.end method

.method public release()V
    .registers 2

    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    if-nez v0, :cond_5

    goto :goto_8

    :cond_5
    invoke-virtual {v0}, Lcom/mmc/player/MMCMediaPlayer;->getContext()Ljava/lang/String;

    :goto_8
    invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I

    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurfaceTexture:Landroid/graphics/SurfaceTexture;

    if-eqz v0, :cond_18

    invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I

    move-result v0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    goto :goto_1a

    :cond_18
    const-string v0, "null"

    :goto_1a
    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    return-void
.end method

.method public setAnalysisListener(Lcom/mmc/player/analyze/MMCAnalysisListener;)V
    .registers 2

    iput-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mAnalysisListener:Lcom/mmc/player/analyze/MMCAnalysisListener;

    return-void
.end method

.method public setPlayer(Lcom/mmc/player/MMCMediaPlayer;)V
    .registers 2

    if-eqz p1, :cond_8

    .line 1
    invoke-virtual {p1}, Ljava/lang/Object;->hashCode()I

    invoke-virtual {p1}, Lcom/mmc/player/MMCMediaPlayer;->getContext()Ljava/lang/String;

    .line 2
    :cond_8
    iput-object p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    if-eqz p1, :cond_f

    .line 3
    invoke-virtual {p1, p0}, Lcom/mmc/player/MMCMediaPlayer;->setTextureView(Lcom/mmc/player/MMCAVPlayerTextureView;)V

    :cond_f
    return-void
.end method

.method public setRenderMode(I)V
    .registers 2

    .line 1
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    .line 2
    invoke-direct {p0, p1}, Lcom/mmc/player/MMCAVPlayerTextureView;->setSurfaceRenderMode(I)V

    .line 3
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public setRenderModeAndOrientation(II)V
    .registers 3

    .line 1
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    .line 2
    invoke-direct {p0, p1}, Lcom/mmc/player/MMCAVPlayerTextureView;->setSurfaceRenderMode(I)V

    .line 3
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 4
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public setRenderModeAndRotation(II)V
    .registers 3

    .line 1
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderMode:I

    .line 2
    invoke-direct {p0, p1}, Lcom/mmc/player/MMCAVPlayerTextureView;->setSurfaceRenderMode(I)V

    .line 3
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 4
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public setRenderOrientation(I)V
    .registers 2

    .line 1
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 2
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public setRenderRotation(I)V
    .registers 2

    .line 1
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mRenderRotation:I

    .line 2
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public setVideoRotation(I)V
    .registers 5

    const/16 v0, 0x5a

    if-eq p1, v0, :cond_8

    const/16 v0, 0x10e

    if-ne p1, v0, :cond_10

    .line 1
    :cond_8
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    .line 2
    iget v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    iput v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    .line 3
    iput v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    .line 4
    :cond_10
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    iget v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    int-to-float v2, p1

    invoke-direct {p0, v0, v1, v2}, Lcom/mmc/player/MMCAVPlayerTextureView;->updateConfig(IIF)V

    .line 5
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoRotation:I

    .line 6
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public setVideoSize(II)V
    .registers 5

    .line 1
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoRotation:I

    const/16 v1, 0x5a

    if-eq v0, v1, :cond_10

    const/16 v1, 0x10e

    if-ne v0, v1, :cond_b

    goto :goto_10

    .line 2
    :cond_b
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    .line 3
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    goto :goto_14

    .line 4
    :cond_10
    :goto_10
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    .line 5
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    .line 6
    :goto_14
    iget p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    iget p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    .line 7
    invoke-direct {p0, p1, p2}, Lcom/mmc/player/MMCAVPlayerTextureView;->updateConfig(II)V

    .line 8
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public setVideoSizeAndRotation(III)V
    .registers 6

    .line 1
    iget v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoRotation:I

    const/16 v1, 0x5a

    if-eq v0, v1, :cond_10

    const/16 v1, 0x10e

    if-ne v0, v1, :cond_b

    goto :goto_10

    .line 2
    :cond_b
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    .line 3
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    goto :goto_14

    .line 4
    :cond_10
    :goto_10
    iput p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    .line 5
    iput p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    .line 6
    :goto_14
    iget p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoWidth:I

    iget p2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoHeight:I

    int-to-float v0, p3

    .line 7
    invoke-direct {p0, p1, p2, v0}, Lcom/mmc/player/MMCAVPlayerTextureView;->updateConfig(IIF)V

    .line 8
    iput p3, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mVideoRotation:I

    .line 9
    invoke-virtual {p0}, Landroid/view/View;->requestLayout()V

    return-void
.end method

.method public snapshot(Lcom/mmc/player/SnapshotListener;)V
    .registers 10

    .line 1
    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSnapshotRunning:Z

    const/4 v1, 0x0

    if-eqz v0, :cond_e

    if-eqz p1, :cond_a

    .line 2
    invoke-interface {p1, v1}, Lcom/mmc/player/SnapshotListener;->onSnapshot(Landroid/graphics/Bitmap;)V

    :cond_a
    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSnapshotRunning:Z

    goto :goto_2e

    .line 4
    :cond_e
    invoke-virtual {p0}, Landroid/view/TextureView;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v7

    if-eqz v7, :cond_2e

    .line 5
    invoke-virtual {p0, v1}, Landroid/view/TextureView;->getTransform(Landroid/graphics/Matrix;)Landroid/graphics/Matrix;

    move-result-object v5

    const/4 v1, 0x0

    const/4 v2, 0x0

    .line 6
    invoke-virtual {v7}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    invoke-virtual {v7}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    const/4 v6, 0x1

    move-object v0, v7

    .line 7
    invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 8
    invoke-virtual {v7}, Landroid/graphics/Bitmap;->recycle()V

    .line 9
    invoke-direct {p0, p1, v0}, Lcom/mmc/player/MMCAVPlayerTextureView;->postBitmapToMainThread(Lcom/mmc/player/SnapshotListener;Landroid/graphics/Bitmap;)V

    :cond_2e
    :goto_2e
    return-void
.end method

.method public surfaceTextureCanUse()V
    .registers 4

    .line 1
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurfaceTexture:Landroid/graphics/SurfaceTexture;

    if-eqz v0, :cond_d

    invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I

    move-result v0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    goto :goto_f

    :cond_d
    const-string v0, "null"

    :goto_f
    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I

    .line 2
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    if-nez v0, :cond_1a

    goto :goto_1d

    :cond_1a
    invoke-virtual {v0}, Lcom/mmc/player/MMCMediaPlayer;->getContext()Ljava/lang/String;

    .line 3
    :goto_1d
    invoke-virtual {p0}, Landroid/view/TextureView;->getSurfaceTexture()Landroid/graphics/SurfaceTexture;

    move-result-object v0

    iput-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurfaceTexture:Landroid/graphics/SurfaceTexture;

    .line 4
    iget-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    if-eqz v1, :cond_85

    if-eqz v0, :cond_85

    .line 5
    new-instance v0, Landroid/view/Surface;

    iget-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurfaceTexture:Landroid/graphics/SurfaceTexture;

    invoke-direct {v0, v1}, Landroid/view/Surface;-><init>(Landroid/graphics/SurfaceTexture;)V

    iput-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    .line 6
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I

    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurfaceTexture:Landroid/graphics/SurfaceTexture;

    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    .line 7
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    if-nez v0, :cond_41

    goto :goto_44

    :cond_41
    invoke-virtual {v0}, Lcom/mmc/player/MMCMediaPlayer;->getContext()Ljava/lang/String;

    .line 8
    :goto_44
    iget-boolean v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->renderByGL:Z

    if-nez v0, :cond_50

    .line 9
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    iget-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    invoke-virtual {v0, v1}, Lcom/mmc/player/MMCMediaPlayer;->setRenderSurface(Landroid/view/Surface;)V

    goto :goto_82

    .line 10
    :cond_50
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    iget v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewWidth:I

    iget v2, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->viewHeight:I

    invoke-direct {p0, v0, v1, v2}, Lcom/mmc/player/MMCAVPlayerTextureView;->setRenderSurface(Landroid/view/Surface;II)V

    .line 11
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-virtual {v0}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object v0

    if-eqz v0, :cond_75

    .line 12
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    .line 13
    invoke-virtual {v0}, Lcom/mmc/player/MMCMediaPlayer;->getRender()Lcom/mmc/player/render/SurfaceRender;

    move-result-object v0

    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_82

    .line 14
    :cond_75
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mSurface:Landroid/view/Surface;

    invoke-static {v0}, Ljava/util/Objects;->toString(Ljava/lang/Object;)Ljava/lang/String;

    invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    .line 15
    :goto_82
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    .line 16
    :cond_85
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->MMCMediaPlayer:Lcom/mmc/player/MMCMediaPlayer;

    if-eqz v0, :cond_94

    iget-object v1, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mMMCTextureViewListener:Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;

    if-eqz v1, :cond_94

    .line 17
    invoke-virtual {v0}, Lcom/mmc/player/MMCMediaPlayer;->isLive()Z

    move-result v0

    # setter for: Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;->isLive:Z
    invoke-static {v1, v0}, Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;->access$002(Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;Z)Z

    .line 18
    :cond_94
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mMMCTextureViewListener:Lcom/mmc/player/MMCAVPlayerTextureView$MMCTextureViewListener;

    invoke-virtual {p0, v0}, Landroid/view/TextureView;->setSurfaceTextureListener(Landroid/view/TextureView$SurfaceTextureListener;)V

    .line 19
    iget-object v0, p0, Lcom/mmc/player/MMCAVPlayerTextureView;->mAnalysisListener:Lcom/mmc/player/analyze/MMCAnalysisListener;

    invoke-virtual {p0, v0}, Lcom/mmc/player/MMCAVPlayerTextureView;->setAnalysisListener(Lcom/mmc/player/analyze/MMCAnalysisListener;)V

    return-void
.end method