Uh oh!
There was an error while loading. Please reload this page.
[camera_avfoundation] Pigeon swift migration - part 1 - #10939
Conversation
There was a problem hiding this comment.
Code Review
This pull request effectively refactors the camera package to remove its dependency on the mutability of MediaSettings, which is a necessary preparation for the upcoming Pigeon Swift migration. The changes are well-contained and logical, primarily by introducing a local framesPerSecond property in DefaultCamera and making FormatUtils.findBestFormat a pure function. I have one minor suggestion to improve code readability.
Uh oh!
There was an error while loading. Please reload this page.
5fc630a to
f4d2b57CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f4d2b57 to
f0e6602CompareUh oh!
There was an error while loading. Please reload this page.
flutter/packages@7805d3e...3d5eaa5 2026-02-08 engine-flutter-autoroll@skia.org Roll Flutter from f916dd6 to e8f9dc5 (34 revisions) (flutter/packages#10979) 2026-02-07 stuartmorgan@google.com [quick_actions] Convert example to Swift (flutter/packages#10970) 2026-02-07 robert.odrowaz@leancode.pl [camera_avfoundation] Pigeon swift migration - part 1 (flutter/packages#10939) 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 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
…r#182083) flutter/packages@7805d3e...3d5eaa5 2026-02-08 engine-flutter-autoroll@skia.org Roll Flutter from f916dd6 to e8f9dc5 (34 revisions) (flutter/packages#10979) 2026-02-07 stuartmorgan@google.com [quick_actions] Convert example to Swift (flutter/packages#10970) 2026-02-07 robert.odrowaz@leancode.pl [camera_avfoundation] Pigeon swift migration - part 1 (flutter/packages#10939) 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 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
…r#182083) flutter/packages@7805d3e...3d5eaa5 2026-02-08 engine-flutter-autoroll@skia.org Roll Flutter from f916dd6 to e8f9dc5 (34 revisions) (flutter/packages#10979) 2026-02-07 stuartmorgan@google.com [quick_actions] Convert example to Swift (flutter/packages#10970) 2026-02-07 robert.odrowaz@leancode.pl [camera_avfoundation] Pigeon swift migration - part 1 (flutter/packages#10939) 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 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
…r#182083) flutter/packages@7805d3e...3d5eaa5 2026-02-08 engine-flutter-autoroll@skia.org Roll Flutter from f916dd6 to e8f9dc5 (34 revisions) (flutter/packages#10979) 2026-02-07 stuartmorgan@google.com [quick_actions] Convert example to Swift (flutter/packages#10970) 2026-02-07 robert.odrowaz@leancode.pl [camera_avfoundation] Pigeon swift migration - part 1 (flutter/packages#10939) 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 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
Prepares camera package for pigeon Swift migration as part of flutter/flutter#119109 Current implementation of `FormatUtils.selectBestFormat` overrides `MediaSettings.framesPerSecond`. With swift pigeon contracts `MediaSettings` is non mutable so that will no longer be possible. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Prepares camera package for pigeon Swift migration as part of flutter/flutter#119109
Current implementation of
FormatUtils.selectBestFormatoverridesMediaSettings.framesPerSecond. With swift pigeon contractsMediaSettingsis non mutable so that will no longer be possible.Pre-Review Checklist
[shared_preferences]pubspec.yamlwith 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.mdto 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-assistbot 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