UseCase
public
abstract
class
UseCase
extends Object
| java.lang.Object
|
| ↳ |
androidx.camera.core.UseCase
|
Known direct subclasses
| ImageAnalysis |
A use case providing CPU accessible images for an app to perform image analysis on.
|
| ImageCapture |
A use case for taking a picture.
|
| Preview |
A use case that provides a camera preview stream for displaying on-screen.
|
|
The use case which all other use cases are built on top of.
A UseCase provides functionality to map the set of arguments in a use case to arguments
that are usable by a camera. UseCase also will communicate of the active/inactive state to
the Camera.
Summary
Protected constructors |
UseCase(UseCaseConfig<?> useCaseConfig)
Creates a named instance of the use case.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Protected constructors
UseCase
protected UseCase (UseCaseConfig<?> useCaseConfig)
Creates a named instance of the use case.
| Parameters |
useCaseConfig |
UseCaseConfig: the configuration object used for this use case
|
Public methods
getName
public String getName ()
Protected methods
clear
protected void clear ()
Clears internal state of this use case.
onSuggestedResolutionUpdated
protected abstract Map<String, Size> onSuggestedResolutionUpdated (Map<String, Size> suggestedResolutionMap)
Called when binding new use cases via CameraX.bindToLifecycle(LifecycleOwner, UseCase). Override to create necessary objects like ImageReader
depending on the resolution.
| Parameters |
suggestedResolutionMap |
Map: A map of the names of the CameraDevice to the suggested
resolution that depends on camera
device capability and what and how many use cases will be
bound. |
| Returns |
Map<String, Size> |
The map with the resolutions that finally used to create the SessionConfig to
attach to the camera device.
|
protected void setImageFormat (int imageFormat)
| Parameters |
imageFormat |
int |