wildfirechat / android-chat

即时通讯,聊天,野火IMAndroid客户端,支持Android 4.x —— 最新
http://docs.wildfirechat.cn
Other
2.55k stars 898 forks source link

第三方拍照视频报错 #264

Open minorlai opened 4 years ago

minorlai commented 4 years ago

2020-01-29 01:24:28.111 23107-23107/com.shengshi.tongzhou.push I/CJT: JCameraView SurfaceCreated 2020-01-29 01:24:28.111 1806-22796/? I/CameraService: CameraService::connect call (PID -1 "com.shengshi.tongzhou.push", camera ID 0) for HAL version default and Camera API version 1 2020-01-29 01:24:28.112 1806-22796/? E/CameraService: CameraService::connect X (PID 23107) rejected (invalid camera ID 0) 2020-01-29 01:24:28.112 23107-23897/com.shengshi.tongzhou.push W/CameraBase: An error occurred while connecting to camera 0: Status(-8): '4: validateConnectLocked:850: No camera device with ID "0" available' 2020-01-29 01:24:28.112 23107-23897/com.shengshi.tongzhou.push W/System.err: java.lang.RuntimeException: Fail to connect to camera service 2020-01-29 01:24:28.113 23107-23897/com.shengshi.tongzhou.push W/System.err: at android.hardware.Camera.(Camera.java:546) 2020-01-29 01:24:28.113 23107-23897/com.shengshi.tongzhou.push W/System.err: at android.hardware.Camera.open(Camera.java:392) 2020-01-29 01:24:28.113 23107-23897/com.shengshi.tongzhou.push W/System.err: at com.cjt2325.cameralibrary.CameraInterface.openCamera(CameraInterface.java:313) 2020-01-29 01:24:28.113 23107-23897/com.shengshi.tongzhou.push W/System.err: at com.cjt2325.cameralibrary.CameraInterface.doOpenCamera(CameraInterface.java:300) 2020-01-29 01:24:28.113 23107-23897/com.shengshi.tongzhou.push W/System.err: at com.cjt2325.cameralibrary.JCameraView$7.run(JCameraView.java:307)

minorlai commented 4 years ago

这个bug还存在哦 @imndx

imndx commented 4 years ago

@minorlai 这个问题是在什么手机复现的?

RookieBro commented 4 years ago

Vivo手机,华为手机这个问题也都会复现,我这里也复现了

mankind-evolve commented 2 years ago

这个android的音视频录制一直没有比价成熟的库 就连谷歌出的camerax感觉也是有很多问题。 这块问题困扰很久了

imndx commented 2 years ago

581

mankind-evolve commented 2 years ago

推荐一个第三方的国外库 https://github.com/natario1/CameraView