Skip to content

[camera_avfoundation] Fix incorrect types in image stream events #9418

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RobertOdrowaz
Copy link
Contributor

Fixes the types used in the image stream events. Most importantly, it corrects the lensAperture to lensAperture**()** that caused a crash. Some other arguments were also updated to match exactly the types expected by the parsing in type_conversions.dart.

Resolves: flutter/flutter#170240

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

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

@stuartmorgan-g
Copy link
Contributor

Maybe it's out of scope for this PR, but now that this file is Swift the event channel could be converted to a Pigeon event channel. That would make this class of bug impossible here, because we'd have actual type checking.

@RobertOdrowaz
Copy link
Contributor Author

Maybe it's out of scope for this PR, but now that this file is Swift the event channel could be converted to a Pigeon event channel. That would make this class of bug impossible here, because we'd have actual type checking.

I agree 100%, but I wanted to fix this ASAP because it seems to affect a number of people. I will open an issue for the pigeon refactor

@stuartmorgan-g
Copy link
Contributor

I just noticed that the Pigeon generation is still Obj-C, so switching to Pigeon event channels would be a much bigger change than I had realized. Definitely out of scope here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[camera_avfoundation] Crash when opening camera stream starting from 0.9.19+2
2 participants