Skip to content

Commit

Permalink
Add debug info to help debugging a pipeline stall issue (2) (#25)
Browse files Browse the repository at this point in the history
In #23, we've added some debug info to help debug an issue where the
rendering pipeline seems to be stalled.

This PR adds the processed buffer count to the debug info and also
renamed the queued input buffer count to make it clearer.
  • Loading branch information
SylvainMorel authored Jun 17, 2024
1 parent 4c5b12e commit ea290fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ public final class Util {
public static int audioLastFeedInputBufferStep = 0;
public static int videoLastDrainOutputBufferStep = 0;
public static int audioLastDrainOutputBufferStep = 0;
public static int currentAccumulatedVideoQueuedFrames = 0;
public static int currentQueuedInputBuffers = 0;
public static int currentProcessedOutputBuffers = 0;

/** An empty long array. */
@UnstableApi public static final long[] EMPTY_LONG_ARRAY = new long[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,8 @@ protected void onStarted() {
hasNotifiedAvDesyncError = false;
hasNotifiedAvDesyncSkippedFramesError = false;
queuedFrames = 0;
Util.currentAccumulatedVideoQueuedFrames = 0;
Util.currentQueuedInputBuffers = 0;
Util.currentProcessedOutputBuffers = 0;

videoFrameReleaseControl.onStarted();
}
Expand Down Expand Up @@ -1227,7 +1228,7 @@ protected void onQueueInputBuffer(DecoderInputBuffer buffer) throws ExoPlaybackE

// MIREGO: added
queuedFrames++;
Util.currentAccumulatedVideoQueuedFrames++;
Util.currentQueuedInputBuffers++;
if (queuedFrames >= NOTIFY_QUEUED_FRAMES_THRESHOLD) {
maybeNotifyQueuedFrames();
}
Expand Down Expand Up @@ -1613,6 +1614,7 @@ private void onProcessedTunneledEndOfStream() {
@CallSuper
@Override
protected void onProcessedOutputBuffer(long presentationTimeUs) {
Util.currentProcessedOutputBuffers++;
super.onProcessedOutputBuffer(presentationTimeUs);
if (!tunneling) {
buffersInCodecCount--;
Expand Down

0 comments on commit ea290fe

Please sign in to comment.