/** * Returns the sum of the skipped, dropped and rendered buffers. * * @param counters The counters for which the total should be calculated. * @return The sum of the skipped, dropped and rendered buffers. */ public static int getTotalBufferCount(DecoderCounters counters) { counters.ensureUpdated(); return counters.skippedOutputBufferCount + counters.droppedBufferCount + counters.renderedOutputBufferCount; }
private static String getDecoderCountersBufferCountString(DecoderCounters counters) { if (counters == null) { return ""; } counters.ensureUpdated(); return " sib:" + counters.skippedInputBufferCount + " sb:" + counters.skippedOutputBufferCount + " rb:" + counters.renderedOutputBufferCount + " db:" + counters.droppedBufferCount + " mcdb:" + counters.maxConsecutiveDroppedBufferCount + " dk:" + counters.droppedToKeyframeCount; }
/** Invokes {@link VideoRendererEventListener#onVideoDisabled(DecoderCounters)}. */ public void disabled(DecoderCounters counters) { if (listener != null) { handler.post( () -> { counters.ensureUpdated(); listener.onVideoDisabled(counters); }); } }
/** * Returns the sum of the skipped, dropped and rendered buffers. * * @param counters The counters for which the total should be calculated. * @return The sum of the skipped, dropped and rendered buffers. */ public static int getTotalBufferCount(DecoderCounters counters) { counters.ensureUpdated(); return counters.skippedOutputBufferCount + counters.droppedBufferCount + counters.renderedOutputBufferCount; }
/** * Invokes {@link AudioRendererEventListener#onAudioDisabled(DecoderCounters)}. */ public void disabled(final DecoderCounters counters) { if (listener != null) { handler.post( () -> { counters.ensureUpdated(); listener.onAudioDisabled(counters); }); } }
public static void assertSkippedOutputBufferCount(String name, DecoderCounters counters, int expected) { counters.ensureUpdated(); int actual = counters.skippedOutputBufferCount; assertWithMessage( "Codec(" + name + ") skipped " + actual + " buffers. Expected " + expected + ".") .that(actual) .isEqualTo(expected); }
public static void assertDroppedBufferLimit(String name, DecoderCounters counters, int limit) { counters.ensureUpdated(); int actual = counters.droppedBufferCount; assertWithMessage( "Codec(" + name + ") was late decoding: " + actual + " buffers. " + "Limit: " + limit + ".") .that(actual) .isAtMost(limit); }
@Override protected void onDisabled() { try { lastInputTimeUs = C.TIME_UNSET; pendingStreamChangeCount = 0; audioSink.release(); } finally { try { super.onDisabled(); } finally { decoderCounters.ensureUpdated(); eventDispatcher.disabled(decoderCounters); } } }
public static void assertConsecutiveDroppedBufferLimit(String name, DecoderCounters counters, int limit) { counters.ensureUpdated(); int actual = counters.maxConsecutiveDroppedBufferCount; assertWithMessage( "Codec(" + name + ") was late decoding: " + actual + " buffers consecutively. " + "Limit: " + limit + ".") .that(actual) .isAtMost(limit); }
@Override protected void onDisabled() { currentWidth = Format.NO_VALUE; currentHeight = Format.NO_VALUE; currentPixelWidthHeightRatio = Format.NO_VALUE; pendingPixelWidthHeightRatio = Format.NO_VALUE; outputStreamOffsetUs = C.TIME_UNSET; lastInputTimeUs = C.TIME_UNSET; pendingOutputStreamOffsetCount = 0; clearReportedVideoSize(); clearRenderedFirstFrame(); frameReleaseTimeHelper.disable(); tunnelingOnFrameRenderedListener = null; tunneling = false; try { super.onDisabled(); } finally { decoderCounters.ensureUpdated(); eventDispatcher.disabled(decoderCounters); } }
public static void assertSkippedOutputBufferCount(String name, DecoderCounters counters, int expected) { counters.ensureUpdated(); int actual = counters.skippedOutputBufferCount; assertWithMessage( "Codec(" + name + ") skipped " + actual + " buffers. Expected " + expected + ".") .that(actual) .isEqualTo(expected); }
@Override protected void onDisabled() { inputFormat = null; audioTrackNeedsConfigure = true; waitingForKeys = false; try { releaseDecoder(); audioSink.release(); } finally { try { if (drmSession != null) { drmSessionManager.releaseSession(drmSession); } } finally { try { if (pendingDrmSession != null && pendingDrmSession != drmSession) { drmSessionManager.releaseSession(pendingDrmSession); } } finally { drmSession = null; pendingDrmSession = null; decoderCounters.ensureUpdated(); eventDispatcher.disabled(decoderCounters); } } } }
public static void assertDroppedBufferLimit(String name, DecoderCounters counters, int limit) { counters.ensureUpdated(); int actual = counters.droppedBufferCount; assertWithMessage( "Codec(" + name + ") was late decoding: " + actual + " buffers. " + "Limit: " + limit + ".") .that(actual) .isAtMost(limit); }
public static void assertConsecutiveDroppedBufferLimit(String name, DecoderCounters counters, int limit) { counters.ensureUpdated(); int actual = counters.maxConsecutiveDroppedBufferCount; assertWithMessage( "Codec(" + name + ") was late decoding: " + actual + " buffers consecutively. " + "Limit: " + limit + ".") .that(actual) .isAtMost(limit); }
@Override protected void onDisabled() { format = null; waitingForKeys = false; clearReportedVideoSize(); clearRenderedFirstFrame(); try { releaseDecoder(); } finally { try { if (drmSession != null) { drmSessionManager.releaseSession(drmSession); } } finally { try { if (pendingDrmSession != null && pendingDrmSession != drmSession) { drmSessionManager.releaseSession(pendingDrmSession); } } finally { drmSession = null; pendingDrmSession = null; decoderCounters.ensureUpdated(); eventDispatcher.disabled(decoderCounters); } } } }
private static String getDecoderCountersBufferCountString(DecoderCounters counters) { if (counters == null) { return ""; } counters.ensureUpdated(); return " rb:" + counters.renderedOutputBufferCount + " sb:" + counters.skippedOutputBufferCount + " db:" + counters.droppedOutputBufferCount + " mcdb:" + counters.maxConsecutiveDroppedOutputBufferCount; }
throw ExoPlaybackException.createForRenderer(e, getIndex()); decoderCounters.ensureUpdated();
throw ExoPlaybackException.createForRenderer(e, getIndex()); decoderCounters.ensureUpdated();
decoderCounters.ensureUpdated();
private void appendOtherInfo() { DecoderCounters counters = player.getVideoDecoderCounters(); if (counters == null) return; counters.ensureUpdated(); appendRow("Dropped/Rendered Frames", counters.droppedOutputBufferCount + counters.skippedOutputBufferCount + "/" + counters.renderedOutputBufferCount); }