Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[camera_avfoundation] Add all missing iOS capture device types #5957

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

Closed

Conversation

rickcasson
Copy link

Several of the physical and logical cameras were missing when discovering available capture devices on iOS, so I completed the list based on Apple's developer documentation: https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype

@bibaswan-bhawal had previously made a PR (#5892) that added one of these types, but I think it would be helpful to have the complete list available.

List which issues are fixed by this PR. You must list at least one issue.
closes flutter/flutter#134151
closes flutter/flutter#130073

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style].
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

}
if (@available(iOS 17.0, *)) {
[discoveryDevices addObjectsFromArray:
@[ AVCaptureDeviceTypeExternal,
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

This PR could replace that one as it still adds the external camera type. I am also just about to make two other PRs that will depend on this one.

@stuartmorgan-g
Copy link
Contributor

It's not at all clear to me that adding logical and ephemeral camera types to the discovery process without any changes to the higher-level camera API is a good idea. What are the implications of this on clients? E.g., how will clients know which features are or are not supported on each type, given that the docs for the logical camera types list a bunch of features that aren't supported for them? How will clients know when an ephemeral camera is removed?

flutter/flutter#134151 requests new API that this does not provide or have an alternative for, for example.

Logical and ephemeral camera types both seem like features that need full design proposals, with discussion of how they will be plumbed through the entire plugin and across platforms, rather than just enabled at on a single platform at the native level without any other changes. /cc @bparrishMines

@stuartmorgan-g
Copy link
Contributor

Marking as a draft pending a design proposal, per comments above.

@rickcasson Is that something you are planning on moving forward with?

@stuartmorgan-g stuartmorgan-g marked this pull request as draft March 5, 2024 20:43
@rickcasson
Copy link
Author

Marking as a draft pending a design proposal, per comments above.

@rickcasson Is that something you are planning on moving forward with?

@stuartmorgan, yes, still planning on making a design proposal! I will try to finish research into the Android (and other platform) and submit that in the coming weeks.

@goderbauer
Copy link
Member

(triage): I am going to close this one since there hasn't been any follow-up. If you find the time to address the feedback given above please reopen this. Thank you.

@goderbauer goderbauer closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants