From 4f4f28b9231e1e63bf321a99599131531ba091e9 Mon Sep 17 00:00:00 2001 From: huangdarwin Date: Thu, 12 Jan 2023 17:10:22 +0000 Subject: [PATCH] Transformer: Clarify setResolution javadoc. This class may be removed soon, but in the meantime clarify this method's javadoc summary fragment to make it marginally clearer that this only affects the "displayed" height instead of the "encoded" height. PiperOrigin-RevId: 501582219 --- .../exoplayer2/transformer/TransformationRequest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java index 958e340e1b..03bf3edc77 100644 --- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java +++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java @@ -213,7 +213,7 @@ public final class TransformationRequest { } /** - * Sets the output resolution using the output height. + * Sets the output resolution using the output height of the displayed video. * *

Output width of the displayed video will scale to preserve the video's aspect ratio after * other transformations. @@ -224,6 +224,10 @@ public final class TransformationRequest { * {@linkplain #setScale(float,float) scaling} or @linkplain #setRotationDegrees(float) * rotation} are requested. * + *

Note that the output encoded video's dimensions may be swapped from the displayed video's + * dimensions, if the displayed video's height > width. This is to improve compatibility among + * different device encoders. + * * @param outputHeight The output height of the displayed video, in pixels. * @return This builder. */