duanhong169 / Camera

📸 Use Android camera to take pictures and videos, based on `camera2` api.
Apache License 2.0
130 stars 45 forks source link

Compatible with external UVC USB camera ? #10

Open batchku opened 5 years ago

batchku commented 5 years ago

Hello!

Thank you for this project.

Would this approach be compatible with an external usb camera (UVC compatible webcam)?

duanhong169 commented 5 years ago

I think it's compatible with an external camera, however, you probably need to handle the facing yourself, currently only CameraCharacteristics.LENS_FACING_BACK and CameraCharacteristics.LENS_FACING_FRONT are handled.

https://github.com/duanhong169/Camera/blob/d9fd8b4db468fb830d72e9852de629923cb0301a/camera/src/main/java/top/defaults/camera/Camera2Photographer.java#L48-L51