From d300b37a5584e79e839c690582de2cb84f8336ae 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 --- .../androidx/media3/transformer/TransformationRequest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/transformer/src/main/java/androidx/media3/transformer/TransformationRequest.java b/libraries/transformer/src/main/java/androidx/media3/transformer/TransformationRequest.java index a1c82595c2..6d7c7a9026 100644 --- a/libraries/transformer/src/main/java/androidx/media3/transformer/TransformationRequest.java +++ b/libraries/transformer/src/main/java/androidx/media3/transformer/TransformationRequest.java @@ -215,7 +215,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. @@ -226,6 +226,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. */