Skip to content

Conversation

@RobertOdrowaz
Copy link
Contributor

Migrates camera wrappers as part of flutter/flutter#119109

This PR migrates wrappers to Swift:

  • FLTCaptureDevice
  • FLTCaptureSession
  • FLTFormatUtils

In line with Swift conventions, the FLT prefixes are removed. The Default class implementations are replaced with protocol conformance on base AV classes.

Pre-Review Checklist

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

  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. 2 3

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 migrates FLTCaptureDevice, FLTCaptureSession, and FLTFormatUtils classes to Swift, removing the FLT prefixes and replacing Default class implementations with protocol conformance on base AV classes. The changes include modifications to the example project and the core implementation, updating tests and adapting to the new Swift conventions. The review focuses on ensuring correctness, maintainability, and adherence to the project's coding standards.

@hellohuanlin
Copy link
Contributor

Hi, could you sweep through gemini's comment first?

@RobertOdrowaz
Copy link
Contributor Author

@hellohuanlin done, there was nothing meaningful there, a bunch of comments regarding argument names in mocks and some streight up invalid suggestions

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-wrappers-swift-migration-part3 branch from 49ed2ce to b67ac9d Compare October 28, 2025 15:36
@stuartmorgan-g stuartmorgan-g added the triage-ios Should be looked at in iOS triage label Oct 28, 2025
@RobertOdrowaz
Copy link
Contributor Author

@hellohuanlin pls take a look at this PR again when you have some time

Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-wrappers-swift-migration-part3 branch 2 times, most recently from ec7e9da to 4bbc6a5 Compare November 11, 2025 12:32
Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with 1 nit.

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-wrappers-swift-migration-part3 branch from 4bbc6a5 to 76d9818 Compare November 16, 2025 10:26
@RobertOdrowaz RobertOdrowaz added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 16, 2025
@auto-submit auto-submit bot merged commit 4385dea into flutter:main Nov 16, 2025
80 checks passed
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 17, 2025
flutter/packages@799b62c...ce44ebb

2025-11-17 [email protected] Kgp bulk update
(flutter/packages#10412)
2025-11-16 [email protected] [camera_avfoundation] Wrappers
swift migration - part 3 (flutter/packages#10293)
2025-11-15 [email protected] [ci] Update Flutter version for
`release` (flutter/packages#10425)
2025-11-15 [email protected] Manual roll Flutter from
c3f2704 to 9b5ad80 (2 revisions) (flutter/packages#10435)
2025-11-14 [email protected] Manual roll Flutter from
ee23168 to c3f2704 (5 revisions) (flutter/packages#10433)
2025-11-14 [email protected] [ci] Remove mustache_template from
allowed external deps (flutter/packages#10427)
2025-11-14 [email protected] [animations] Clarify that onClosed is
called before transition (flutter/packages#10400)
2025-11-14 [email protected] [web_benchmarks] Report correct expected
metrics for wasm (flutter/packages#10236)
2025-11-13 [email protected] [google_maps_flutter] Set properties
before adding maps objects (flutter/packages#10347)
2025-11-13 [email protected] Roll Flutter (stable) from
a0e9b9d to b45fa18 (3 revisions) (flutter/packages#10420)

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 [email protected] 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
IvoneDjaja pushed a commit to IvoneDjaja/flutter that referenced this pull request Nov 22, 2025
…er#178649)

flutter/packages@799b62c...ce44ebb

2025-11-17 [email protected] Kgp bulk update
(flutter/packages#10412)
2025-11-16 [email protected] [camera_avfoundation] Wrappers
swift migration - part 3 (flutter/packages#10293)
2025-11-15 [email protected] [ci] Update Flutter version for
`release` (flutter/packages#10425)
2025-11-15 [email protected] Manual roll Flutter from
c3f2704 to 9b5ad80 (2 revisions) (flutter/packages#10435)
2025-11-14 [email protected] Manual roll Flutter from
ee23168 to c3f2704 (5 revisions) (flutter/packages#10433)
2025-11-14 [email protected] [ci] Remove mustache_template from
allowed external deps (flutter/packages#10427)
2025-11-14 [email protected] [animations] Clarify that onClosed is
called before transition (flutter/packages#10400)
2025-11-14 [email protected] [web_benchmarks] Report correct expected
metrics for wasm (flutter/packages#10236)
2025-11-13 [email protected] [google_maps_flutter] Set properties
before adding maps objects (flutter/packages#10347)
2025-11-13 [email protected] Roll Flutter (stable) from
a0e9b9d to b45fa18 (3 revisions) (flutter/packages#10420)

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 [email protected] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: camera platform-ios platform-macos triage-ios Should be looked at in iOS triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants