-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[camera] Reland implementations of flip/change camera while recording #3272
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
[camera] Reland implementations of flip/change camera while recording #3272
Conversation
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.
Re-stamp the iOS part from the previous PR.
@bparrishMines and @stuartmorgan Here is the migrated PR that was merged and then reverted containing the fixes for the old Android devices |
Capturing from the other issue for ease of reviewing: this is a reland with changes of a previously reviewed/landed/reverted PR. The diffs relative to the original reverted PR are at https://github.com/flutter/plugins/pull/7185/files/69a8c567d474c0a24ee1a7c21e6c06cb61ccd837..6fc7df4c89f435b4e890bd39f49dd9f46e1cf04d @camsim99 Could you take a look at the diffs since you reviewed the original PR? |
Also, should remember this time to have one of us push a commit here to trigger the FTL tests in presubmit. |
Or I can just do it myself right now so we don't forget :) |
Same failure for starqlteue-26-en-portrait. Im not sure why because eglSwapBuffers() is supposed to be available for >= 26, and in my separate tests it worked on >= 26. Possibly device specific? I will look more into checking availability of eglSwapBuffers manually instead of just checking Android version. I will have to make the tests pass with either successful flip, or failure/error on flip but no crash since this is likely device specific |
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.
Reviewed the changes, just left two nits!
packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/Camera.java
Outdated
Show resolved
Hide resolved
packages/camera/camera_android/example/integration_test/camera_test.dart
Outdated
Show resolved
Hide resolved
@BradenBagby On the failure, I'm not sure what it is offhand, but looks like you may need to bump the example app compileSdkVersion to 33 https://cirrus-ci.com/task/4622324217937920?logs=firebase_test_lab#L274. |
…r/plugins/camera/Camera.java Co-authored-by: Camille Simon <[email protected]>
That is due to device_info_plus package. Its a dev dependency I added for Android integration tests. We need to check SDK version to expect failures for devices < 26. Would you recommend using the old/discontinued device_info package so that warning does not appear? Device_info_plus seems to work I have tested it on sdk 25, 26, and 33 in TestLab. Im thinking the part of the package we are using is supported and we can ignore the warning, but I will change it if needed. |
Third-party package dependencies are a liability for us in the longer term, so we avoid them unless there's really no other option. In this case, since the SDK switch logic being tested is on the native side, we should just test that on the native side. On the Dart side you can have the code allow for either outcome (without switching) with a comment explaining and pointing to the relevant native test. |
Resolved conflicts so that the full Android tests will re-run in CI. |
packages/camera/camera_android/example/integration_test/camera_test.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android/example/integration_test/camera_test.dart
Outdated
Show resolved
Hide resolved
@stuartmorgan Tests failed on TestLab. Which I had ran myself on my personal TestLab on the same device and had them succeed. Sorry but will need revert again and Ill run through everything again. Maybe I re-broke it |
Ah, it's flaky, which is why it passed presubmit this time. It's a different failure though, so hopefully that's progress?
|
…ecording (flutter#3272)" This reverts commit d311478.
#3405 will revert Android. I left the iOS part since there's no reason to keep reverting and re-landing that. |
commit 6d24151 Author: stuartmorgan <[email protected]> Date: Thu Mar 9 16:19:48 2023 -0800 [ci] Fix federated safety check (flutter#3417) [ci] Fix federated safety check commit 574b8ea Author: Maurice Parrish <[email protected]> Date: Thu Mar 9 18:40:04 2023 -0500 update bad imports (flutter#3427) [webview_flutter_platform_interface][webview_flutter_wkwebview] Fix inconsistent imports commit eb2fe26 Author: Navaron Bracke <[email protected]> Date: Thu Mar 9 17:31:19 2023 +0100 [espresso] Enable warnings as errors (flutter#3414) [espresso] Enable warnings as errors commit 3b29183 Author: engine-flutter-autoroll <[email protected]> Date: Thu Mar 9 11:22:33 2023 -0500 Roll Flutter (stable) from c07f78888884 to 2ad6cd72c040 (5 revisions) (flutter#3426) Roll Flutter (stable) from c07f78888884 to 2ad6cd72c040 (5 revisions) commit 8a7dead Author: Chris Yang <[email protected]> Date: Thu Mar 9 04:10:02 2023 -0800 Manual roll Flutter from f2f8005 to 5a279ed (44 revisions) + fixes (flutter#3420) Manual roll Flutter from f2f8005 to 5a279ed (44 revisions) + fixes commit 3814ec4 Author: Tarrin Neal <[email protected]> Date: Thu Mar 9 03:22:21 2023 -0800 [image_picker] moves Android 13 image picker to options (flutter#3370) [image_picker] moves Android 13 image picker to options commit 88ca9e2 Author: stuartmorgan <[email protected]> Date: Thu Mar 9 02:57:13 2023 -0800 Revert "[video_player] Passing http headers to file constructor (flutter#3266)" (flutter#3424) This reverts commit 73e7ef7. commit 73e7ef7 Author: Abdelaziz Mahdy <[email protected]> Date: Thu Mar 9 02:53:35 2023 +0200 [video_player] Passing http headers to file constructor (flutter#3266) [video_player] Passing http headers to file constructor commit e10e945 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Mar 8 22:13:48 2023 +0000 Bump actions/labeler from 4.0.2 to 4.0.3 (flutter#3411) Bump actions/labeler from 4.0.2 to 4.0.3 commit 4b03866 Author: Andrew Kolos <[email protected]> Date: Wed Mar 8 20:54:02 2023 +0000 [flutter_markdown] add AssetManifest.bin to TestAssetBundle (flutter#3422) [flutter_markdown] add AssetManifest.bin to TestAssetBundle commit 46c6333 Author: stuartmorgan <[email protected]> Date: Wed Mar 8 10:55:25 2023 -0800 [in_app_purchase] Enable -Werror for Android (flutter#3403) [in_app_purchase] Enable -Werror for Android commit 95a8a76 Author: Rexios <[email protected]> Date: Wed Mar 8 13:31:30 2023 -0500 Update android configuration (flutter#3408) [google_maps_flutter] Update example android configuration commit 6d5cb85 Author: stuartmorgan <[email protected]> Date: Wed Mar 8 09:07:46 2023 -0800 [various] Clarify endorsement in READMEs (flutter#3404) [various] Clarify endorsement in READMEs commit a4d3d16 Author: Maurice Parrish <[email protected]> Date: Wed Mar 8 10:28:07 2023 -0500 [webview_flutter_android] Adds a WebViewFlutterApi (flutter#3324) [webview_flutter_android] Adds a WebViewFlutterApi commit 9bfef95 Author: Anuruddha <[email protected]> Date: Wed Mar 8 10:06:03 2023 +0800 [webview_flutter] Add android `webSettings.setTextZoom` api (flutter#3298) [webview_flutter] Add android `webSettings.setTextZoom` api commit 4aa259a Author: gaaclarke <[email protected]> Date: Tue Mar 7 16:33:03 2023 -0800 [pigeon] Removed gaaclarke from the readme (flutter#3395) commit 15ae705 Author: stuartmorgan <[email protected]> Date: Tue Mar 7 13:49:16 2023 -0800 [go_router_builder] Remove Flutter SDK constraint (flutter#3406) [go_router_builder] Remove Flutter SDK constraint commit 036cb1e Author: stuartmorgan <[email protected]> Date: Tue Mar 7 12:11:26 2023 -0800 [camera] Revert Android part of flutter#3272 (flutter#3405) Reverts the Android part of flutter#3272 (commit d311478), which introduced significant crash flake in the tests. commit 5eefd07 Author: stuartmorgan <[email protected]> Date: Tue Mar 7 11:43:38 2023 -0800 Update CODEOWNERS (flutter#3402) Update CODEOWNERS commit 55f4298 Author: Evan Mesterhazy <[email protected]> Date: Tue Mar 7 13:55:47 2023 -0500 [go_router] Fix a typo in the ShellRoute docstring (flutter#3378) [go_router] Fix a typo in the ShellRoute docstring commit d311478 Author: Braden Bagby <[email protected]> Date: Tue Mar 7 11:54:53 2023 -0700 [camera] Reland implementations of flip/change camera while recording (flutter#3272) [camera] Reland implementations of flip/change camera while recording commit 843bd8c Author: stuartmorgan <[email protected]> Date: Tue Mar 7 09:25:16 2023 -0800 [pigeon] Minor updates for pana (flutter#3397) - Removes the Flutter SDK constraint; as far as I remember and can tell from git history, we only did this to prevent pigeon from running tests on unsupported versions before the repo tooling supported minimum Dart versions. - Removes an unnecessary null check. We intentionally have that analysis option off for the repo as long as Flutter supports non-strong-mode code, but the specific check here isn't subject to client code so isn't useful to keep. Part (maybe all?) of flutter/flutter#122029 commit e9c15fe Author: stuartmorgan <[email protected]> Date: Tue Mar 7 08:45:42 2023 -0800 [various] Remove enableR8 (flutter#3400) [various] Remove enableR8 commit c90d823 Author: stuartmorgan <[email protected]> Date: Tue Mar 7 08:23:56 2023 -0800 [google_maps_flutter] Enable -Werror for Android (flutter#3399) [google_maps_flutter] Enable -Werror for Android commit c40f189 Author: Navaron Bracke <[email protected]> Date: Tue Mar 7 16:59:36 2023 +0100 [camera_android] Fix camera android deprecation warning for CamcorderProfile.get() (flutter#3273) [camera_android] Fix camera android deprecation warning for CamcorderProfile.get() commit 789e3a7 Author: stuartmorgan <[email protected]> Date: Sat Mar 4 10:28:18 2023 -0800 [various] Align Flutter and Dart SDK constraints (flutter#3349) As described in flutter/flutter#121684, we currently have inconsistencies between Flutter SDK constraints and Dart SDK constraints; we have often updated only the former. This PR: 1. Adds CI enforcement via the repo tooling that the minimum versions are consistent. 2. Adds a new repo tooling command to update SDK constraints, to help mass-fix all the violations of the new enforcement in step 1 (and for future mass changes, such as when we update our test matrix and mass-drop support for versions that are no longe tested). - In all cases, the looser constraint was updated to match the more restrictive constraint, such that there's no actual change in what Flutter version any package actually supports. 3. Runs `dart fix --apply` over all changed packages to automatically fix all of the analysis failures caused by step 2 suddenly making all of our packages able to use `super` parameters. Fixes flutter/flutter#121684 Fixes flutter/flutter#121685 commit f14fae7 Author: engine-flutter-autoroll <[email protected]> Date: Sat Mar 4 11:03:24 2023 -0500 Roll Flutter from c590086 to f2f8005 (14 revisions) (flutter#3373) Roll Flutter from c590086 to f2f8005 (14 revisions) commit 405e465 Author: stuartmorgan <[email protected]> Date: Fri Mar 3 18:53:20 2023 -0800 [webview_flutter] Enable warnings-as-errors on Android (flutter#3356) [webview_flutter] Enable warnings-as-errors on Android commit b220ace Author: stuartmorgan <[email protected]> Date: Fri Mar 3 17:17:24 2023 -0800 [ci] Increase Android platform test sharding (flutter#3365) [ci] Increase Android platform test sharding commit 74d64cd Author: engine-flutter-autoroll <[email protected]> Date: Fri Mar 3 14:08:05 2023 -0500 Roll Flutter from f032a4d to c590086 (69 revisions) (flutter#3366) Roll Flutter from f032a4d to c590086 (69 revisions) commit 4aedb85 Author: Reid Baker <[email protected]> Date: Fri Mar 3 13:42:22 2023 -0500 [Espresso] Update truth package to 1.1.3 (flutter#3358) [Espresso] Update truth package to 1.1.3 commit dbce04e Author: stuartmorgan <[email protected]> Date: Fri Mar 3 08:49:35 2023 -0800 [google_maps] Relax the Android renderer requset test (flutter#3364) Updates the "initialized with latest renderer" test to just test that the rest resulted in some valid response, since we can't actually control what the server returns; the request is non-binding, and there are cases where (e.g., depending on the device details) the legacy renderer will be returned regardless. commit ca7205b Author: stuartmorgan <[email protected]> Date: Fri Mar 3 08:27:12 2023 -0800 [pigeon] Only check generated files on master (flutter#3357) [pigeon] Only check generated files on master commit da635f0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Mar 3 15:57:18 2023 +0000 [webview]: Bump androidx.webkit:webkit from 1.5.0 to 1.6.0 in /packages/webview_flutter/webview_flutter_android/android (flutter#3243) [webview]: Bump androidx.webkit:webkit from 1.5.0 to 1.6.0 in /packages/webview_flutter/webview_flutter_android/android commit 2f21321 Author: stuartmorgan <[email protected]> Date: Thu Mar 2 11:47:25 2023 -0800 [ci+various] Partially enable javac warning checks (flutter#3293) Since our existing `gradlew lint` check doesn't catch all warnings (notably, deprecation warnings, but also others like raw values), this: - Configures our plugin example apps to enable `-Xlint:all -Werror` for the javac for the plugin project, so that we also get javac lint coverage in CI. This is done in the example app so that it won't affect plugin clients. - Adds a check to `lint-android` that the example is configured this way, so that we don't forget to set it up when adding new plugins (or re-generating plugin examples from template). Where it was trivial for me to just fix existing violations, I did so in this PR. For the rest that had violations, I commented out the enabling of the flags, with a TODO. Normally we would do this kind of thing with a `script/configs` file to opt packages out of a new check, but since this is part of an existing check rather than a whole new command, doing it that way would disable `gradlew lint` for those packages as well. Making a whole new command seemed more complex for the long term, so this seemed like the best short term option. We should try to remove as many of these opt-outs as possible ASAP. Part of flutter/flutter#91868 commit b7812d9 Author: Jenn Magder <[email protected]> Date: Thu Mar 2 11:03:34 2023 -0800 [webview_flutter] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3336) commit 60637eb Author: Jenn Magder <[email protected]> Date: Thu Mar 2 11:03:19 2023 -0800 [local_auth] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3335) commit 5e6b3b4 Author: Jenn Magder <[email protected]> Date: Thu Mar 2 11:03:03 2023 -0800 [google_sign_in] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3330) commit ad82209 Author: Jenn Magder <[email protected]> Date: Thu Mar 2 11:02:40 2023 -0800 [google_maps_flutter] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3329) commit 18761a2 Author: Jenn Magder <[email protected]> Date: Thu Mar 2 11:02:18 2023 -0800 [video_player] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3328) commit e2a911b Author: Jenn Magder <[email protected]> Date: Thu Mar 2 11:01:57 2023 -0800 [file_selector] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3325) commit bfdb4eb Author: Valentin Vignal <[email protected]> Date: Fri Mar 3 02:26:45 2023 +0800 [go_router_builder] Fix the example for default values in the README (flutter#3231) [go_router_builder] Fix the example for default values in the README commit 875a403 Author: Reid Baker <[email protected]> Date: Thu Mar 2 11:15:06 2023 -0500 Update annotation and espresso dependencies (flutter#3271) * Update annotation and espresso dependencies * Migrate camera_android to use flutter.compileSdkVersion * Migrate camera_android_camerax to use flutter.compileSdkVersion * Migrate camera_camera to use flutter.compileSdkVersion * Migrate espresso to use flutter.compileSdkVersion Fix example app to launch with multidex partial work on flutter/flutter/issues/121423 * Mass replace for flutter.compileSdkVersion on all "apps" * Mass update non app build.gradle files to compileSdkVersion 33 * Update changelog next * Fix misspelling and combine annotation update with compileSdkVersion update * Remove web changelog, update messages to apply to only the changes for that plugin * Remove all changelog changes from packages that did not have a build.gradle update * formatting update * Add copyright to multidex application because it fails repro checks * Remove more unneeded changelog files unrelated to android * Remove CHANGELOG entries for packages where only the example app was updated * Fix bad merge in changelog files and change update to updates in remainding changelog files * Fix more update -> updates commit 0954499 Author: stuartmorgan <[email protected]> Date: Wed Mar 1 03:55:21 2023 -0800 [tool] Provide a --base-branch flag (flutter#3322) [tool] Provide a --base-branch flag commit 7ec6a77 Author: Preston Schwartz <[email protected]> Date: Tue Feb 28 19:26:06 2023 -0600 [image_picker_android] Adds Android 13 photo picker functionality (flutter#3267) [image_picker_android] Adds Android 13 photo picker functionality commit 588c5f4 Author: Paolo Rotolo <[email protected]> Date: Wed Mar 1 02:04:39 2023 +0100 [pigeon] Add Kotlin parameters to run pigeon command (flutter#3260) [pigeon] Add Kotlin parameters to run pigeon command commit ed1f780 Author: Jenn Magder <[email protected]> Date: Tue Feb 28 16:10:40 2023 -0800 [image_picker] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3327) [image_picker] Update minimum Flutter version to 3.3 and iOS 11 commit 4397336 Author: Jenn Magder <[email protected]> Date: Tue Feb 28 13:22:55 2023 -0800 [go_router] Update example app to iOS 11 (flutter#3326) [go_router] Update example app to iOS 11 commit b98cd1f Author: stuartmorgan <[email protected]> Date: Tue Feb 28 11:45:04 2023 -0800 [pigeon] Enable warnings as errors for remaining languages (flutter#3317) [pigeon] Enable warnings as errors for remaining languages commit 475cf82 Author: engine-flutter-autoroll <[email protected]> Date: Tue Feb 28 10:54:50 2023 -0500 Roll Flutter from c8d8016 to f032a4d (17 revisions) (flutter#3320) Roll Flutter from c8d8016 to f032a4d (17 revisions) commit e20c1b7 Author: Tarrin Neal <[email protected]> Date: Tue Feb 28 07:54:49 2023 -0800 [pigeon] removes safe casting from nullables in kotlin and swift (flutter#3284) [pigeon] removes safe casting from nullables in kotlin and swift commit f39c97d Author: engine-flutter-autoroll <[email protected]> Date: Mon Feb 27 22:17:48 2023 -0500 Manual roll Flutter from 7175de4 to c8d8016 (96 revisions) (flutter#3319) Manual roll Flutter from 7175de4 to c8d8016 (96 revisions) commit 3a8103e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Feb 27 21:58:09 2023 +0000 Bump lewagon/wait-on-check-action from 1.2.0 to 1.3.1 (flutter#3210) Bump lewagon/wait-on-check-action from 1.2.0 to 1.3.1 commit 058ed5b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Feb 27 13:58:00 2023 -0800 Bump github/codeql-action from 2.2.1 to 2.2.5 (flutter#3308) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.1 to 2.2.5. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@3ebbd71...32dc499) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit a2c5062 Author: hangyu <[email protected]> Date: Mon Feb 27 13:21:49 2023 -0800 [go_router_builder]Update the way to pass the `extra` param in router_config (flutter#3005) [go_router_builder]Update the way to pass the `extra` param in router_config commit 533be95 Author: Jenn Magder <[email protected]> Date: Mon Feb 27 13:03:57 2023 -0800 [camera] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3296) [camera] Update minimum Flutter version to 3.3 and iOS 11 commit 7ebf1d4 Author: stuartmorgan <[email protected]> Date: Mon Feb 27 07:02:13 2023 -0800 [tool] Always run publish check (flutter#3279) [tool] Always run publish check commit ec4a546 Author: engine-flutter-autoroll <[email protected]> Date: Sun Feb 26 12:36:23 2023 -0500 Roll Flutter (stable) from 994429713884 to c07f78888884 (5 revisions) (flutter#3305) Roll Flutter (stable) from 994429713884 to c07f78888884 (5 revisions) commit 2e04050 Author: David Iglesias <[email protected]> Date: Fri Feb 24 16:58:06 2023 -0800 [ci] Fix some web-platform_tests. (flutter#3285) [ci] Fix some web-platform_tests. commit ad48ee5 Author: dddrop <[email protected]> Date: Sat Feb 25 02:24:00 2023 +0900 [go_router] Fix some broken links in doc (flutter#3288) [go_router] Fix some broken links in doc commit 58ac45e Author: Mirko Mucaria <[email protected]> Date: Thu Feb 23 23:46:11 2023 +0100 [go_router_builder] Add support for Iterable, List and Set to TypedGoRoute (flutter#2679) * fixes #108437 support for iterable, list and set * fixes #108437 url encoding for iterable, list and set * fixes #108437 tests * format and analysis fix * fix string encoding * format * removed unused helper name * fix nullability checks for query params encoding * fix all_types.dart for new go router version * rebased to upstream * version * missing file regeneration commit 0edae25 Author: John Ryan <[email protected]> Date: Thu Feb 23 13:59:49 2023 -0800 Export super types in route_data.dart library (flutter#3286)
This reverts commit 036cb1e.
@stuartmorgan Are you able to send me or make public the logcat.txt from the failing test here: https://console.developers.google.com/storage/browser/flutter_cirrus_testlab/plugins_android_test/camera_android/5094810416054272/92dcbd69-1247-4c79-8ee6-865a4935458c/example/0/ I cannot reproduce this crash on testlab, it passes every time on the same device. Im using the plugin tools firebase-test-lab command and running it on my personal testlab. Trying to get some good logs so I can see whats going on |
Unfortunately I don't think there's any way for me to change visibility (we're working on resolving the general access issue here), but here's the specific file: https://drive.google.com/file/d/1lwaHd8CpmS7GV_TdnUno9n-qwmsQ4Sjo/view?usp=share_link |
…flutter#3272) [camera] Reland implementations of flip/change camera while recording
Reverts the Android part of flutter#3272 (commit d311478), which introduced significant crash flake in the tests.
…lutter#5930) `DEVELOPMENT_TEAM` should not be set in the example Xcode app. Introduced extraneously in flutter#3272
this PR recreates the PR here flutter/plugins#7185 that was the second PR for the federated plugin out of 3 that will be needed.
The first was merged here: flutter/plugins#7011
The 3rd PR exists here flutter/plugins#6478 (comment) and will need to be updated as well