CameraFilter
interface CameraFilter
androidx.camera.core.CameraFilter |
An interface for filtering cameras.
Summary
Public methods | |
---|---|
abstract MutableList<CameraInfo!> |
filter(@NonNull cameraInfos: MutableList<CameraInfo!>) Filters a list of |
Public methods
filter
@NonNull abstract fun filter(@NonNull cameraInfos: MutableList<CameraInfo!>): MutableList<CameraInfo!>
Filters a list of CameraInfo
s 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 androidx.camera.core.CameraSelector.Builder#addCameraFilter(CameraFilter)
, the available cameras will be filtered by all CameraFilter
s by the order they were added. The first camera in the result will be selected if there are multiple cameras left.
Parameters | |
---|---|
cameraInfos |
MutableList<CameraInfo!>: An unmodifiable list of CameraInfo s being filtered. |
Return | |
---|---|
MutableList<CameraInfo!> |
The output list of CameraInfo s that match the requirements. Users are expected to create a new list to return with. |