-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] Wrap Android classes/methods required to set the exposure mode #5966
Conversation
packages/camera/camera_android_camerax/lib/src/camera2_camera_control.dart
Outdated
Show resolved
Hide resolved
…control.dart Co-authored-by: Bartek Pacia <barpac02@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly lgtm, just a couple of minor comments!
...amerax/android/src/main/java/io/flutter/plugins/camerax/Camera2CameraControlHostApiImpl.java
Outdated
Show resolved
Hide resolved
...amerax/android/src/main/java/io/flutter/plugins/camerax/Camera2CameraControlHostApiImpl.java
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/camera2_camera_control.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/camera2_camera_control.dart
Outdated
Show resolved
Hide resolved
/// was previously set, these options will override those pre-existing. Once | ||
/// merged, these values will be submitted with every repeating and single | ||
/// capture requests issued by CameraX. | ||
Future<void> addCaptureRequestOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non blocking: This PR is just wrapping the classes, but I am curious: Will we not need clearCaptureRequestOptions
wrapped to return to an "unset exposure mode" state? Or does setting all the previously set options to null have the same effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sure that we don't need it, but I was just going to wrap it later if I do.
My understanding, though, is that using clearCaptureRequestOption
, which I wrap for CaptureRequestOptions
has the same effect, so that's why I didn't worry about it for now.
packages/camera/camera_android_camerax/pigeons/camerax_library.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/capture_request_options.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/capture_request_options.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/capture_request_options.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/test/capture_request_options_test.dart
Outdated
Show resolved
Hide resolved
…o/flutter/plugins/camerax/Camera2CameraControlHostApiImpl.java Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
…control.dart Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
…control.dart Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
…_options.dart Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
….dart Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
flutter/packages@ae3494d...1a5a7ce 2024-02-05 43054281+camsim99@users.noreply.github.com [camerax] Wrap Android classes/methods required to set the exposure mode (flutter/packages#5966) 2024-02-05 engine-flutter-autoroll@skia.org Manual roll Flutter from e02e207 to 0b5cd50 (46 revisions) (flutter/packages#6053) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ode (flutter#5966) Wraps classes/methods needed to set capture request options that will allow us to implement setting the exposure mode, namely: **Camera2CameraControl** - `create` method using [`from`](https://developer.android.com/reference/androidx/camera/camera2/interop/Camera2CameraControl#from(androidx.camera.core.CameraControl)) - [`setCaptureRequestOptions`](https://developer.android.com/reference/androidx/camera/camera2/interop/Camera2CameraControl#setCaptureRequestOptions(androidx.camera.camera2.interop.CaptureRequestOptions)) **CaptureRequestOptions** - `create` method using its [builder](https://developer.android.com/reference/androidx/camera/camera2/interop/CaptureRequestOptions.Builder)* Part of flutter/flutter#120468. *Note that this required that I specify types of supported capture request options due to the Dart/native split. I took inspiration from our previous implementation of supported `LiveData` types (see [pigeon file](https://github.com/flutter/packages/blob/73c9bdc59b8d51ee558bff113bcdcdb53485cd08/packages/camera/camera_android_camerax/pigeons/camerax_library.dart#L80) for details).
Wraps classes/methods needed to set capture request options that will allow us to implement setting the exposure mode, namely:
Camera2CameraControl
create
method usingfrom
setCaptureRequestOptions
CaptureRequestOptions
create
method using its builder*Part of flutter/flutter#120468.
*Note that this required that I specify types of supported capture request options due to the Dart/native split. I took inspiration from our previous implementation of supported
LiveData
types (see pigeon file for details).Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).