Skip to content
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

Android7.0及以上的系统调用前置摄像头问题 #21

Open
AndroidEngineerChenXiaoshuang opened this issue Sep 26, 2017 · 2 comments

Comments

@AndroidEngineerChenXiaoshuang

你好作者,我在之前也开发过视频录制的Demo,但是在遇到切换成前置摄像头的时候报错,并且是7.0及以上的系统就会报错,作者知道有什么解决的方法吗?相互学习,感激不尽!

@werbhelius
Copy link
Owner

报错的log是什么?

@zacalex
Copy link

zacalex commented Jan 10, 2018

同样的问题
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:1945)
at edu.usc.cesr.ema_uas.camera.MediaUtils.startPreView(MediaUtils.java:252)
at edu.usc.cesr.ema_uas.camera.MediaUtils.surfaceCreated(MediaUtils.java:285)
at android.view.SurfaceView.updateSurface(SurfaceView.java:663)
at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:143)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2349)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1392)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6752)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants