Commit 2ad44a79 by hschlueter Committed by Ian Baker

Clarify TransformationRequest setResolution javadoc.

Scaling and rotation using ScaleToFitFrameProcessor may change the
the resolution and aspect ratio, so defaulting to the same as the
input is no longer accurate.

PiperOrigin-RevId: 441463349
parent fe7e330f
...@@ -113,8 +113,11 @@ public final class TransformationRequest { ...@@ -113,8 +113,11 @@ public final class TransformationRequest {
} }
/** /**
* Sets the rotation, in degrees, counterclockwise, to apply to each frame, automatically * Sets the rotation, in degrees, counterclockwise, to apply to each frame.
* adjusting the frame's width and height to preserve all input pixels. *
* <p>The output frame's width and height are automatically adjusted to preserve all input
* pixels. The rotated input frame is fitted inside an enclosing black rectangle if its edges
* aren't parallel to the x and y axes.
* *
* <p>The default value, 0, corresponds to not applying any rotation. * <p>The default value, 0, corresponds to not applying any rotation.
* *
...@@ -129,12 +132,15 @@ public final class TransformationRequest { ...@@ -129,12 +132,15 @@ public final class TransformationRequest {
/** /**
* Sets the output resolution using the output height. * Sets the output resolution using the output height.
* *
* <p>The default value {@link C#LENGTH_UNSET} corresponds to using the same height as the * <p>Output width of the displayed video will scale to preserve the video's aspect ratio after
* input. Output width of the displayed video will scale to preserve the video's aspect ratio * other transformations.
* after other transformations.
* *
* <p>For example, a 1920x1440 video can be scaled to 640x480 by calling setResolution(480). * <p>For example, a 1920x1440 video can be scaled to 640x480 by calling setResolution(480).
* *
* <p>The default value {@link C#LENGTH_UNSET} leaves the width and height unchanged unless
* {@linkplain #setScale(float,float) scaling} or @linkplain #setRotationDegrees(float)
* rotation} are requested.
*
* @param outputHeight The output height of the displayed video, in pixels. * @param outputHeight The output height of the displayed video, in pixels.
* @return This builder. * @return This builder.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment