66 lines
1.7 KiB
Java
66 lines
1.7 KiB
Java
package c.i.a.c.i2;
|
|
|
|
import androidx.annotation.GuardedBy;
|
|
/* compiled from: TimestampAdjuster */
|
|
public final class e0 {
|
|
@GuardedBy("this")
|
|
public long a;
|
|
@GuardedBy("this")
|
|
public long b;
|
|
@GuardedBy("this")
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public long f903c = -9223372036854775807L;
|
|
|
|
public e0(long j) {
|
|
this.a = j;
|
|
}
|
|
|
|
public synchronized long a(long j) {
|
|
if (j == -9223372036854775807L) {
|
|
return -9223372036854775807L;
|
|
}
|
|
if (this.f903c != -9223372036854775807L) {
|
|
this.f903c = j;
|
|
} else {
|
|
long j2 = this.a;
|
|
if (j2 != Long.MAX_VALUE) {
|
|
this.b = j2 - j;
|
|
}
|
|
this.f903c = j;
|
|
notifyAll();
|
|
}
|
|
return j + this.b;
|
|
}
|
|
|
|
public synchronized long b(long j) {
|
|
if (j == -9223372036854775807L) {
|
|
return -9223372036854775807L;
|
|
}
|
|
long j2 = this.f903c;
|
|
if (j2 != -9223372036854775807L) {
|
|
long j3 = (j2 * 90000) / 1000000;
|
|
long j4 = (4294967296L + j3) / 8589934592L;
|
|
long j5 = ((j4 - 1) * 8589934592L) + j;
|
|
long j6 = (j4 * 8589934592L) + j;
|
|
j = Math.abs(j5 - j3) < Math.abs(j6 - j3) ? j5 : j6;
|
|
}
|
|
return a((j * 1000000) / 90000);
|
|
}
|
|
|
|
public synchronized long c() {
|
|
return this.a;
|
|
}
|
|
|
|
public synchronized long d() {
|
|
long j;
|
|
j = -9223372036854775807L;
|
|
if (this.a == Long.MAX_VALUE) {
|
|
j = 0;
|
|
} else if (this.f903c != -9223372036854775807L) {
|
|
j = this.b;
|
|
}
|
|
return j;
|
|
}
|
|
}
|