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;
|
package androidx.media3.common;
|
||||||
|
|
||||||
import static androidx.media3.common.util.Assertions.checkState;
|
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 static java.lang.annotation.ElementType.TYPE_USE;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -1442,6 +1443,9 @@ public final class Format {
|
|||||||
if (format.width != NO_VALUE && format.height != NO_VALUE) {
|
if (format.width != NO_VALUE && format.height != NO_VALUE) {
|
||||||
builder.append(", res=").append(format.width).append("x").append(format.height);
|
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()) {
|
if (format.colorInfo != null && format.colorInfo.isValid()) {
|
||||||
builder.append(", color=").append(format.colorInfo.toLogString());
|
builder.append(", color=").append(format.colorInfo.toLogString());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user