-
Notifications
You must be signed in to change notification settings - Fork 49
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
Support for all device cameras #111
Conversation
Development
- Ability to switch to any cameraId by setting camera.facing - Api call to switch to the next camera id, looping through all cameras - Ability to retrieve a CameraMap with information about all the cameras (by facing direction) and CameraCharacteristics
Found a bug where switching camera modes can cause the camera to change because it is calling start() instead of start(cameraId). |
Development from head fork
# Conflicts: # cameraViewEx/src/main/api21/com/priyankvasa/android/cameraviewex/Camera2.kt # cameraViewEx/src/main/base/com/priyankvasa/android/cameraviewex/CameraInterface.kt
I have fixed the issue. So what was happening is if the user was on camera #2 and start() is called the chooseByFacing method would pick camera 0 or 1 and the camera would suddenly change. To fix this I call start(cameraId) from start and pass in camera.facing. I'm not sure the method I also merged the latest in from develop. |
Development merge from head fork
# Conflicts: # cameraViewEx/src/main/base/com/priyankvasa/android/cameraviewex/CameraInterface.kt # cameraViewEx/src/main/java/com/priyankvasa/android/cameraviewex/CameraView.kt
I have merged in the latest from development |
Merge fork develop in
# Conflicts: # cameraViewEx/src/main/api21/com/priyankvasa/android/cameraviewex/Camera2.kt
Updated this PR with the latest from the development branch. |
…Manager cameraCharacteristics
Implement preview frame listener for camera1
… Better exceptions.
Merge pvasa/development into development
# Conflicts: # cameraViewEx/src/main/api14/com/priyankvasa/android/cameraviewex/Camera1.kt # cameraViewEx/src/main/api21/com/priyankvasa/android/cameraviewex/Camera2.kt
7280f31
to
f2e7cd9
Compare
3aeec10
to
a396a9f
Compare
@pcm2a I am closing this PR to recreate |
127f0ae
to
0ab1fb7
Compare
5235e1e
to
c071065
Compare
52286f5
to
5c7fd06
Compare
This PR contains a few features that I wasn't sure if it made sense to split up. I also included some examples in the sampleApp CameraFragment. I can remove them if needed.
start(cameraId: Int)
camera.nextCamera()
camera.facing = 2
would switch to camera 2-- Retrieve camera ids by facing direction (all front or back cameras)
-- Retrieve CameraCharacteristics by camera id
-- Retrieve the direction a camera is facing by camera id
If a device has two back cameras the device's camera will have one toggle to change from front to back. When on the back camera there will be additional icons to switch between each back camera. An example would be an icon of a "regular" view and a "wide angle" view or a "zoom" view. The camera map will provide enough information to display all of this in the UI. Another example is the LG V40 that has three back cameras, with icons for wide angle, regular and zoom.