-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[camera_android_camerax] Implement setDescriptionWhileRecording
#9878
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
base: main
Are you sure you want to change the base?
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.
Code Review
This pull request successfully implements the ability to switch cameras while recording video on Android by introducing a persistent recording mode. The changes are well-structured across the camera
, camera_platform_interface
, and camera_android_camerax
packages. My review includes a few suggestions to improve the code, such as removing some dead code and improving test practices. Please also remember to remove the temporary dependency_overrides
from the various pubspec.yaml
files before merging.
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/example/integration_test/integration_test.dart
Outdated
Show resolved
Hide resolved
Thanks for the contribution! All of the changes in
The native test suites do not currently build; please see the CI failure output and resolve the failures. |
Adds a section to the review agent configuration to try to get it to stop leaving comments like [this one](#9878 (comment)) on federated plugin PRs that are following our standard, documented process.
setDescriptionWhileRecording
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.
Thank you so much for your contribution! I'm looking forward to having this feature implemented :)
Took a first pass (at the camera_android_camerax
code because the rest can be reverted). Overall looks good, but I think the main changes need a few adjustments.
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
…9879) Adds a section to the review agent configuration to try to get it to stop leaving comments like [this one](#9878 (comment)) on federated plugin PRs that are following our standard, documented process.
I need help on the failing checks @stuartmorgan-g @camsim99. For the repo_checks, I'm having issue with format and federated safety check. I believe the federated check will be fixed when the dependencies overrides are reverted but the format is throwing error:
Even though there are no issues when I ran it locally:
Also, I can't figure out why the tree-status check failed for the last commit. |
@blackorbs-dev Agreed on the federated check, for format, I see the error Also, thanks for making edits! I'll take a look soon. |
By the way, this PR can also remove this line: https://github.com/flutter/packages/blob/main/packages/camera/camera_android_camerax/README.md#setdescriptionwhilerecording-is-unimplemented-issue-148013 🥳 |
Noted ✅, I can also revert the dependency overrides right? |
I would guess network or server error downloading the formatter, since it's pulled on demand rather than via cipd. |
I've made edits based on your comments @stuartmorgan-g @camsim99. Please take a look. |
This comment was marked as duplicate.
This comment was marked as duplicate.
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.
This is looking good to me! Just left some nits.
packages/camera/camera_android_camerax/example/integration_test/integration_test.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart
Outdated
Show resolved
Hide resolved
@bparrishMines is the ecosystem team reviewer for |
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.
The camera_android_camerax
changes LGTM! Thank you so much for taking this on!! Just left a nit about the README.
Just need another review from @bparrishMines.
packages/camera/camera_platform_interface/lib/src/types/video_capture_options.dart
Show resolved
Hide resolved
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
This should be ready to split out now.
setDescriptionWhileRecording allows switching camera while a video recording is in progress. This feature was only working with camera2 setup, but the camera plugin uses camerax by default. So, this PR includes update to address the issue.
Fixes #148013
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assist
bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3