public interface CameraName
CameraName identifies a HardwareDevice which is a camera.| Modifier and Type | Method and Description |
|---|---|
void |
asyncRequestCameraPermission(Context context,
Deadline deadline,
Continuation<? extends Consumer<java.lang.Boolean>> continuation)
Requests from the user permission to use the camera if same has not already been granted.
|
CameraCharacteristics |
getCameraCharacteristics()
Query the capabilities of a camera device.
|
boolean |
isCameraDirection()
Returns whether or not this name is that of a builtin phone camera.
|
boolean |
isSwitchable()
Returns whether this name is one representing the ability to switch amongst a
series of member cameras.
|
boolean |
isUnknown()
Returns whether or not this name represents that of an unknown or indeterminate camera.
|
boolean |
isWebcam()
Returns whether or not this name is that of a webcam.
|
boolean |
requestCameraPermission(Deadline deadline)
Requests from the user permission to use the camera if same has not already been granted.
|
boolean isWebcam()
CameraName can be cast to a WebcamName.WebcamNameboolean isCameraDirection()
CameraName can be cast to a BuiltinCameraName.BuiltinCameraNameboolean isSwitchable()
SwitchableCameraName.SwitchableCameraNameboolean isUnknown()
void asyncRequestCameraPermission(Context context,
Deadline deadline,
Continuation<? extends Consumer<java.lang.Boolean>> continuation)
asyncRequestCameraPermission(Context, Deadline, org.firstinspires.ftc.robotcore.external.function.Continuation<? extends org.firstinspires.ftc.robotcore.external.function.Consumer<java.lang.Boolean>>) has itself returned. The report will
be delivered using the indicated Continuationcontext - the context in which the permission request should rundeadline - the time by which the request must be honored or given up as ungranted.
If this Deadline is cancelled while the request is outstanding,
then the permission request will be aborted and false reported as
the result of the request.continuation - the dispatcher used to deliver results of the permission requestjava.lang.IllegalArgumentException - if the cameraName does not match any known camera device.requestCameraPermission(Deadline)boolean requestCameraPermission(Deadline deadline)
deadline - the time by which the request must be honored or given up as ungrantedasyncRequestCameraPermission(Context, Deadline, org.firstinspires.ftc.robotcore.external.function.Continuation<? extends org.firstinspires.ftc.robotcore.external.function.Consumer<java.lang.Boolean>>)CameraCharacteristics getCameraCharacteristics()
Query the capabilities of a camera device. These capabilities are immutable for a given camera.