mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Read resolution for debug text view from VideoSize object to reflect changes from video effects
This commit is contained in:
parent
bcfad4b3b4
commit
0cdae9af20
1 changed files with 5 additions and 3 deletions
|
|
@ -22,6 +22,7 @@ import androidx.annotation.Nullable;
|
||||||
import androidx.media3.common.ColorInfo;
|
import androidx.media3.common.ColorInfo;
|
||||||
import androidx.media3.common.Format;
|
import androidx.media3.common.Format;
|
||||||
import androidx.media3.common.Player;
|
import androidx.media3.common.Player;
|
||||||
|
import androidx.media3.common.VideoSize;
|
||||||
import androidx.media3.common.util.Assertions;
|
import androidx.media3.common.util.Assertions;
|
||||||
import androidx.media3.common.util.UnstableApi;
|
import androidx.media3.common.util.UnstableApi;
|
||||||
import androidx.media3.exoplayer.DecoderCounters;
|
import androidx.media3.exoplayer.DecoderCounters;
|
||||||
|
|
@ -127,6 +128,7 @@ public class DebugTextViewHelper {
|
||||||
@UnstableApi
|
@UnstableApi
|
||||||
protected String getVideoString() {
|
protected String getVideoString() {
|
||||||
Format format = player.getVideoFormat();
|
Format format = player.getVideoFormat();
|
||||||
|
VideoSize videoSize = player.getVideoSize();
|
||||||
DecoderCounters decoderCounters = player.getVideoDecoderCounters();
|
DecoderCounters decoderCounters = player.getVideoDecoderCounters();
|
||||||
if (format == null || decoderCounters == null) {
|
if (format == null || decoderCounters == null) {
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -136,11 +138,11 @@ public class DebugTextViewHelper {
|
||||||
+ "(id:"
|
+ "(id:"
|
||||||
+ format.id
|
+ format.id
|
||||||
+ " r:"
|
+ " r:"
|
||||||
+ format.width
|
+ videoSize.width
|
||||||
+ "x"
|
+ "x"
|
||||||
+ format.height
|
+ videoSize.height
|
||||||
+ getColorInfoString(format.colorInfo)
|
+ getColorInfoString(format.colorInfo)
|
||||||
+ getPixelAspectRatioString(format.pixelWidthHeightRatio)
|
+ getPixelAspectRatioString(videoSize.pixelWidthHeightRatio)
|
||||||
+ getDecoderCountersBufferCountString(decoderCounters)
|
+ getDecoderCountersBufferCountString(decoderCounters)
|
||||||
+ " vfpo: "
|
+ " vfpo: "
|
||||||
+ getVideoFrameProcessingOffsetAverageString(
|
+ getVideoFrameProcessingOffsetAverageString(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue