Rabbit-R1/android (non root)/java/sources/org/webrtc/TimestampAligner.java

36 lines
1 KiB
Java
Raw Normal View History

2024-05-21 21:08:36 +00:00
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.");
}
}
}