Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[camerax] Clarify how CameraX uses preset resolution #6022

Merged
merged 12 commits into from
Feb 2, 2024
Next Next commit
Add docs
  • Loading branch information
camsim99 committed Jan 31, 2024
commit d8215f31a4c957591605a7d9bbdc8222e6c8eeec
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ class AndroidCameraCameraX extends CameraPlatform {
/// uninitialized camera instance, this method retrieves a
/// [ProcessCameraProvider] instance.
///
/// The specified [resolutionPreset] is the target resolution that CameraX
/// will attempt to select for the [UseCase]s constructed in this method
/// ([preview], [imageCapture], [imageAnalysis], [videoCapture]).
///
/// To return the camera ID, which is equivalent to the ID of the surface texture
/// that a camera preview can be drawn to, a [Preview] instance is configured
/// and bound to the [ProcessCameraProvider] instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
/// Affect the quality of video recording and image capture:
///
/// If a preset is not available on the camera being used a preset of lower quality will be selected automatically.
///
/// For the CameraX implementation of the plugin on Android (`camera_android_camerax`),
/// these are treated as a target resolution and is not guaranteed. If unavailable,
/// a fallback resolution of the next highest quality will be attempted as
/// mentioned above. See https://developer.android.com/media/camera/camerax/configuration#specify-resolution.
enum ResolutionPreset {
/// 352x288 on iOS, 240p (320x240) on Android and Web
low,
Expand Down