public abstract class

SurfaceOutput.Event

extends java.lang.Object

 java.lang.Object

↳androidx.camera.core.SurfaceOutput.Event

Overview

Events of the retrieved from SurfaceOutput.getSurface(Executor, Consumer).

Summary

Fields
public static final intEVENT_REQUEST_CLOSE

The provider is requesting to release the .

Methods
public abstract intgetEventCode()

Returns the event associated with the SurfaceOutput.

public abstract SurfaceOutputgetSurfaceOutput()

Gets the SurfaceOutput associated with this event.

public static SurfaceOutput.Eventof(int code, SurfaceOutput surfaceOutput)

Creates a SurfaceOutput.Event for sending to the implementation.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int EVENT_REQUEST_CLOSE

The provider is requesting to release the .

Releasing a while it's still being written into is not safe on some devices. This is why the provider of the will not release the without the CameraX's permission. Once this event is received, the implementation should stop accessing the as soon as possible, then mark the SurfaceOutput as closed by calling SurfaceOutput.close(). Once closed, CameraX will notify the provider that it's safe to release the .

Methods

public abstract int getEventCode()

Returns the event associated with the SurfaceOutput.

public abstract SurfaceOutput getSurfaceOutput()

Gets the SurfaceOutput associated with this event.

public static SurfaceOutput.Event of(int code, SurfaceOutput surfaceOutput)

Creates a SurfaceOutput.Event for sending to the implementation.