[camerax] Retrieve exposure and zoom camera information#3798
[camerax] Retrieve exposure and zoom camera information#3798auto-submit[bot] merged 23 commits intoflutter:mainfrom
Conversation
| } | ||
|
|
||
| @Test | ||
| @SuppressWarnings("unchecked") |
There was a problem hiding this comment.
This has to be used because I mock the generic type LiveData, even with the cast.
| public Long getZoomState(@NonNull Long identifier) { | ||
| CameraInfo cameraInfo = | ||
| (CameraInfo) Objects.requireNonNull(instanceManager.getInstance(identifier)); | ||
| // TODO(camsim99): Create/return LiveData<ZoomState> once https://github.com/flutter/packages/pull/3419 lands. |
There was a problem hiding this comment.
I will fix this in that PR if this lands first if I have time. Otherwise, I'll file an issue and update this line in that PR.
|
|
||
| /// Gets the minimum supported exposure offset for the selected camera in EV units. | ||
| @override | ||
| Future<double> getMinExposureOffset(int cameraId) async { |
There was a problem hiding this comment.
Why pass in a cameraId if the value is going to be ignored?
There was a problem hiding this comment.
I added comments about it not being used. I honestly don't know what the idea was behind passing it to some functions was, even though it's not used. I assume it was included in case any platforms needed access to it? @bparrishMines any insight?
There was a problem hiding this comment.
I wasn't involved when this feature was added, but I assume that it was included for other platform implementations and to follow the same pattern as the other methods.
| late final InstanceManager instanceManager; | ||
|
|
||
| /// Gets sensor orientation degrees of [CameraInfo]. | ||
| /// Gets sensor orientation degrees of the specified [CameraInfo] instance. |
There was a problem hiding this comment.
Consider linking to the camerax documentation of sensor orientation.
There was a problem hiding this comment.
In the actual class, the documentation is linked, so I'm going to leave as is to avoid redundancy.
There was a problem hiding this comment.
Is this the object that dart callers will interact with?
There was a problem hiding this comment.
No, they'll interact with the CameraInfo object.
There was a problem hiding this comment.
This class should probably be private, honestly
There was a problem hiding this comment.
No, they'll interact with the
CameraInfoobject.
This is a little confusing since this is camera_info.dart but consider my comment resolved.
Nonblocking for this pr. You might want to consider a pass where you make objects like this private or reduce their scope. After this is published those will be breaking changes.
| return; | ||
| } | ||
|
|
||
| final Range<Integer> exposureCompensationRangeFromState = |
There was a problem hiding this comment.
I don't think this should block this PR, but I should move logic like this out of the create methods since they are constructor-adjacent.
flutter/packages@de6131d...f163786 2023-05-01 43054281+camsim99@users.noreply.github.com [camerax] Retrieve exposure and zoom camera information (flutter/packages#3798) 2023-05-01 engine-flutter-autoroll@skia.org Manual roll Flutter from 66fa4c5 to 828a040 (79 revisions) (flutter/packages#3874) 2023-05-01 vashworth@google.com [video_player, google_sign_in] Updates functions without a prototype to avoid deprecation warning (flutter/packages#3873) 2023-05-01 reidbaker@google.com [various] Speed up build-examples (flutter/packages#3849) 2023-05-01 stuartmorgan@google.com [file_selector] Remove uses of `macUTIs` (flutter/packages#3859) 2023-05-01 stuartmorgan@google.com [file_selector] Add getDirectoryPaths implementation for macOS (flutter/packages#3703) 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Implements retrieval of exposure and zoom camera information. Specifically, implements the following: - `getMinExposureOffset()` - `getMaxExposureOffset()` - `getExposureOffsetStepSize()` - `getMaxZoomLevel()` - `getMinZoomLevel()` Part of flutter/flutter#115846. Part of flutter/flutter#125371. Part of flutter/flutter#120468.
Implements retrieval of exposure and zoom camera information. Specifically, implements the following:
getMinExposureOffset()getMaxExposureOffset()getExposureOffsetStepSize()getMaxZoomLevel()getMinZoomLevel()Part of flutter/flutter#115846.
Part of flutter/flutter#125371.
Part of flutter/flutter#120468.
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).