This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[camera] Move camera streaming to platform interface #5783
Merged
fluttergithubbot
merged 10 commits into
flutter:main
from
stuartmorgan-g:camera-stream-platform-interface
May 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6fb3c24
Add platform interface versions of the image data classes
stuartmorgan-g d86e912
Platform interface package parts
stuartmorgan-g ea8c032
Rewire app-facing package
stuartmorgan-g 7a84131
Test update
stuartmorgan-g 3b6865c
Temporary pubspec overrides
stuartmorgan-g 7414e48
Version bumps
stuartmorgan-g b191e34
Future-proof the new API with an options dictionary
stuartmorgan-g 014f1c0
Review comments
stuartmorgan-g 701eefe
Revert app-facing portion
stuartmorgan-g 881786c
Merge branch 'main' into camera-stream-platform-interface
stuartmorgan-g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Future-proof the new API with an options dictionary
- Loading branch information
commit b191e3455c02ff738fc5543d394e45c3e3fa624b
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm confused by this name. Does the app-facing package notify the platform implementation package that a frame is available? Based on the
MethodChannelimplementation, it looks like this method creates the stream that the app-facing package listens to. Would a better name be something likecreateCameraImageDataStream?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.
I don't like this name either; I used this name because it's the pattern used by all of the existing Streams in the interface
Do you want to pick a new naming scheme for platform interface streams in this plugin as part of this PR? If so I could make alternate named versions of all of the existing ones, doing passthroughs to the old names (which would be soft-deprecated with a comment), so that we'd get consistency.
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.
Ah, I see. I think I was confused by the call to startImageStream. I understand now that the app-facing package is adding a listener to the stream which is created by the platform implementation. I think the current name is appropriate for how it is being used then. Streams and callbacks in Flutter tend to use the
on<event-name>pattern like the one here.