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.8k
[camera] Add implementations for camera_platform_interface
package.
#3302
Merged
mvanbeusekom
merged 67 commits into
flutter:master
from
Baseflow:camera_federated_implementation
Dec 12, 2020
Merged
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
76787aa
First suggestion for camera platform interface
mvanbeusekom d0be649
Remove test coverage folder
mvanbeusekom 7b4c8be
Renamed onLatestImageAvailableHandler definition
mvanbeusekom a959bbe
Split CameraEvents into separate streams
mvanbeusekom 2fa0419
Implemented & tested first parts of method channel implementation
BeMacized ef6dee8
Remove unused EventChannelMock class
BeMacized c15df6c
Add missing unit tests
BeMacized 8e33d0e
Added placeholders in default method channel implementation
BeMacized a9ea2b9
Updated platform interface
BeMacized 62c9a8c
Update packages/camera/camera_platform_interface/lib/src/platform_int…
BeMacized ca7f5d7
Add unit test for availableCameras
BeMacized eff917f
Expand availableCameras unit test. Added unit test for takePicture.
BeMacized afd02f7
Add unit test for startVideoRecording
BeMacized 397acce
Add unit test for prepareForVideoRecording
BeMacized 39b4cd5
Add unit test for stopVideoRecording
BeMacized a999954
Add unit test for pauseVideoRecording
BeMacized 451500a
Add unit test for buildView
BeMacized 5bf7795
WIP: Dart and Android implementation
danielroek 78b4db0
Fix formatting
mvanbeusekom 8afa33a
Have resolution stream replay last value on subscription. Replace str…
BeMacized d3411ba
Added reverse method channel to replace event channel. Updated initia…
BeMacized a96f785
Fixed example app for Android. Removed isRecordingVideo and isStreami…
danielroek 28a3662
Added some first tests for camera/camera
danielroek 2ea1a00
More tests and some feedback
danielroek 484f1ce
iOS implementation: Removed standard event channel. Added reverse met…
BeMacized 8571665
Started splitting initialize method
mvanbeusekom f83d6b5
Finish splitting up initialize for iOS
BeMacized 99b36eb
Update unit tests
BeMacized 53ad8a1
Fix takePicture method on iOS
BeMacized eadc398
Split initialize method on Android
mvanbeusekom 752e764
Fix video recording on iOS. Updated platform interface.
BeMacized 1b74948
Update unit tests
BeMacized fe00999
Update error handling of video methods in iOS code. Make iOS code mor…
BeMacized 8c3cc3b
Updated startVideoRecording documentation
mvanbeusekom a6441f4
Make sure file is returned by stopVideoRecording
mvanbeusekom 959fd3e
Use correct event-type after initializing
mvanbeusekom b8eeb05
Fix DartMessenger unit-tests
mvanbeusekom e34caa4
Change cast
BeMacized f1fb5f0
Fix formatting
mvanbeusekom d1f6cd1
Fixed tests, formatting and analysis warnings
mvanbeusekom 6a30ccd
Added missing license to Dart files
mvanbeusekom b26d633
Updated CHANGELOG and version
mvanbeusekom 9055fe1
Added additional unit-tests to platform_interface
mvanbeusekom e8c2977
Added more tests
danielroek 086c3ed
Formatted code
danielroek 78fac3a
Re-added the CameraPreview widget
mvanbeusekom ca13bd5
Use import/export instead of part implementation
mvanbeusekom 6fcd5e7
fixed formatting
mvanbeusekom b442759
Resolved additional feedback
mvanbeusekom def916f
Update dependency to git repo
mvanbeusekom 1d1365a
Depend on pub.dev for camera_platform_interface
mvanbeusekom fb14d0c
Fix JAVA formatting
mvanbeusekom 69fa625
Fix changelog
mvanbeusekom 5bda95c
Make sure camera package can be published
mvanbeusekom a063f88
Assert when stream methods are called from wrong platform
mvanbeusekom fee08ba
Add dev_dependency on plugin_platform_interface package, required by …
ditman ed92b75
Remove pedantic requirement from initialize() method. Remove unnecess…
ditman 844d321
Remove dependency on dart:io
mvanbeusekom 381450d
Restrict exposed types from platform interface
mvanbeusekom bfc6b92
Moved test for image stream in separate file
mvanbeusekom a0b4dfa
Fixed formatting issue
mvanbeusekom ca6052a
Fix deprecation warning
mvanbeusekom ef867ba
Apply feedback from bparrishMines
mvanbeusekom 3e24d9f
Fix formatting issues
mvanbeusekom 46a1b27
Removed redundant podspec files
mvanbeusekom 7f266cd
Removed redundant ios files
mvanbeusekom c1c04a6
Handle SecurityException
mvanbeusekom 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
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
Oops, something went wrong.
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.
Can we handle SecurityException too ?
I see we have static file name for pictures. We can save one picture?
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.
This is not the case, the
createTempFile
method will create a unique file name. The first parameter ("CAP" in this case) is a prefix that will be used to generate the name (see [File.createTempFile](https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File) for details).The actual file will look something like "CAP3602253894598046604.jpg"
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.
Good catch regarding the
SecurityException
, I will add support to handle this as well.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.
done
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.
Great