.class public Lcom/view/XVideoView;
.super Landroid/widget/VideoView;


# instance fields
.field private a:I

.field private b:I

.field private c:I


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

    invoke-direct {p0, p1}, Landroid/widget/VideoView;-><init>(Landroid/content/Context;)V

    return-void
.end method

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

    invoke-direct {p0, p1, p2}, Landroid/widget/VideoView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

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

    invoke-direct {p0, p1, p2, p3}, Landroid/widget/VideoView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method


# virtual methods
.method public a(ILandroid/media/MediaPlayer;)V
    .locals 1

    iput p1, p0, Lcom/view/XVideoView;->b:I

    :try_start_0
    invoke-virtual {p2}, Landroid/media/MediaPlayer;->getVideoWidth()I

    move-result v0

    iput v0, p0, Lcom/view/XVideoView;->a:I

    invoke-virtual {p2}, Landroid/media/MediaPlayer;->getVideoHeight()I

    move-result v0

    iput v0, p0, Lcom/view/XVideoView;->c:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    invoke-virtual {p0}, Lcom/view/XVideoView;->requestLayout()V

    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method protected onMeasure(II)V
    .locals 4

    const/4 v1, 0x0

    invoke-static {v1, p1}, Lcom/view/XVideoView;->getDefaultSize(II)I

    move-result v0

    invoke-static {v1, p2}, Lcom/view/XVideoView;->getDefaultSize(II)I

    move-result v1

    iget v2, p0, Lcom/view/XVideoView;->b:I

    packed-switch v2, :pswitch_data_0

    :goto_0
    iget v0, p0, Lcom/view/XVideoView;->a:I

    iget v1, p0, Lcom/view/XVideoView;->c:I

    invoke-virtual {p0, v0, v1}, Lcom/view/XVideoView;->setMeasuredDimension(II)V

    return-void

    :pswitch_0
    iput v0, p0, Lcom/view/XVideoView;->a:I

    iput v1, p0, Lcom/view/XVideoView;->c:I

    goto :goto_0

    :pswitch_1
    iput v0, p0, Lcom/view/XVideoView;->a:I

    mul-int/lit8 v0, v0, 0x9

    div-int/lit8 v0, v0, 0x10

    iput v0, p0, Lcom/view/XVideoView;->c:I

    goto :goto_0

    :pswitch_2
    iput v1, p0, Lcom/view/XVideoView;->c:I

    mul-int/lit8 v0, v1, 0x4

    div-int/lit8 v0, v0, 0x3

    iput v0, p0, Lcom/view/XVideoView;->a:I

    goto :goto_0

    :pswitch_3
    iget v2, p0, Lcom/view/XVideoView;->a:I

    if-eqz v2, :cond_0

    iget v2, p0, Lcom/view/XVideoView;->c:I

    if-nez v2, :cond_1

    :cond_0
    iput v0, p0, Lcom/view/XVideoView;->a:I

    iput v1, p0, Lcom/view/XVideoView;->c:I

    goto :goto_0

    :cond_1
    iget v2, p0, Lcom/view/XVideoView;->a:I

    div-int/2addr v2, v0

    iget v3, p0, Lcom/view/XVideoView;->c:I

    div-int/2addr v3, v1

    if-le v2, v3, :cond_2

    iget v1, p0, Lcom/view/XVideoView;->c:I

    mul-int/2addr v1, v0

    iget v2, p0, Lcom/view/XVideoView;->a:I

    div-int/2addr v1, v2

    iput v1, p0, Lcom/view/XVideoView;->c:I

    iput v0, p0, Lcom/view/XVideoView;->a:I

    goto :goto_0

    :cond_2
    iget v0, p0, Lcom/view/XVideoView;->a:I

    mul-int/2addr v0, v1

    iget v2, p0, Lcom/view/XVideoView;->c:I

    div-int/2addr v0, v2

    iput v0, p0, Lcom/view/XVideoView;->a:I

    iput v1, p0, Lcom/view/XVideoView;->c:I

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_3
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method
