Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Fix preview and video size with satisfying conditions of multiple outputs. #689

Merged
merged 3 commits into from
Oct 31, 2018

Conversation

ryuta46
Copy link
Contributor

@ryuta46 ryuta46 commented Jul 28, 2018

In camera plugin, createCaptureSession is called for multiple outputs.

According to API reference of createCaptureSession, guarantee range of output resolution is decided depending on the level of camera device in case of multiple output.

API reference of createCaptureSession

Currently, preview size and video capture size is decided only depending on StreamConfigurationMap.getOutputSizes(int).
For this reason, the following error occurs on some devices and the camera device can not be used.

W/CameraDevice-JV-0(17996): Stream configuration failed due to: endConfigure:343: Camera 0: Unsupported set of inputs/outputs provided
E/CameraCaptureSession(17996): Session 0: Failed to create capture session; configuration failed

This PR fixes preview size and video capture size to solve the problem.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@ryuta46
Copy link
Contributor Author

ryuta46 commented Jul 28, 2018

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the contribution!

@bparrishMines bparrishMines merged commit e29b8a8 into flutter:master Oct 31, 2018
bparrishMines added a commit to bparrishMines/plugins that referenced this pull request Oct 31, 2018
bparrishMines added a commit that referenced this pull request Oct 31, 2018
andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
…puts. (flutter#689)

* fix preview size and video size to satisfy conditions for output to multiple targets.
andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
Akachu pushed a commit to Akachu/flutter_camera that referenced this pull request Apr 27, 2020
…puts. (flutter#689)

* fix preview size and video size to satisfy conditions for output to multiple targets.
Akachu pushed a commit to Akachu/flutter_camera that referenced this pull request Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants