AbstractBox.smali
.class public abstract Lcom/googlecode/mp4parser/AbstractBox;
.super Ljava/lang/Object;
.source "AbstractBox.java"
# interfaces
.implements Lcom/coremedia/iso/boxes/Box;
# static fields
.field static final synthetic $assertionsDisabled:Z
.field private static LOG:Lcom/googlecode/mp4parser/util/Logger;
# instance fields
.field private content:Ljava/nio/ByteBuffer;
.field contentStartPosition:J
.field dataSource:Lcom/googlecode/mp4parser/DataSource;
.field private deadBytes:Ljava/nio/ByteBuffer;
.field isParsed:Z
.field isRead:Z
.field memMapSize:J
.field offset:J
.field private parent:Lcom/coremedia/iso/boxes/Container;
.field protected type:Ljava/lang/String;
.field private userType:[B
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 46
nop
.line 47
const-class v0, Lcom/googlecode/mp4parser/AbstractBox;
invoke-static {v0}, Lcom/googlecode/mp4parser/util/Logger;->getLogger(Ljava/lang/Class;)Lcom/googlecode/mp4parser/util/Logger;
move-result-object v0
sput-object v0, Lcom/googlecode/mp4parser/AbstractBox;->LOG:Lcom/googlecode/mp4parser/util/Logger;
return-void
.end method
.method protected constructor <init>(Ljava/lang/String;)V
.registers 4
.param p1, "type" # Ljava/lang/String;
.line 82
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 61
const-wide/16 v0, -0x1
iput-wide v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->memMapSize:J
.line 76
const/4 v0, 0x0
iput-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
.line 83
iput-object p1, p0, Lcom/googlecode/mp4parser/AbstractBox;->type:Ljava/lang/String;
.line 84
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
.line 85
iput-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
.line 86
return-void
.end method
.method protected constructor <init>(Ljava/lang/String;[B)V
.registers 5
.param p1, "type" # Ljava/lang/String;
.param p2, "userType" # [B
.line 88
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 61
const-wide/16 v0, -0x1
iput-wide v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->memMapSize:J
.line 76
const/4 v0, 0x0
iput-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
.line 89
iput-object p1, p0, Lcom/googlecode/mp4parser/AbstractBox;->type:Ljava/lang/String;
.line 90
iput-object p2, p0, Lcom/googlecode/mp4parser/AbstractBox;->userType:[B
.line 91
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
.line 92
iput-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
.line 93
return-void
.end method
.method private getHeader(Ljava/nio/ByteBuffer;)V
.registers 4
.param p1, "byteBuffer" # Ljava/nio/ByteBuffer;
.line 301
invoke-direct {p0}, Lcom/googlecode/mp4parser/AbstractBox;->isSmallBox()Z
move-result v0
if-eqz v0, :cond_19
.line 302
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getSize()J
move-result-wide v0
invoke-static {p1, v0, v1}, Lcom/coremedia/iso/IsoTypeWriter;->writeUInt32(Ljava/nio/ByteBuffer;J)V
.line 303
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/coremedia/iso/IsoFile;->fourCCtoBytes(Ljava/lang/String;)[B
move-result-object v0
invoke-virtual {p1, v0}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;
.line 304
goto :goto_30
.line 305
:cond_19
const-wide/16 v0, 0x1
invoke-static {p1, v0, v1}, Lcom/coremedia/iso/IsoTypeWriter;->writeUInt32(Ljava/nio/ByteBuffer;J)V
.line 306
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/coremedia/iso/IsoFile;->fourCCtoBytes(Ljava/lang/String;)[B
move-result-object v0
invoke-virtual {p1, v0}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;
.line 307
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getSize()J
move-result-wide v0
invoke-static {p1, v0, v1}, Lcom/coremedia/iso/IsoTypeWriter;->writeUInt64(Ljava/nio/ByteBuffer;J)V
.line 309
:goto_30
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v0
const-string/jumbo v1, "uuid"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_44
.line 310
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getUserType()[B
move-result-object v0
invoke-virtual {p1, v0}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;
.line 312
:cond_44
return-void
.end method
.method private isSmallBox()Z
.registers 11
.line 285
const/16 v0, 0x8
.line 286
.local v0, "baseSize":I
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v1
const-string/jumbo v2, "uuid"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_11
.line 287
add-int/lit8 v0, v0, 0x10
.line 289
:cond_11
iget-boolean v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
const/4 v2, 0x1
const-wide v3, 0x100000000L
const/4 v5, 0x0
if-eqz v1, :cond_46
.line 290
iget-boolean v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
if-eqz v1, :cond_38
.line 291
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getContentSize()J
move-result-wide v6
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
if-eqz v1, :cond_2d
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->limit()I
move-result v1
goto :goto_2e
:cond_2d
const/4 v1, 0x0
:goto_2e
int-to-long v8, v1
add-long/2addr v6, v8
int-to-long v8, v0
add-long/2addr v6, v8
cmp-long v1, v6, v3
if-gez v1, :cond_37
return v2
:cond_37
return v5
.line 293
:cond_38
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->content:Ljava/nio/ByteBuffer;
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->limit()I
move-result v1
add-int/2addr v1, v0
int-to-long v6, v1
cmp-long v1, v6, v3
if-gez v1, :cond_45
return v2
:cond_45
return v5
.line 296
:cond_46
iget-wide v6, p0, Lcom/googlecode/mp4parser/AbstractBox;->memMapSize:J
int-to-long v8, v0
add-long/2addr v6, v8
cmp-long v1, v6, v3
if-gez v1, :cond_4f
return v2
:cond_4f
return v5
.end method
.method private declared-synchronized readContent()V
.registers 6
monitor-enter p0
.line 65
:try_start_1
iget-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_36
if-nez v0, :cond_34
.line 67
:try_start_5
sget-object v0, Lcom/googlecode/mp4parser/AbstractBox;->LOG:Lcom/googlecode/mp4parser/util/Logger;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "mem mapping "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/googlecode/mp4parser/util/Logger;->logDebug(Ljava/lang/String;)V
.line 68
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->dataSource:Lcom/googlecode/mp4parser/DataSource;
iget-wide v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->contentStartPosition:J
iget-wide v3, p0, Lcom/googlecode/mp4parser/AbstractBox;->memMapSize:J
invoke-interface {v0, v1, v2, v3, v4}, Lcom/googlecode/mp4parser/DataSource;->map(JJ)Ljava/nio/ByteBuffer;
move-result-object v0
iput-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->content:Ljava/nio/ByteBuffer;
:try_end_28
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_28} :catch_2d
.catchall {:try_start_5 .. :try_end_28} :catchall_36
.line 69
nop
.line 72
const/4 v0, 0x1
:try_start_2a
iput-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
goto :goto_34
.line 69
.end local p0 # "this":Lcom/googlecode/mp4parser/AbstractBox;
:catch_2d
move-exception v0
.line 70
.local v0, "e":Ljava/io/IOException;
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
:try_end_34
.catchall {:try_start_2a .. :try_end_34} :catchall_36
.line 74
.end local v0 # "e":Ljava/io/IOException;
:cond_34
:goto_34
monitor-exit p0
return-void
.line 64
:catchall_36
move-exception v0
monitor-exit p0
throw v0
.end method
.method private verify(Ljava/nio/ByteBuffer;)Z
.registers 15
.param p1, "content" # Ljava/nio/ByteBuffer;
.line 248
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getContentSize()J
move-result-wide v0
iget-object v2, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
const/4 v3, 0x0
if-eqz v2, :cond_e
invoke-virtual {v2}, Ljava/nio/ByteBuffer;->limit()I
move-result v2
goto :goto_f
:cond_e
const/4 v2, 0x0
:goto_f
int-to-long v4, v2
add-long/2addr v0, v4
invoke-static {v0, v1}, Lcom/googlecode/mp4parser/util/CastUtils;->l2i(J)I
move-result v0
invoke-static {v0}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v0
.line 249
.local v0, "bb":Ljava/nio/ByteBuffer;
invoke-virtual {p0, v0}, Lcom/googlecode/mp4parser/AbstractBox;->getContent(Ljava/nio/ByteBuffer;)V
.line 250
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
if-eqz v1, :cond_33
.line 251
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
.line 252
nop
:goto_24
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->remaining()I
move-result v1
if-gtz v1, :cond_2d
goto :goto_33
.line 253
:cond_2d
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
invoke-virtual {v0, v1}, Ljava/nio/ByteBuffer;->put(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
goto :goto_24
.line 256
:cond_33
:goto_33
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
.line 257
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
.line 260
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
move-result v1
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I
move-result v2
if-eq v1, v2, :cond_9c
.line 261
sget-object v1, Ljava/lang/System;->err:Ljava/io/PrintStream;
new-instance v2, Ljava/lang/StringBuilder;
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v4
invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
const-string v4, ": remaining differs "
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
move-result v5
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v5, " vs. "
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I
move-result v6
invoke-virtual {v2, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/io/PrintStream;->print(Ljava/lang/String;)V
.line 262
sget-object v1, Lcom/googlecode/mp4parser/AbstractBox;->LOG:Lcom/googlecode/mp4parser/util/Logger;
new-instance v2, Ljava/lang/StringBuilder;
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v6
invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v6
invoke-direct {v2, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
move-result v4
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I
move-result v4
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Lcom/googlecode/mp4parser/util/Logger;->logError(Ljava/lang/String;)V
.line 263
return v3
.line 265
:cond_9c
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->position()I
move-result v1
.line 266
.local v1, "p":I
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->limit()I
move-result v2
const/4 v4, 0x1
sub-int/2addr v2, v4
.local v2, "i":I
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->limit()I
move-result v5
sub-int/2addr v5, v4
.local v5, "j":I
:goto_ab
if-ge v2, v1, :cond_ae
.line 280
.end local v2 # "i":I
.end local v5 # "j":I
return v4
.line 267
.restart local v2 # "i":I
.restart local v5 # "j":I
:cond_ae
invoke-virtual {p1, v2}, Ljava/nio/ByteBuffer;->get(I)B
move-result v6
.line 268
.local v6, "v1":B
invoke-virtual {v0, v5}, Ljava/nio/ByteBuffer;->get(I)B
move-result v7
.line 269
.local v7, "v2":B
if-eq v6, v7, :cond_122
.line 270
sget-object v8, Lcom/googlecode/mp4parser/AbstractBox;->LOG:Lcom/googlecode/mp4parser/util/Logger;
const/4 v9, 0x4
new-array v10, v9, [Ljava/lang/Object;
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v11
aput-object v11, v10, v3
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v11
aput-object v11, v10, v4
const/4 v4, 0x2
invoke-static {v6}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
move-result-object v11
aput-object v11, v10, v4
const/4 v4, 0x3
invoke-static {v7}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
move-result-object v11
aput-object v11, v10, v4
const-string v4, "%s: buffers differ at %d: %2X/%2X"
invoke-static {v4, v10}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v4
invoke-virtual {v8, v4}, Lcom/googlecode/mp4parser/util/Logger;->logError(Ljava/lang/String;)V
.line 271
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
move-result v4
new-array v4, v4, [B
.line 272
.local v4, "b1":[B
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I
move-result v8
new-array v8, v8, [B
.line 273
.local v8, "b2":[B
invoke-virtual {p1, v4}, Ljava/nio/ByteBuffer;->get([B)Ljava/nio/ByteBuffer;
.line 274
invoke-virtual {v0, v8}, Ljava/nio/ByteBuffer;->get([B)Ljava/nio/ByteBuffer;
.line 275
sget-object v10, Ljava/lang/System;->err:Ljava/io/PrintStream;
new-instance v11, Ljava/lang/StringBuilder;
const-string v12, "original : "
invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-static {v4, v9}, Lcom/coremedia/iso/Hex;->encodeHex([BI)Ljava/lang/String;
move-result-object v12
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 276
sget-object v10, Ljava/lang/System;->err:Ljava/io/PrintStream;
new-instance v11, Ljava/lang/StringBuilder;
const-string/jumbo v12, "reconstructed : "
invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-static {v8, v9}, Lcom/coremedia/iso/Hex;->encodeHex([BI)Ljava/lang/String;
move-result-object v9
invoke-virtual {v11, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
invoke-virtual {v10, v9}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 277
return v3
.line 266
.end local v4 # "b1":[B
.end local v6 # "v1":B
.end local v7 # "v2":B
.end local v8 # "b2":[B
:cond_122
add-int/lit8 v2, v2, -0x1
add-int/lit8 v5, v5, -0x1
goto :goto_ab
.end method
# virtual methods
.method protected abstract _parseDetails(Ljava/nio/ByteBuffer;)V
.end method
.method public getBox(Ljava/nio/channels/WritableByteChannel;)V
.registers 10
.param p1, "os" # Ljava/nio/channels/WritableByteChannel;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 138
iget-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
const-string/jumbo v1, "uuid"
const/16 v2, 0x8
const/4 v3, 0x0
const/16 v4, 0x10
if-eqz v0, :cond_75
.line 139
iget-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
if-eqz v0, :cond_43
.line 140
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getSize()J
move-result-wide v0
invoke-static {v0, v1}, Lcom/googlecode/mp4parser/util/CastUtils;->l2i(J)I
move-result v0
invoke-static {v0}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v0
.line 141
.local v0, "bb":Ljava/nio/ByteBuffer;
invoke-direct {p0, v0}, Lcom/googlecode/mp4parser/AbstractBox;->getHeader(Ljava/nio/ByteBuffer;)V
.line 142
invoke-virtual {p0, v0}, Lcom/googlecode/mp4parser/AbstractBox;->getContent(Ljava/nio/ByteBuffer;)V
.line 143
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
if-eqz v1, :cond_39
.line 144
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
.line 145
nop
:goto_2a
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->remaining()I
move-result v1
if-gtz v1, :cond_33
goto :goto_39
.line 146
:cond_33
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
invoke-virtual {v0, v1}, Ljava/nio/ByteBuffer;->put(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
goto :goto_2a
.line 149
:cond_39
:goto_39
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
move-result-object v1
check-cast v1, Ljava/nio/ByteBuffer;
invoke-interface {p1, v1}, Ljava/nio/channels/WritableByteChannel;->write(Ljava/nio/ByteBuffer;)I
.line 150
.end local v0 # "bb":Ljava/nio/ByteBuffer;
goto :goto_a5
.line 151
:cond_43
invoke-direct {p0}, Lcom/googlecode/mp4parser/AbstractBox;->isSmallBox()Z
move-result v0
if-eqz v0, :cond_4a
goto :goto_4c
:cond_4a
const/16 v2, 0x10
:goto_4c
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_57
goto :goto_58
:cond_57
const/4 v4, 0x0
:goto_58
add-int/2addr v2, v4
invoke-static {v2}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v0
.line 152
.local v0, "header":Ljava/nio/ByteBuffer;
invoke-direct {p0, v0}, Lcom/googlecode/mp4parser/AbstractBox;->getHeader(Ljava/nio/ByteBuffer;)V
.line 153
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
move-result-object v1
check-cast v1, Ljava/nio/ByteBuffer;
invoke-interface {p1, v1}, Ljava/nio/channels/WritableByteChannel;->write(Ljava/nio/ByteBuffer;)I
.line 154
iget-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->content:Ljava/nio/ByteBuffer;
invoke-virtual {v1, v3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
move-result-object v1
check-cast v1, Ljava/nio/ByteBuffer;
invoke-interface {p1, v1}, Ljava/nio/channels/WritableByteChannel;->write(Ljava/nio/ByteBuffer;)I
.line 157
.end local v0 # "header":Ljava/nio/ByteBuffer;
goto :goto_a5
.line 158
:cond_75
invoke-direct {p0}, Lcom/googlecode/mp4parser/AbstractBox;->isSmallBox()Z
move-result v0
if-eqz v0, :cond_7c
goto :goto_7e
:cond_7c
const/16 v2, 0x10
:goto_7e
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_8a
const/16 v3, 0x10
:cond_8a
add-int/2addr v2, v3
invoke-static {v2}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v0
.line 159
.restart local v0 # "header":Ljava/nio/ByteBuffer;
invoke-direct {p0, v0}, Lcom/googlecode/mp4parser/AbstractBox;->getHeader(Ljava/nio/ByteBuffer;)V
.line 160
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
move-result-object v1
check-cast v1, Ljava/nio/ByteBuffer;
invoke-interface {p1, v1}, Ljava/nio/channels/WritableByteChannel;->write(Ljava/nio/ByteBuffer;)I
.line 161
iget-object v2, p0, Lcom/googlecode/mp4parser/AbstractBox;->dataSource:Lcom/googlecode/mp4parser/DataSource;
iget-wide v3, p0, Lcom/googlecode/mp4parser/AbstractBox;->contentStartPosition:J
iget-wide v5, p0, Lcom/googlecode/mp4parser/AbstractBox;->memMapSize:J
move-object v7, p1
invoke-interface/range {v2 .. v7}, Lcom/googlecode/mp4parser/DataSource;->transferTo(JJLjava/nio/channels/WritableByteChannel;)J
.line 163
.end local v0 # "header":Ljava/nio/ByteBuffer;
:goto_a5
return-void
.end method
.method protected abstract getContent(Ljava/nio/ByteBuffer;)V
.end method
.method protected abstract getContentSize()J
.end method
.method public getOffset()J
.registers 3
.line 79
iget-wide v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->offset:J
return-wide v0
.end method
.method public getParent()Lcom/coremedia/iso/boxes/Container;
.registers 2
.annotation runtime Lcom/googlecode/mp4parser/annotations/DoNotParseDetail;
.end annotation
.line 223
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->parent:Lcom/coremedia/iso/boxes/Container;
return-object v0
.end method
.method public getPath()Ljava/lang/String;
.registers 2
.annotation runtime Lcom/googlecode/mp4parser/annotations/DoNotParseDetail;
.end annotation
.line 316
invoke-static {p0}, Lcom/googlecode/mp4parser/util/Path;->createPath(Lcom/coremedia/iso/boxes/Box;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public getSize()J
.registers 8
.line 203
iget-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
const/4 v1, 0x0
if-eqz v0, :cond_1a
iget-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
if-eqz v0, :cond_e
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getContentSize()J
move-result-wide v2
goto :goto_1c
:cond_e
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->content:Ljava/nio/ByteBuffer;
if-eqz v0, :cond_17
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->limit()I
move-result v0
goto :goto_18
:cond_17
const/4 v0, 0x0
:goto_18
int-to-long v2, v0
goto :goto_1c
:cond_1a
iget-wide v2, p0, Lcom/googlecode/mp4parser/AbstractBox;->memMapSize:J
.line 204
.local v2, "size":J
:goto_1c
nop
.line 205
const-wide v4, 0xfffffff8L
const/16 v0, 0x8
cmp-long v6, v2, v4
if-ltz v6, :cond_2b
const/16 v4, 0x8
goto :goto_2c
:cond_2b
const/4 v4, 0x0
.line 204
:goto_2c
add-int/2addr v4, v0
.line 206
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v0
const-string/jumbo v5, "uuid"
invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3d
const/16 v0, 0x10
goto :goto_3e
:cond_3d
const/4 v0, 0x0
:goto_3e
add-int/2addr v4, v0
int-to-long v4, v4
add-long/2addr v2, v4
.line 207
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
if-nez v0, :cond_46
goto :goto_4a
:cond_46
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->limit()I
move-result v1
:goto_4a
int-to-long v0, v1
add-long/2addr v2, v0
.line 208
return-wide v2
.end method
.method public getType()Ljava/lang/String;
.registers 2
.annotation runtime Lcom/googlecode/mp4parser/annotations/DoNotParseDetail;
.end annotation
.line 213
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->type:Ljava/lang/String;
return-object v0
.end method
.method public getUserType()[B
.registers 2
.annotation runtime Lcom/googlecode/mp4parser/annotations/DoNotParseDetail;
.end annotation
.line 218
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->userType:[B
return-object v0
.end method
.method public isParsed()Z
.registers 2
.line 237
iget-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
return v0
.end method
.method public parse(Lcom/googlecode/mp4parser/DataSource;Ljava/nio/ByteBuffer;JLcom/coremedia/iso/BoxParser;)V
.registers 10
.param p1, "dataSource" # Lcom/googlecode/mp4parser/DataSource;
.param p2, "header" # Ljava/nio/ByteBuffer;
.param p3, "contentSize" # J
.param p5, "boxParser" # Lcom/coremedia/iso/BoxParser;
.annotation runtime Lcom/googlecode/mp4parser/annotations/DoNotParseDetail;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 126
invoke-interface {p1}, Lcom/googlecode/mp4parser/DataSource;->position()J
move-result-wide v0
iput-wide v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->contentStartPosition:J
.line 127
invoke-virtual {p2}, Ljava/nio/ByteBuffer;->remaining()I
move-result v2
int-to-long v2, v2
sub-long/2addr v0, v2
iput-wide v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->offset:J
.line 128
iput-wide p3, p0, Lcom/googlecode/mp4parser/AbstractBox;->memMapSize:J
.line 129
iput-object p1, p0, Lcom/googlecode/mp4parser/AbstractBox;->dataSource:Lcom/googlecode/mp4parser/DataSource;
.line 131
invoke-interface {p1}, Lcom/googlecode/mp4parser/DataSource;->position()J
move-result-wide v0
add-long/2addr v0, p3
invoke-interface {p1, v0, v1}, Lcom/googlecode/mp4parser/DataSource;->position(J)V
.line 132
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isRead:Z
.line 133
iput-boolean v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
.line 135
return-void
.end method
.method public final declared-synchronized parseDetails()V
.registers 4
monitor-enter p0
.line 171
:try_start_1
invoke-direct {p0}, Lcom/googlecode/mp4parser/AbstractBox;->readContent()V
.line 172
sget-object v0, Lcom/googlecode/mp4parser/AbstractBox;->LOG:Lcom/googlecode/mp4parser/util/Logger;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "parsing details of "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Lcom/googlecode/mp4parser/AbstractBox;->getType()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/googlecode/mp4parser/util/Logger;->logDebug(Ljava/lang/String;)V
.line 173
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->content:Ljava/nio/ByteBuffer;
if-eqz v0, :cond_39
.line 174
iget-object v0, p0, Lcom/googlecode/mp4parser/AbstractBox;->content:Ljava/nio/ByteBuffer;
.line 175
.local v0, "content":Ljava/nio/ByteBuffer;
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->isParsed:Z
.line 176
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
.line 177
invoke-virtual {p0, v0}, Lcom/googlecode/mp4parser/AbstractBox;->_parseDetails(Ljava/nio/ByteBuffer;)V
.line 178
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I
move-result v1
if-lez v1, :cond_36
.line 179
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->slice()Ljava/nio/ByteBuffer;
move-result-object v1
iput-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
.line 181
.end local p0 # "this":Lcom/googlecode/mp4parser/AbstractBox;
:cond_36
const/4 v1, 0x0
iput-object v1, p0, Lcom/googlecode/mp4parser/AbstractBox;->content:Ljava/nio/ByteBuffer;
:try_end_39
.catchall {:try_start_1 .. :try_end_39} :catchall_3b
.line 184
.end local v0 # "content":Ljava/nio/ByteBuffer;
:cond_39
monitor-exit p0
return-void
.line 170
:catchall_3b
move-exception v0
monitor-exit p0
throw v0
.end method
.method protected setDeadBytes(Ljava/nio/ByteBuffer;)V
.registers 2
.param p1, "newDeadBytes" # Ljava/nio/ByteBuffer;
.line 193
iput-object p1, p0, Lcom/googlecode/mp4parser/AbstractBox;->deadBytes:Ljava/nio/ByteBuffer;
.line 194
return-void
.end method
.method public setParent(Lcom/coremedia/iso/boxes/Container;)V
.registers 2
.param p1, "parent" # Lcom/coremedia/iso/boxes/Container;
.annotation runtime Lcom/googlecode/mp4parser/annotations/DoNotParseDetail;
.end annotation
.line 228
iput-object p1, p0, Lcom/googlecode/mp4parser/AbstractBox;->parent:Lcom/coremedia/iso/boxes/Container;
.line 229
return-void
.end method