SurfaceOutput.Event
@AutoValue
public abstract class SurfaceOutput.Event
Events of the Surface retrieved from getSurface.
Summary
Constants |
|
|---|---|
static final int |
Public methods |
|
|---|---|
abstract int |
Returns the event associated with the |
abstract @NonNull SurfaceOutput |
Gets the |
Constants
EVENT_REQUEST_CLOSE
public static final int EVENT_REQUEST_CLOSE = 0
The Surface provider is requesting to release the Surface.
Releasing a Surface while it's still being written into is not safe on some devices. This is why the provider of the Surface will not release the Surface without the CameraX's permission. Once this event is received, the implementation should stop accessing the Surface as soon as possible, then mark the SurfaceOutput as closed by calling close. Once closed, CameraX will notify the Surface provider that it's safe to release the Surface.
Public methods
getEventCode
public abstract int getEventCode()
Returns the event associated with the SurfaceOutput.
getSurfaceOutput
public abstract @NonNull SurfaceOutput getSurfaceOutput()
Gets the SurfaceOutput associated with this event.