-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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_android] Don't override default fps range when not recording #8891
base: main
Are you sure you want to change the base?
Conversation
Left one concern on this approach in flutter/flutter#165491; otherwise, I'm ok moving forward! |
@@ -1,3 +1,7 @@ | |||
## 0.10.10+2 | |||
|
|||
* Don't set the FPS range unless video recording. It can cause dark image previews on some devices becuse the auto exposure algorithm is more constrained after fixing a min & max FPS value. |
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.
Can you update this description to include the behavior change to users of this plugin that rely on the defaults? (even if that is no impact)
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.
@reidbaker Would this be more clear?
Don't set the FPS range unless video recording. It can cause dark image previews on some devices becuse the auto exposure algorithm is more constrained after fixing the min/max FPS range to the same value. This change has the side effect that providing the fps
parameter will not affect the camera preview when not video recording. And if you need a lower frame rate in your image streaming handler, you can skip frames by checking the time it passed since the last frame.
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.
That looks great.
This comment was marked as outdated.
This comment was marked as outdated.
autosubmit label was removed for flutter/packages/8891, because - The status or check suite Linux_android android_device_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label. |
This comment was marked as outdated.
This comment was marked as outdated.
@jesswrd Can the autosubmit label be added again? It was removed because of a timeout on firebase test lab, but it succeeded after a few merges |
In production I have an app using the
camera_android
plugin that just uses the frame streaming feature. I've been pinning version0.10.8+18
for a while because we found an issue after updating to0.10.9
. Some users reported a dark camera preview.After some investigation, I believe the issue is because of the call to
this.cameraFeatures.setFpsRange
in theCamera
constructor. That is the only difference in behavior that .9 and .8+18 have.Fixes flutter/flutter#165491
From the linked issue I went with the second possible fix. Would that be a good approach?
Or should the fps setting also apply to the camera streaming and preview?
cc @camsim99
Pre-Review Checklist
dart format
.)[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.
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