Skip to content

Commit

Permalink
Include Pixel Aspect Ratio in DebugTextViewHelper
Browse files Browse the repository at this point in the history
Add the video Pixel Aspect Ratio to the DebugTextViewHelper in order
to help debug issues related to PAR changes etc
  • Loading branch information
kiall committed Jun 11, 2017
1 parent 2439c58 commit c24ef59
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,15 @@ private String getVideoString() {
if (format == null) {
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"
+ format.height + getDecoderCountersBufferCountString(player.getVideoDecoderCounters())
+ ")";
+ format.height + parInfo
+ getDecoderCountersBufferCountString(player.getVideoDecoderCounters()) + ")";
}

private String getAudioString() {
Expand Down

0 comments on commit c24ef59

Please sign in to comment.