[camera]manages ios camera's orientation states on capture session queue#4748
Conversation
14ef7b7 to
7978ee8
Compare
7978ee8 to
cbeacff
Compare
| /// An internal camera object that manages camera's state and performs camera operations. | ||
| @property(nonatomic, strong) FLTCam *camera; |
There was a problem hiding this comment.
I don't love that this is exposed as readwrite now, but I can't think of a better way to do it since a test-only convenience initializer isn't great either since FLTCam is created later.
There was a problem hiding this comment.
Oh this was supposed to be readwrite in the first place. The old readonly worked before only because we used the ivar and bypassed the attribute's restriction:
_camera = cam;
There was a problem hiding this comment.
readwrite in the implementation though, not to, say, consumers of the plugin (who can also import the test module). But it's fine I don't have a better idea for testing this.
There was a problem hiding this comment.
yeah should be fine. we already have many internal APIs exposed under this test module (eg CameraPlugin_Test.h). it's very unlikely for non-test code to import it.
This PR moves iOS camera's orientation updates to the session queue.
As discussed in the proposal under "Overview" section:
and under the list of violation of the "Thread safety for state access" section:
Issue here: flutter/flutter#96429
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.