Class ScaleAndRotateTransformation

  • All Implemented Interfaces:
    GlEffect, GlMatrixTransformation, MatrixTransformation, Effect

    public final class ScaleAndRotateTransformation
    extends Object
    implements MatrixTransformation
    Deprecated. is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Specifies a simple rotation and/or scale to apply in the vertex shader.

    All input frames' pixels will be preserved and copied into an output frame, potentially changing the width and height of the frame by scaling dimensions to fit.

    The background color of the output frame will be black, with alpha = 0 if applicable.

    • Field Detail

      • scaleX

        public final float scaleX
        The multiplier by which the frame will scale horizontally, along the x-axis.
      • scaleY

        public final float scaleY
        The multiplier by which the frame will scale vertically, along the y-axis.
      • rotationDegrees

        public final float rotationDegrees
        The counterclockwise rotation, in degrees.
    • Method Detail

      • isNoOp

        public boolean isNoOp​(int inputWidth,
                              int inputHeight)
        Description copied from interface: GlEffect
        Returns whether a GlEffect applies no change at every timestamp.

        This can be used as a hint to skip this instance.

        Specified by:
        isNoOp in interface GlEffect
        inputWidth - The input frame width, in pixels.
        inputHeight - The input frame height, in pixels.