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
This commit is contained in:
hschlueter 2022-04-13 14:40:34 +01:00 committed by Ian Baker
parent fe7e330fe8
commit 2ad44a79e6

View file

@ -113,8 +113,11 @@ public final class TransformationRequest {
}
/**
* Sets the rotation, in degrees, counterclockwise, to apply to each frame, automatically
* adjusting the frame's width and height to preserve all input pixels.
* Sets the rotation, in degrees, counterclockwise, to apply to each frame.
*
* <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.
*
@ -129,12 +132,15 @@ public final class TransformationRequest {
/**
* Sets the output resolution using the output height.
*
* <p>The default value {@link C#LENGTH_UNSET} corresponds to using the same height as the
* input. Output width of the displayed video will scale to preserve the video's aspect ratio
* after other transformations.
* <p>Output width of the displayed video will scale to preserve the video's aspect ratio after
* other transformations.
*
* <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.
* @return This builder.
*/