.class public Lt3/y;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lk3/f;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lt3/y$h;,
        Lt3/y$d;,
        Lt3/y$g;,
        Lt3/y$c;,
        Lt3/y$f;,
        Lt3/y$e;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Lk3/f<",
        "TT;",
        "Landroid/graphics/Bitmap;",
        ">;"
    }
.end annotation


# static fields
.field public static final d:Lk3/d;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lk3/d<",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation
.end field

.field public static final e:Lk3/d;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lk3/d<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field public static final f:Lt3/y$e;


# instance fields
.field public final a:Lt3/y$f;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lt3/y$f<",
            "TT;>;"
        }
    .end annotation
.end field

.field public final b:Ln3/c;

.field public final c:Lt3/y$e;


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

    const-wide/16 v0, -0x1

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    new-instance v1, Lt3/y$a;

    invoke-direct {v1}, Lt3/y$a;-><init>()V

    .line 1
    new-instance v2, Lk3/d;

    const-string v3, "com.bumptech.glide.load.resource.bitmap.VideoBitmapDecode.TargetFrame"

    invoke-direct {v2, v3, v0, v1}, Lk3/d;-><init>(Ljava/lang/String;Ljava/lang/Object;Lk3/d$b;)V

    .line 2
    sput-object v2, Lt3/y;->d:Lk3/d;

    const/4 v0, 0x2

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

    move-result-object v0

    new-instance v1, Lt3/y$b;

    invoke-direct {v1}, Lt3/y$b;-><init>()V

    .line 3
    new-instance v2, Lk3/d;

    const-string v3, "com.bumptech.glide.load.resource.bitmap.VideoBitmapDecode.FrameOption"

    invoke-direct {v2, v3, v0, v1}, Lk3/d;-><init>(Ljava/lang/String;Ljava/lang/Object;Lk3/d$b;)V

    .line 4
    sput-object v2, Lt3/y;->e:Lk3/d;

    new-instance v0, Lt3/y$e;

    invoke-direct {v0}, Lt3/y$e;-><init>()V

    sput-object v0, Lt3/y;->f:Lt3/y$e;

    return-void
.end method

.method public constructor <init>(Ln3/c;Lt3/y$f;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ln3/c;",
            "Lt3/y$f<",
            "TT;>;)V"
        }
    .end annotation

    sget-object v0, Lt3/y;->f:Lt3/y$e;

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

    iput-object p1, p0, Lt3/y;->b:Ln3/c;

    iput-object p2, p0, Lt3/y;->a:Lt3/y$f;

    iput-object v0, p0, Lt3/y;->c:Lt3/y$e;

    return-void
.end method

.method public static c(Landroid/media/MediaMetadataRetriever;JIIILt3/k;)Landroid/graphics/Bitmap;
    .registers 16

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x1b

    if-lt v0, v1, :cond_60

    const/high16 v0, -0x80000000

    if-eq p4, v0, :cond_60

    if-eq p5, v0, :cond_60

    sget-object v0, Lt3/k;->d:Lt3/k;

    if-eq p6, v0, :cond_60

    const/16 v0, 0x12

    .line 1
    :try_start_12
    invoke-virtual {p0, v0}, Landroid/media/MediaMetadataRetriever;->extractMetadata(I)Ljava/lang/String;

    move-result-object v0

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

    move-result v0

    const/16 v1, 0x13

    invoke-virtual {p0, v1}, Landroid/media/MediaMetadataRetriever;->extractMetadata(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    const/16 v2, 0x18

    invoke-virtual {p0, v2}, Landroid/media/MediaMetadataRetriever;->extractMetadata(I)Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0x5a

    if-eq v2, v3, :cond_36

    const/16 v3, 0x10e

    if-ne v2, v3, :cond_39

    :cond_36
    move v8, v1

    move v1, v0

    move v0, v8

    :cond_39
    invoke-virtual {p6, v0, v1, p4, p5}, Lt3/k;->b(IIII)F

    move-result p4

    int-to-float p5, v0

    mul-float/2addr p5, p4

    invoke-static {p5}, Ljava/lang/Math;->round(F)I

    move-result v6

    int-to-float p5, v1

    mul-float/2addr p4, p5

    invoke-static {p4}, Ljava/lang/Math;->round(F)I

    move-result v7

    move-object v2, p0

    move-wide v3, p1

    move v5, p3

    invoke-virtual/range {v2 .. v7}, Landroid/media/MediaMetadataRetriever;->getScaledFrameAtTime(JIII)Landroid/graphics/Bitmap;

    move-result-object p4
    :try_end_50
    .catchall {:try_start_12 .. :try_end_50} :catchall_51

    goto :goto_61

    :catchall_51
    move-exception p4

    const/4 p5, 0x3

    const-string p6, "VideoDecoder"

    invoke-static {p6, p5}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z

    move-result p5

    if-eqz p5, :cond_60

    const-string p5, "Exception trying to decode a scaled frame on oreo+, falling back to a fullsize frame"

    invoke-static {p6, p5, p4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_60
    const/4 p4, 0x0

    :goto_61
    if-nez p4, :cond_67

    .line 2
    invoke-virtual {p0, p1, p2, p3}, Landroid/media/MediaMetadataRetriever;->getFrameAtTime(JI)Landroid/graphics/Bitmap;

    move-result-object p4

    :cond_67
    if-eqz p4, :cond_6a

    return-object p4

    .line 3
    :cond_6a
    new-instance p0, Lt3/y$h;

    invoke-direct {p0}, Lt3/y$h;-><init>()V

    throw p0
.end method


# virtual methods
.method public a(Ljava/lang/Object;IILk3/e;)Lm3/w;
    .registers 13
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;II",
            "Lk3/e;",
            ")",
            "Lm3/w<",
            "Landroid/graphics/Bitmap;",
            ">;"
        }
    .end annotation

    sget-object v0, Lt3/y;->d:Lk3/d;

    invoke-virtual {p4, v0}, Lk3/e;->c(Lk3/d;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v2

    const-wide/16 v0, 0x0

    cmp-long v0, v2, v0

    if-gez v0, :cond_25

    const-wide/16 v0, -0x1

    cmp-long v0, v2, v0

    if-nez v0, :cond_19

    goto :goto_25

    :cond_19
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string p2, "Requested frame must be non-negative, or DEFAULT_FRAME, given: "

    invoke-static {p2, v2, v3}, Lv0/a;->a(Ljava/lang/String;J)Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_25
    :goto_25
    sget-object v0, Lt3/y;->e:Lk3/d;

    invoke-virtual {p4, v0}, Lk3/e;->c(Lk3/d;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    if-nez v0, :cond_34

    const/4 v0, 0x2

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

    move-result-object v0

    :cond_34
    sget-object v1, Lt3/k;->f:Lk3/d;

    invoke-virtual {p4, v1}, Lk3/e;->c(Lk3/d;)Ljava/lang/Object;

    move-result-object p4

    check-cast p4, Lt3/k;

    if-nez p4, :cond_40

    sget-object p4, Lt3/k;->e:Lt3/k;

    :cond_40
    move-object v7, p4

    iget-object p4, p0, Lt3/y;->c:Lt3/y$e;

    invoke-static {p4}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 1
    new-instance p4, Landroid/media/MediaMetadataRetriever;

    invoke-direct {p4}, Landroid/media/MediaMetadataRetriever;-><init>()V

    .line 2
    :try_start_4b
    iget-object v1, p0, Lt3/y;->a:Lt3/y$f;

    invoke-interface {v1, p4, p1}, Lt3/y$f;->a(Landroid/media/MediaMetadataRetriever;Ljava/lang/Object;)V

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v4

    move-object v1, p4

    move v5, p2

    move v6, p3

    invoke-static/range {v1 .. v7}, Lt3/y;->c(Landroid/media/MediaMetadataRetriever;JIIILt3/k;)Landroid/graphics/Bitmap;

    move-result-object p1
    :try_end_5b
    .catchall {:try_start_4b .. :try_end_5b} :catchall_65

    invoke-virtual {p4}, Landroid/media/MediaMetadataRetriever;->release()V

    iget-object p2, p0, Lt3/y;->b:Ln3/c;

    invoke-static {p1, p2}, Lt3/d;->d(Landroid/graphics/Bitmap;Ln3/c;)Lt3/d;

    move-result-object p1

    return-object p1

    :catchall_65
    move-exception p1

    invoke-virtual {p4}, Landroid/media/MediaMetadataRetriever;->release()V

    throw p1
.end method

.method public b(Ljava/lang/Object;Lk3/e;)Z
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;",
            "Lk3/e;",
            ")Z"
        }
    .end annotation

    const/4 p1, 0x1

    return p1
.end method
