mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
36 lines
1 KiB
Java
36 lines
1 KiB
Java
|
package org.webrtc;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public class TimestampAligner {
|
||
|
private volatile long nativeTimestampAligner = nativeCreateTimestampAligner();
|
||
|
|
||
|
private static native long nativeCreateTimestampAligner();
|
||
|
|
||
|
private static native void nativeReleaseTimestampAligner(long j);
|
||
|
|
||
|
private static native long nativeRtcTimeNanos();
|
||
|
|
||
|
private static native long nativeTranslateTimestamp(long j, long j2);
|
||
|
|
||
|
public static long getRtcTimeNanos() {
|
||
|
return nativeRtcTimeNanos();
|
||
|
}
|
||
|
|
||
|
public long translateTimestamp(long j) {
|
||
|
checkNativeAlignerExists();
|
||
|
return nativeTranslateTimestamp(this.nativeTimestampAligner, j);
|
||
|
}
|
||
|
|
||
|
public void dispose() {
|
||
|
checkNativeAlignerExists();
|
||
|
nativeReleaseTimestampAligner(this.nativeTimestampAligner);
|
||
|
this.nativeTimestampAligner = 0L;
|
||
|
}
|
||
|
|
||
|
private void checkNativeAlignerExists() {
|
||
|
if (this.nativeTimestampAligner == 0) {
|
||
|
throw new IllegalStateException("TimestampAligner has been disposed.");
|
||
|
}
|
||
|
}
|
||
|
}
|