CameraFilter
interface CameraFilter
An interface for filtering cameras.
Summary
Public functions |
|
|---|---|
(Mutable)List<CameraInfo!> |
filter(cameraInfos: (Mutable)List<CameraInfo!>)Filters a list of |
Public functions
filter
fun filter(cameraInfos: (Mutable)List<CameraInfo!>): (Mutable)List<CameraInfo!>
Filters a list of CameraInfos and returns those matching the requirements.
If the output list contains CameraInfos not in the input list, when used by a androidx.camera.core.CameraSelector then it will result in an IllegalArgumentException thrown when calling bindToLifecycle.
The CameraInfo that has lower index in the list has higher priority. When used by addCameraFilter, the available cameras will be filtered by all CameraFilters by the order they were added. The first camera in the result will be selected if there are multiple cameras left.
| Parameters | |
|---|---|
cameraInfos: (Mutable)List<CameraInfo!> |
An unmodifiable list of |
| Returns | |
|---|---|
(Mutable)List<CameraInfo!> |
The output list of |
| Throws | |
|---|---|
java.lang.IllegalArgumentException |
If the device cannot return a valid lens facing value, it will throw this exception. |