-
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 <43054281+camsim99@users.noreply.github.com>
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. |
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.
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