blueberryCoder / LiveStream

一个实现直播的解决方案,视频采用H264编码、音频采用ACC编码、传输采用Rtmp协议
http://blog.csdn.net/a992036795/article/details/64460049
365 stars 109 forks source link

华为荣耀8闪退,华为P7 我的数据流 推送不到服务器上去 #8

Open luchuantao opened 7 years ago

luchuantao commented 7 years ago

下面是荣耀8报的异常: 06-17 16:30:53.717 613-613/? I/CameraService: CameraService::connect E (pid 10667 "com.blueberry.sample", id 0) 06-17 16:30:53.717 613-613/? I/CameraService: CameraService::connect call (PID -1 "com.blueberry.sample", camera ID 0) for HAL version default and Camera API version 1 06-17 16:30:53.718 613-613/? W/ServiceManager: Permission failure: android.permission.CAMERA from uid=10208 pid=10667 06-17 16:30:53.718 613-613/? E/CameraService: Permission Denial: can't use the camera pid=10667, uid=10208 06-17 16:30:53.718 10667-10667/com.blueberry.sample W/CameraBase: An error occurred while connecting to camera 0: Service not available 06-17 16:30:53.718 10667-10667/com.blueberry.sample E/Camera: Camera new cameraInitNormal:-13 06-17 16:30:53.718 10667-10667/com.blueberry.sample W/System.err: java.lang.RuntimeException: Fail to connect to camera service 06-17 16:30:53.718 10667-10667/com.blueberry.sample W/System.err: at android.hardware.Camera.(Camera.java:571) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.hardware.Camera.open(Camera.java:430) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at com.blueberry.media.VideoGatherer.openCamera(VideoGatherer.java:286) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at com.blueberry.media.VideoGatherer.initCamera(VideoGatherer.java:89) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at com.blueberry.media.MediaPublisher.initVideoGatherer(MediaPublisher.java:101) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at com.blueberry.sample.MainActivity.onResume(MainActivity.java:84) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1279) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.Activity.performResume(Activity.java:7017) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3561) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3626) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2876) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.os.Handler.dispatchMessage(Handler.java:105) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.os.Looper.loop(Looper.java:156) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6531) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at java.lang.reflect.Method.invoke(Native Method) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) 06-17 16:30:53.719 10667-10667/com.blueberry.sample W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)

                                                              --------- beginning of crash

06-17 16:30:53.719 10667-10667/com.blueberry.sample E/AndroidRuntime: FATAL EXCEPTION: main Process: com.blueberry.sample, PID: 10667 java.lang.RuntimeException: Unable to resume activity {com.blueberry.sample/com.blueberry.sample.MainActivity}: java.lang.RuntimeException: 打开摄像头失败 at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3586) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3626) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2876) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6531) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831) Caused by: java.lang.RuntimeException: 打开摄像头失败 at com.blueberry.media.VideoGatherer.openCamera(VideoGatherer.java:289) at com.blueberry.media.VideoGatherer.initCamera(VideoGatherer.java:89) at com.blueberry.media.MediaPublisher.initVideoGatherer(MediaPublisher.java:101) at com.blueberry.sample.MainActivity.onResume(MainActivity.java:84) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1279) at android.app.Activity.performResume(Activity.java:7017) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3561) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3626)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2876)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)  at android.os.Handler.dispatchMessage(Handler.java:105)  at android.os.Looper.loop(Looper.java:156)  at android.app.ActivityThread.main(ActivityThread.java:6531)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)  Caused by: java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.(Camera.java:571) at android.hardware.Camera.open(Camera.java:430) at com.blueberry.media.VideoGatherer.openCamera(VideoGatherer.java:286) at com.blueberry.media.VideoGatherer.initCamera(VideoGatherer.java:89)  at com.blueberry.media.MediaPublisher.initVideoGatherer(MediaPublisher.java:101)  at com.blueberry.sample.MainActivity.onResume(MainActivity.java:84)  at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1279)  at android.app.Activity.performResume(Activity.java:7017)  at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3561)  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3626)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2876)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)  at android.os.Handler.dispatchMessage(Handler.java:105)  at android.os.Looper.loop(Looper.java:156)  at android.app.ActivityThread.main(ActivityThread.java:6531)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)