Back to Exoplayer

PlaceholderSurface (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/video/PlaceholderSurface.html

latest5.4 KB
Original Source

Package com.google.android.exoplayer2.video

Class PlaceholderSurface


@RequiresApi(17)[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classPlaceholderSurfaceextends[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")

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.

A placeholder Surface.

Nested Class Summary

- 

Nested classes/interfaces inherited from class android.view.Surface

Surface.OutOfResourcesException

- 

Nested classes/interfaces inherited from interface android.os.Parcelable

Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | boolean | secure | Deprecated.

Whether the surface is secure. |

- 

Fields inherited from class android.view.Surface

CHANGE_FRAME_RATE_ALWAYS, CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS, CREATOR, FRAME_RATE_COMPATIBILITY_DEFAULT, FRAME_RATE_COMPATIBILITY_FIXED_SOURCE, ROTATION_0, ROTATION_180, ROTATION_270, ROTATION_90

- 

Fields inherited from interface android.os.Parcelable

CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | static boolean | isSecureSupported​(Context context) | Deprecated.

Returns whether the device supports secure placeholder surfaces. | | static PlaceholderSurface | newInstanceV17​(Context context, boolean secure) | Deprecated.

Returns a newly created placeholder surface. | | void | release() | Deprecated. |

- 

Methods inherited from class android.view.Surface

describeContents, finalize, isValid, lockCanvas, lockHardwareCanvas, readFromParcel, setFrameRate, setFrameRate, toString, unlockCanvas, unlockCanvasAndPost, writeToParcel

- 

Methods inherited from class java.lang.Object

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

Field Detail

- 

secure

public final boolean secure

Deprecated.

Whether the surface is secure.

Method Detail

- 

isSecureSupported

public static boolean isSecureSupported​([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context)

Deprecated.

Returns whether the device supports secure placeholder surfaces. Parameters:context - Any Context.Returns:Whether the device supports secure placeholder surfaces.

- 

newInstanceV17

public static[PlaceholderSurface](PlaceholderSurface.html "class in com.google.android.exoplayer2.video")newInstanceV17​([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,
                                                boolean secure)

Deprecated.

Returns a newly created placeholder surface. The surface must be released by calling release() when it's no longer required.

Must only be called if Util.SDK_INT is 17 or higher.

Parameters:context - Any Context.secure - Whether a secure surface is required. Must only be requested if isSecureSupported(Context) returns true.Throws:IllegalStateException - If a secure surface is requested on a device for which isSecureSupported(Context) returns false.

- 

release

public void release()

Deprecated. Overrides:release in class Surface