mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add pixel aspect ratio to Format.toLogString
#cherrypick PiperOrigin-RevId: 698770714
This commit is contained in:
parent
73c4bb6e1f
commit
827966b7a4
@ -16,6 +16,7 @@
|
||||
package androidx.media3.common;
|
||||
|
||||
import static androidx.media3.common.util.Assertions.checkState;
|
||||
import static com.google.common.math.DoubleMath.fuzzyEquals;
|
||||
import static java.lang.annotation.ElementType.TYPE_USE;
|
||||
|
||||
import android.os.Bundle;
|
||||
@ -1442,6 +1443,9 @@ public final class Format {
|
||||
if (format.width != NO_VALUE && format.height != NO_VALUE) {
|
||||
builder.append(", res=").append(format.width).append("x").append(format.height);
|
||||
}
|
||||
if (!fuzzyEquals(format.pixelWidthHeightRatio, 1, 0.001)) {
|
||||
builder.append(", par=").append(Util.formatInvariant("%.3f", format.pixelWidthHeightRatio));
|
||||
}
|
||||
if (format.colorInfo != null && format.colorInfo.isValid()) {
|
||||
builder.append(", color=").append(format.colorInfo.toLogString());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user