Back to Exoplayer

ScaleAndRotateTransformation (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/effect/ScaleAndRotateTransformation.html

latest5.7 KB
Original Source

Package com.google.android.exoplayer2.effect

Class ScaleAndRotateTransformation

  • java.lang.Object

    • com.google.android.exoplayer2.effect.ScaleAndRotateTransformation
  • All Implemented Interfaces:GlEffect, GlMatrixTransformation, MatrixTransformation, Effect


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classScaleAndRotateTransformationextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[MatrixTransformation](MatrixTransformation.html "interface in com.google.android.exoplayer2.effect")

Deprecated. com.google.android.exoplayer2 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.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | ScaleAndRotateTransformation.Builder | Deprecated.

A builder for ScaleAndRotateTransformation instances. |

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | float | rotationDegrees | Deprecated.

The counterclockwise rotation, in degrees. | | float | scaleX | Deprecated.

The multiplier by which the frame will scale horizontally, along the x-axis. | | float | scaleY | Deprecated.

The multiplier by which the frame will scale vertically, along the y-axis. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | Size | configure​(int inputWidth, int inputHeight) | Deprecated.

Configures the input and output dimensions. | | Matrix | getMatrix​(long presentationTimeUs) | Deprecated.

Returns the 3x3 transformation Matrix to apply to the frame with the given timestamp. | | boolean | isNoOp​(int inputWidth, int inputHeight) | Deprecated.

Returns whether a GlEffect applies no change at every timestamp. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

- 

Methods inherited from interface com.google.android.exoplayer2.effect.GlMatrixTransformation

toGlShaderProgram

- 

Methods inherited from interface com.google.android.exoplayer2.effect.MatrixTransformation

getGlMatrixArray

Field Detail

- 

scaleX

public final float scaleX

Deprecated.

The multiplier by which the frame will scale horizontally, along the x-axis.

- 

scaleY

public final float scaleY

Deprecated.

The multiplier by which the frame will scale vertically, along the y-axis.

- 

rotationDegrees

public final float rotationDegrees

Deprecated.

The counterclockwise rotation, in degrees.

Method Detail

- 

configure

public[Size](../util/Size.html "class in com.google.android.exoplayer2.util")configure​(int inputWidth,
                      int inputHeight)

Deprecated.

Description copied from interface: GlMatrixTransformation

Configures the input and output dimensions.

Must be called before GlMatrixTransformation.getGlMatrixArray(long).

Specified by:configure in interface GlMatrixTransformationParameters:inputWidth - The input frame width, in pixels.inputHeight - The input frame height, in pixels.Returns:The output frame width and height, in pixels.

- 

getMatrix

public[Matrix](https://developer.android.com/reference/android/graphics/Matrix.html "class or interface in android.graphics")getMatrix​(long presentationTimeUs)

Deprecated.

Description copied from interface: MatrixTransformation

Returns the 3x3 transformation Matrix to apply to the frame with the given timestamp. Specified by:getMatrix in interface MatrixTransformation

- 

isNoOp

public boolean isNoOp​(int inputWidth,
                      int inputHeight)

Deprecated.

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 GlEffectParameters:inputWidth - The input frame width, in pixels.inputHeight - The input frame height, in pixels.