Skip to content

Commit

Permalink
Read resolution for debug text view from VideoSize object to reflect …
Browse files Browse the repository at this point in the history
…changes from video effects
  • Loading branch information
dsparano authored and claincly committed Mar 4, 2024
1 parent bcfad4b commit 0cdae9a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import androidx.media3.common.ColorInfo;
import androidx.media3.common.Format;
import androidx.media3.common.Player;
import androidx.media3.common.VideoSize;
import androidx.media3.common.util.Assertions;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.exoplayer.DecoderCounters;
Expand Down Expand Up @@ -127,6 +128,7 @@ protected String getPlayerStateString() {
@UnstableApi
protected String getVideoString() {
Format format = player.getVideoFormat();
VideoSize videoSize = player.getVideoSize();
DecoderCounters decoderCounters = player.getVideoDecoderCounters();
if (format == null || decoderCounters == null) {
return "";
Expand All @@ -136,11 +138,11 @@ protected String getVideoString() {
+ "(id:"
+ format.id
+ " r:"
+ format.width
+ videoSize.width
+ "x"
+ format.height
+ videoSize.height
+ getColorInfoString(format.colorInfo)
+ getPixelAspectRatioString(format.pixelWidthHeightRatio)
+ getPixelAspectRatioString(videoSize.pixelWidthHeightRatio)
+ getDecoderCountersBufferCountString(decoderCounters)
+ " vfpo: "
+ getVideoFrameProcessingOffsetAverageString(
Expand Down

0 comments on commit 0cdae9a

Please sign in to comment.