# SurfaceInfo

# SurfaceInfo

Artifact:[androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/common/SurfaceInfo.java+class:androidx.media3.common.SurfaceInfo)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/common/SurfaceInfo "View this page in Java")

<br />

```
@UnstableApi
class SurfaceInfo
```

<br />

*** ** * ** ***

Immutable value class for a[Surface](https://developer.android.com/reference/android/view/Surface.html)and supporting information.

## Summary

|                                                                                                                                                                                                                                                                                                                                  ### Public constructors                                                                                                                                                                                                                                                                                                                                  |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#SurfaceInfo(android.view.Surface,int,int))`(surface: `[Surface](https://developer.android.com/reference/android/view/Surface.html)`!, width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Creates a new instance.                                                                                                                                                                                                                                               |
| [SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#SurfaceInfo(android.view.Surface,int,int,int))`(` ` surface: `[Surface](https://developer.android.com/reference/android/view/Surface.html)`!,` ` width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` orientationDegrees: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Creates a new instance.                                                                                                                          |
| [SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#SurfaceInfo(android.view.Surface,int,int,int,boolean))`(` ` surface: `[Surface](https://developer.android.com/reference/android/view/Surface.html)`!,` ` width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` orientationDegrees: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` isEncoderInputSurface: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) `)` Creates a new instance. |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#equals(java.lang.Object))`(o: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#hashCode())`()`                                                                                              |

|                                ### Public properties                                |
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [height](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#height()) The height of frames rendered to the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface()), in pixels.                                                      |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isEncoderInputSurface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#isEncoderInputSurface()) Whether the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface())is an encoder input surface.                                 |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [orientationDegrees](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#orientationDegrees()) A counter-clockwise rotation to apply to frames before rendering them to the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface()). |
| [Surface](https://developer.android.com/reference/android/view/Surface.html)`!`     | [surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface()) The[Surface](https://developer.android.com/reference/android/view/Surface.html).                                                                                                                          |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [width](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#width()) The width of frames rendered to the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface()), in pixels.                                                         |

## Public constructors

### SurfaceInfo

```
SurfaceInfo(surface: Surface!, width: Int, height: Int)
```

Creates a new instance.  

### SurfaceInfo

```
SurfaceInfo(
    surface: Surface!,
    width: Int,
    height: Int,
    orientationDegrees: Int
)
```

Creates a new instance.  

### SurfaceInfo

```
SurfaceInfo(
    surface: Surface!,
    width: Int,
    height: Int,
    orientationDegrees: Int,
    isEncoderInputSurface: Boolean
)
```

Creates a new instance.  

## Public functions

### equals

```
fun equals(o: Any?): Boolean
```  

### hashCode

```
fun hashCode(): Int
```  

## Public properties

### height

```
val height: Int
```

The height of frames rendered to the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface()), in pixels.  

### isEncoderInputSurface

```
val isEncoderInputSurface: Boolean
```

Whether the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface())is an encoder input surface.  

### orientationDegrees

```
val orientationDegrees: Int
```

A counter-clockwise rotation to apply to frames before rendering them to the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface()).

Must be 0, 90, 180, or 270 degrees. Default is 0.  

### surface

```
val surface: Surface!
```

The[Surface](https://developer.android.com/reference/android/view/Surface.html).  

### width

```
val width: Int
```

The width of frames rendered to the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface()), in pixels.