-
@RequiresApi(value = Build.VERSION_CODES.LOLLIPOP) public interface ActionHolder
The holder of Action. This class should keep a list or set of currently running actions, and offers to them the base Camera2 objects that are needed to apply changes. This class, or an holder of it, should also forward the capture callbacks to all Actions. See com.otaliastudios.cameraview.engine.Camera2Engine for our implementation.
-
-
Method Summary
Modifier and Type Method Description abstract voidaddAction(@NonNull() Action action)Adds a new action abstract voidremoveAction(@NonNull() Action action)Removes a previously added action abstract CameraCharacteristicsgetCharacteristics(@NonNull() Action action)Returns the CameraCharacteristics of the currentcamera device. abstract TotalCaptureResultgetLastResult(@NonNull() Action action)Returns the latest TotalCaptureResult. abstract CaptureRequest.BuildergetBuilder(@NonNull() Action action)Returns the current CaptureRequest.Builder so thatactions can apply changes to it and later submit them. abstract voidapplyBuilder(@NonNull() Action source)Applies the current builder (as per getBuilder)as a repeating request on the preview. abstract voidapplyBuilder(@NonNull() Action source, @NonNull() CaptureRequest.Builder builder)Applies the given builder as a single capture request.Callers can catch the exception and choose what to do. -
-
Method Detail
-
addAction
abstract void addAction(@NonNull() Action action)
Adds a new action
- Parameters:
action- action
-
removeAction
abstract void removeAction(@NonNull() Action action)
Removes a previously added action
- Parameters:
action- action
-
getCharacteristics
@NonNull() abstract CameraCharacteristics getCharacteristics(@NonNull() Action action)
Returns the CameraCharacteristics of the currentcamera device.
- Parameters:
action- action
-
getLastResult
@Nullable() abstract TotalCaptureResult getLastResult(@NonNull() Action action)
Returns the latest TotalCaptureResult. Can be usedby actions to start querying the state before receiving theirfirst frame.
- Parameters:
action- action
-
getBuilder
@NonNull() abstract CaptureRequest.Builder getBuilder(@NonNull() Action action)
Returns the current CaptureRequest.Builder so thatactions can apply changes to it and later submit them.
- Parameters:
action- action
-
applyBuilder
abstract void applyBuilder(@NonNull() Action source)
Applies the current builder (as per getBuilder)as a repeating request on the preview.
- Parameters:
source- action
-
applyBuilder
abstract void applyBuilder(@NonNull() Action source, @NonNull() CaptureRequest.Builder builder)
Applies the given builder as a single capture request.Callers can catch the exception and choose what to do.
- Parameters:
source- actionbuilder- builder
-
-
-
-