-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[camera] Support image streams on Windows platform #7220
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
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Are we better off just removing the assertion all together, seems redundant to limit what non federated packages can do? |
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.
Looks great - thanks for the contribution!
For second reviewer: don't merge until #7067 lands and camera_windows 0.2.5
is published.
Excellent question. Personally, I think it's good to keep these checks. This tells app developers if they use an API that's unsupported on a specific platform, which is a common mistake. If a federated platform package wants to add a feature, they can ask us to remove a particular check to allowlist them. |
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.
LGTM (it also looks like the windows implementation has landed)
Are we better off just removing the assertion all together, seems redundant to limit what non federated packages can do?
Typically you would be correct, but the camera plugin still uses a default implementation for CameraPlatform
. For newer plugins, we don't add this check since the platform interface would throw an error by default if the method wasn't supported.
Looks like this needs to be rebased and merge conflicts fixed. #7067 has landed, so I'm assuming once that's done, we're close to landing this? |
@jlundOverlay Are you still planning on updating this PR? |
Have fixed the merge conflicts, should be good to go. |
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.
Looking at this PR in more detail: it does not appear that the bug I flagged here was ever fixed. We should not enable this feature when it will fail to send responses and violate the contract of the engine APIs it uses.
We should fix this via this pattern which is our preferred approach; the hard-coded platform checks are a legacy of pre-federation approaches. Rather than update the hard-coding, the much better fix here would be to add a new platform interface method to query for streaming support, update the supported platforms to return |
@jlundOverlay Are you still planning on updating this to address the issue with missing responses? If not, we should revert the underlying PR, as that code is not correct, and would cause serious issues if ever exposed. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@yoongyo it seems as the original author of patch was doing that as part of their job, and maybe they don't work anymore. I think it would be wise to look for someone, who can continue working on this. Of course, writing this is easy, but I already tried to put this into my job's todo-list, although, in the end, we will not use this feature |
Closing in light of #7951 and the lack of response here. If you decided to revisit this feature in the future, please feel free to open a new PR! |
Adds support to the to the camera plugin for streaming frames on windows as implemented in #7067
Fixes flutter/flutter#97542
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.