Class DummySurface
- java.lang.Object
-
- android.view.Surface
-
- com.google.android.exoplayer2.video.DummySurface
-
- All Implemented Interfaces:
Parcelable
@RequiresApi(17) public final class DummySurface extends Surface
A dummySurface
.
-
-
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
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 Modifier and Type Method Description static boolean
isSecureSupported(Context context)
Returns whether the device supports secure dummy surfaces.static DummySurface
newInstanceV17(Context context, boolean secure)
Returns a newly created dummy surface.void
release()
-
Methods inherited from class android.view.Surface
describeContents, finalize, isValid, lockCanvas, lockHardwareCanvas, readFromParcel, setFrameRate, setFrameRate, toString, unlockCanvas, unlockCanvasAndPost, writeToParcel
-
-
-
-
Method Detail
-
isSecureSupported
public static boolean isSecureSupported(Context context)
Returns whether the device supports secure dummy surfaces.- Parameters:
context
- AnyContext
.- Returns:
- Whether the device supports secure dummy surfaces.
-
newInstanceV17
public static DummySurface newInstanceV17(Context context, boolean secure)
Returns a newly created dummy surface. The surface must be released by callingrelease()
when it's no longer required.Must only be called if
Util.SDK_INT
is 17 or higher.- Parameters:
context
- AnyContext
.secure
- Whether a secure surface is required. Must only be requested ifisSecureSupported(Context)
returnstrue
.- Throws:
IllegalStateException
- If a secure surface is requested on a device for whichisSecureSupported(Context)
returnsfalse
.
-
-