[camerax] Prevent using unsupported concurrent camera use cases#6608
Merged
auto-submit[bot] merged 16 commits intoflutter:mainfrom May 6, 2024
Merged
[camerax] Prevent using unsupported concurrent camera use cases#6608auto-submit[bot] merged 16 commits intoflutter:mainfrom
auto-submit[bot] merged 16 commits intoflutter:mainfrom
Conversation
Merged
11 tasks
reidbaker
reviewed
May 1, 2024
| #getSupportedHardwareLevel, | ||
| [identifier], | ||
| ), | ||
| returnValue: 0, |
Contributor
There was a problem hiding this comment.
Consider a comment saying this is LIMITED. It could help in debugging later to know that the device might not have returned limited but we had an error. https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
Contributor
Author
There was a problem hiding this comment.
This is generated code :/ I think it's just a mock value
reidbaker
approved these changes
May 1, 2024
Contributor
reidbaker
left a comment
There was a problem hiding this comment.
I glossed over the code that appeared generated.
Contributor
Author
|
Just realized I didn't check for LIMITED level devices to disable image capture...just wanted to note I need to add this check + test before landing this! |
reidbaker
approved these changes
May 6, 2024
vashworth
pushed a commit
to vashworth/packages
that referenced
this pull request
May 6, 2024
…ter#6608) Adds logic + documentation to prevent the usage of unsupported (by CameraX) concurrent camera use cases. The CameraX plugin should only support the concurrent camera use cases supported by Camerax; see [their documentation](https://developer.android.com/media/camera/camerax/architecture#combine-use-cases) for more information. To avoid the usage of unsupported concurrent use cases, this PR changes the plugin so that it behaves according to the following: * If the preview is paused (via `pausePreview`), concurrent video recording and image streaming (via `startVideoCapturing(cameraId, VideoCaptureOptions(streamCallback:...))`) is supported. * If the preview is not paused * **and** the camera device is at least supported hardware [`LIMITED`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED), then concurrent image capture and video recording is supported. * **and** the camera device is at least supported hardware [`LEVEL_3`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_3), then concurrent video recording and image streaming is supported, but if used, concurrent image capture alongside this is not supported. Also changes `Surface` constants to match Dart style and small documentation nits I noticed. Fixes flutter/flutter#146395, fixes flutter/flutter#144414.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 7, 2024
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
May 7, 2024
flutter/packages@2dfe645...5ccddfc 2024-05-06 15619084+vashworth@users.noreply.github.com [shared_preferences_foundation] Adds Swift Package Manager compatibility (flutter/packages#6640) 2024-05-06 stuartmorgan@google.com [file_selector] Add support for SPM (flutter/packages#6672) 2024-05-06 43054281+camsim99@users.noreply.github.com [camerax] Add empty implementation for `prepareForVideoRecording` not used on Android (flutter/packages#6676) 2024-05-06 stuartmorgan@google.com [ci] Reduce the number of tasks in recipe CQ (flutter/packages#6673) 2024-05-06 engine-flutter-autoroll@skia.org Roll Flutter from f1037a0 to 04424e1 (25 revisions) (flutter/packages#6674) 2024-05-06 43054281+camsim99@users.noreply.github.com [camerax] Prevent using unsupported concurrent camera use cases (flutter/packages#6608) 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
TecHaxter
pushed a commit
to TecHaxter/flutter_packages
that referenced
this pull request
May 22, 2024
…ter#6608) Adds logic + documentation to prevent the usage of unsupported (by CameraX) concurrent camera use cases. The CameraX plugin should only support the concurrent camera use cases supported by Camerax; see [their documentation](https://developer.android.com/media/camera/camerax/architecture#combine-use-cases) for more information. To avoid the usage of unsupported concurrent use cases, this PR changes the plugin so that it behaves according to the following: * If the preview is paused (via `pausePreview`), concurrent video recording and image streaming (via `startVideoCapturing(cameraId, VideoCaptureOptions(streamCallback:...))`) is supported. * If the preview is not paused * **and** the camera device is at least supported hardware [`LIMITED`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED), then concurrent image capture and video recording is supported. * **and** the camera device is at least supported hardware [`LEVEL_3`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_3), then concurrent video recording and image streaming is supported, but if used, concurrent image capture alongside this is not supported. Also changes `Surface` constants to match Dart style and small documentation nits I noticed. Fixes flutter/flutter#146395, fixes flutter/flutter#144414.
TecHaxter
pushed a commit
to TecHaxter/flutter_packages
that referenced
this pull request
May 22, 2024
…to `camera_android_camerax` (flutter#6629) Breaking change: Changes default Android implementation from `camera_android` to `camera_android_camerax` via a breaking change and updates relevant documentation. ~<ins>**Note:**</ins> Planning to land this after flutter#6608, as it is a semi-crucial fix.~ Done :)
11 tasks
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds logic + documentation to prevent the usage of unsupported (by CameraX) concurrent camera use cases.
The CameraX plugin should only support the concurrent camera use cases supported by Camerax; see their documentation for more information. To avoid the usage of unsupported concurrent use cases, this PR changes the plugin so that it behaves according to the following:
pausePreview), concurrent video recording and image streaming (viastartVideoCapturing(cameraId, VideoCaptureOptions(streamCallback:...))) is supported.LIMITED, then concurrentimage capture and video recording is supported.
LEVEL_3, then concurrent video recording and image streaming is supported, but if used, concurrent image capture alongside this is not supported.Also changes
Surfaceconstants to match Dart style and small documentation nits I noticed.Fixes flutter/flutter#146395, fixes flutter/flutter#144414.
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.///).