Files
rr3-apk/smali_classes4/com/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

388 lines
8.0 KiB
Smali

.class public final Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final DO_NOT_OFFSET:J = 0x7fffffffffffffffL
.field private static final MAX_PTS_PLUS_ONE:J = 0x200000000L
# instance fields
.field private firstSampleTimestampUs:J
.field private volatile lastSampleTimestampUs:J
.field private timestampOffsetUs:J
# direct methods
.method public constructor <init>(J)V
.locals 2
.line 22
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-wide v0, -0x7fffffffffffffffL # -4.9E-324
iput-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
.line 24
invoke-virtual {p0, p1, p2}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->setFirstSampleTimestampUs(J)V
return-void
.end method
.method public static ptsToUs(J)J
.locals 2
const-wide/32 v0, 0xf4240
mul-long/2addr p0, v0
const-wide/32 v0, 0x15f90
.line 108
div-long/2addr p0, v0
return-wide p0
.end method
.method public static usToPts(J)J
.locals 2
const-wide/32 v0, 0x15f90
mul-long/2addr p0, v0
const-wide/32 v0, 0xf4240
.line 113
div-long/2addr p0, v0
return-wide p0
.end method
# virtual methods
.method public final adjustSampleTimestamp(J)J
.locals 4
const-wide v0, -0x7fffffffffffffffL # -4.9E-324
cmp-long v2, p1, v0
if-nez v2, :cond_0
return-wide v0
:cond_0
iget-wide v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
cmp-long v0, v2, v0
if-eqz v0, :cond_1
iput-wide p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
goto :goto_0
:cond_1
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->firstSampleTimestampUs:J
const-wide v2, 0x7fffffffffffffffL
cmp-long v2, v0, v2
if-eqz v2, :cond_2
sub-long/2addr v0, p1
iput-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->timestampOffsetUs:J
.line 90
:cond_2
monitor-enter p0
:try_start_0
iput-wide p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
.line 93
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 94
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:goto_0
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->timestampOffsetUs:J
add-long/2addr p1, v0
return-wide p1
:catchall_0
move-exception p1
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public final adjustTsTimestamp(J)J
.locals 8
const-wide v0, -0x7fffffffffffffffL # -4.9E-324
cmp-long v2, p1, v0
if-nez v2, :cond_0
return-wide v0
:cond_0
iget-wide v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
cmp-long v0, v2, v0
if-eqz v0, :cond_1
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
.line 65
invoke-static {v0, v1}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->usToPts(J)J
move-result-wide v0
const-wide v2, 0x100000000L
add-long/2addr v2, v0
const-wide v4, 0x200000000L
.line 66
div-long/2addr v2, v4
const-wide/16 v6, 0x1
sub-long v6, v2, v6
mul-long/2addr v6, v4
add-long/2addr v6, p1
mul-long/2addr v2, v4
add-long/2addr p1, v2
sub-long v2, v6, v0
.line 70
invoke-static {v2, v3}, Ljava/lang/Math;->abs(J)J
move-result-wide v2
sub-long v0, p1, v0
invoke-static {v0, v1}, Ljava/lang/Math;->abs(J)J
move-result-wide v0
cmp-long v0, v2, v0
if-gez v0, :cond_1
move-wide p1, v6
.line 74
:cond_1
invoke-static {p1, p2}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->ptsToUs(J)J
move-result-wide p1
invoke-virtual {p0, p1, p2}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->adjustSampleTimestamp(J)J
move-result-wide p1
return-wide p1
.end method
.method public final getFirstSampleTimestampUs()J
.locals 2
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->firstSampleTimestampUs:J
return-wide v0
.end method
.method public final getLastAdjustedTimestampUs()J
.locals 6
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
const-wide v2, -0x7fffffffffffffffL # -4.9E-324
cmp-long v0, v0, v2
if-eqz v0, :cond_0
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
iget-wide v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->timestampOffsetUs:J
add-long/2addr v2, v0
goto :goto_0
:cond_0
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->firstSampleTimestampUs:J
const-wide v4, 0x7fffffffffffffffL
cmp-long v4, v0, v4
if-eqz v4, :cond_1
move-wide v2, v0
:cond_1
:goto_0
return-wide v2
.end method
.method public final getTimestampOffsetUs()J
.locals 4
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->firstSampleTimestampUs:J
const-wide v2, 0x7fffffffffffffffL
cmp-long v0, v0, v2
if-nez v0, :cond_0
const-wide/16 v0, 0x0
goto :goto_0
:cond_0
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
const-wide v2, -0x7fffffffffffffffL # -4.9E-324
cmp-long v0, v0, v2
if-nez v0, :cond_1
move-wide v0, v2
goto :goto_0
:cond_1
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->timestampOffsetUs:J
:goto_0
return-wide v0
.end method
.method public final reset()V
.locals 2
const-wide v0, -0x7fffffffffffffffL # -4.9E-324
iput-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
return-void
.end method
.method public final declared-synchronized setFirstSampleTimestampUs(J)V
.locals 4
monitor-enter p0
:try_start_0
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
const-wide v2, -0x7fffffffffffffffL # -4.9E-324
cmp-long v0, v0, v2
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
.line 29
:goto_0
invoke-static {v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Assertions;->checkState(Z)V
iput-wide p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->firstSampleTimestampUs:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 31
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized waitUntilInitialized()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
monitor-enter p0
:goto_0
:try_start_0
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/TimestampAdjuster;->lastSampleTimestampUs:J
const-wide v2, -0x7fffffffffffffffL # -4.9E-324
cmp-long v0, v0, v2
if-nez v0, :cond_0
.line 102
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v0
goto :goto_1
.line 104
:cond_0
monitor-exit p0
return-void
:goto_1
monitor-exit p0
throw v0
.end method