mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Add pixel aspect ratio to Format.toLogString
#cherrypick PiperOrigin-RevId: 698770714
This commit is contained in:
parent
73c4bb6e1f
commit
827966b7a4
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Reference in a new issue