See the camera duplicated by screen in real time

1

I have an application created and I need to know how to see on the screen of the mobile what is seen by the camera in duplicate form and in real time. At the moment the two screens are shown but one remains "frozen" and the second works correctly.

To show what is displayed by the camera I am using two FrameLayout.

        mCamaraV = new CamaraView(this, mCamara);
        camara_v = (FrameLayout) findViewById(R.id.camara_izq);
        camara_v.addView(mCamaraV);

        mCamaraV2= new CamaraView(this, mCamara);
        camara_v2 = (FrameLayout) findViewById(R.id.camara_dcha);
        camara_v2.addView(mCamaraV2);

CamaraView class extends from SurfaceView

Thank you!

    
asked by MABM 30.08.2017 в 13:20
source

1 answer

0

Try using the same CamaraView object in the two FrameLayout.

mCamaraV = new CamaraView(this, mCamara);
camara_v = (FrameLayout) findViewById(R.id.camara_izq);
camara_v.addView(mCamaraV);

camara_v2 = (FrameLayout) findViewById(R.id.camara_dcha);
camara_v2.addView(mCamaraV);
    
answered by 30.08.2017 в 14:35