Rabbit-R1/switch port/java/sources/androidx/media3/exoplayer/DecoderCounters.java

50 lines
3 KiB
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package androidx.media3.exoplayer;
import androidx.media3.common.util.Util;
/* loaded from: classes2.dex */
public final class DecoderCounters {
public int decoderInitCount;
public int decoderReleaseCount;
public int droppedBufferCount;
public int droppedInputBufferCount;
public int droppedToKeyframeCount;
public int maxConsecutiveDroppedBufferCount;
public int queuedInputBufferCount;
public int renderedOutputBufferCount;
public int skippedInputBufferCount;
public int skippedOutputBufferCount;
public long totalVideoFrameProcessingOffsetUs;
public int videoFrameProcessingOffsetCount;
private void addVideoFrameProcessingOffsets(long j, int i) {
this.totalVideoFrameProcessingOffsetUs += j;
this.videoFrameProcessingOffsetCount += i;
}
public synchronized void ensureUpdated() {
}
public void merge(DecoderCounters decoderCounters) {
this.decoderInitCount += decoderCounters.decoderInitCount;
this.decoderReleaseCount += decoderCounters.decoderReleaseCount;
this.queuedInputBufferCount += decoderCounters.queuedInputBufferCount;
this.skippedInputBufferCount += decoderCounters.skippedInputBufferCount;
this.renderedOutputBufferCount += decoderCounters.renderedOutputBufferCount;
this.skippedOutputBufferCount += decoderCounters.skippedOutputBufferCount;
this.droppedBufferCount += decoderCounters.droppedBufferCount;
this.droppedInputBufferCount += decoderCounters.droppedInputBufferCount;
this.maxConsecutiveDroppedBufferCount = Math.max(this.maxConsecutiveDroppedBufferCount, decoderCounters.maxConsecutiveDroppedBufferCount);
this.droppedToKeyframeCount += decoderCounters.droppedToKeyframeCount;
addVideoFrameProcessingOffsets(decoderCounters.totalVideoFrameProcessingOffsetUs, decoderCounters.videoFrameProcessingOffsetCount);
}
public void addVideoFrameProcessingOffset(long j) {
addVideoFrameProcessingOffsets(j, 1);
}
public String toString() {
return Util.formatInvariant("DecoderCounters {\n decoderInits=%s,\n decoderReleases=%s\n queuedInputBuffers=%s\n skippedInputBuffers=%s\n renderedOutputBuffers=%s\n skippedOutputBuffers=%s\n droppedBuffers=%s\n droppedInputBuffers=%s\n maxConsecutiveDroppedBuffers=%s\n droppedToKeyframeEvents=%s\n totalVideoFrameProcessingOffsetUs=%s\n videoFrameProcessingOffsetCount=%s\n}", Integer.valueOf(this.decoderInitCount), Integer.valueOf(this.decoderReleaseCount), Integer.valueOf(this.queuedInputBufferCount), Integer.valueOf(this.skippedInputBufferCount), Integer.valueOf(this.renderedOutputBufferCount), Integer.valueOf(this.skippedOutputBufferCount), Integer.valueOf(this.droppedBufferCount), Integer.valueOf(this.droppedInputBufferCount), Integer.valueOf(this.maxConsecutiveDroppedBufferCount), Integer.valueOf(this.droppedToKeyframeCount), Long.valueOf(this.totalVideoFrameProcessingOffsetUs), Integer.valueOf(this.videoFrameProcessingOffsetCount));
}
}