mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
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:
parent
fe7e330fe8
commit
2ad44a79e6
1 changed files with 11 additions and 5 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue