Commit c24ef592 by Kiall Mac Innes

Include Pixel Aspect Ratio in DebugTextViewHelper

Add the video Pixel Aspect Ratio to the DebugTextViewHelper in order
to help debug issues related to PAR changes etc
parent 2439c582
...@@ -163,9 +163,15 @@ public final class DebugTextViewHelper implements Runnable, ExoPlayer.EventListe ...@@ -163,9 +163,15 @@ public final class DebugTextViewHelper implements Runnable, ExoPlayer.EventListe
if (format == null) { if (format == null) {
return ""; return "";
} }
float par = format.pixelWidthHeightRatio;
String parInfo = "";
if (par != Format.NO_VALUE && (int) par != 1) {
// Add pixel aspect ratio only when it's useful
parInfo = " par:" + format.pixelWidthHeightRatio;
}
return "\n" + format.sampleMimeType + "(id:" + format.id + " r:" + format.width + "x" return "\n" + format.sampleMimeType + "(id:" + format.id + " r:" + format.width + "x"
+ format.height + getDecoderCountersBufferCountString(player.getVideoDecoderCounters()) + format.height + parInfo
+ ")"; + getDecoderCountersBufferCountString(player.getVideoDecoderCounters()) + ")";
} }
private String getAudioString() { private String getAudioString() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment