Firefly Open Source Community

Title: How to display video from two cameras on RK3288 Reload£¿ [Print This Page]

Author: larryyuan    Time: 9/13/2017 20:53
Title: How to display video from two cameras on RK3288 Reload£¿
Hi Sir,
It works normally when just only one camera opened like below.
Camera mcamera = Camera.open(0);
or
Camera mcamera = Camera.open(1);
both the stream video are also ok to display.
BUT I try open two cameras to preview at the same time in Android APP.
it always crashed and seems like framework issue. Please help me out,
Many thanks!
Log:
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.<init>(Camera.java:497)
at android.hardware.Camera.open(Camera.java:342)
at com.goer.dualcamera.MainActivity$2.surfaceCreated(MainActivity.java:76)
at android.view.SurfaceView.updateWindow(SurfaceView.java:633)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:197)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2086)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1161)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6198)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5280)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)


Author: isle    Time: 9/14/2017 09:45
two cameras? UVC?or mipi?
Author: larryyuan    Time: 9/14/2017 12:16
yes.
one mipi camera and one hdmiin camera.
Author: isle    Time: 9/15/2017 09:22
we  have tested one UVC and one mipi ( or hdmiin),it works well.
but not one mipi and one hdmiin.
Author: larryyuan    Time: 9/15/2017 11:44
isle Posted at 9/15/2017 09:22
we  have tested one UVC and one mipi ( or hdmiin),it works well.
but not one mipi and one hdmiin.

hi isle,

could you tell me how to implement it with one UVC and hdmiin ? thank you very much.




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1