Tweak on-screen overlay a bit

This commit is contained in:
Cameron Gutman
2019-07-10 20:55:01 -07:00
parent 4469013bb5
commit 40a3cc2ecb
4 changed files with 12 additions and 11 deletions

View File

@@ -622,6 +622,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer {
decoder = "(unknown)";
}
float decodeTimeMs = (float)lastTwo.decoderTimeMs / lastTwo.totalFramesReceived;
String perfText = context.getString(
R.string.perf_overlay_text,
initialWidth + "x" + initialHeight,
@@ -630,8 +631,8 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer {
fps.receivedFps,
fps.renderedFps,
(float)lastTwo.framesLost / lastTwo.totalFrames * 100,
(float)lastTwo.totalTimeMs / lastTwo.totalFramesReceived,
(float)lastTwo.decoderTimeMs / lastTwo.totalFramesReceived);
((float)lastTwo.totalTimeMs / lastTwo.totalFramesReceived) - decodeTimeMs,
decodeTimeMs);
perfListener.onPerfUpdate(perfText);
}