Google Glass preview image scrambled with new XE10 release

前端 未结 6 1173
情歌与酒
情歌与酒 2020-12-02 17:44

This occurs using a few apks that make use of the camera (e.g., zxing, opencv). It displays a glitched image in the preview but it is still a function of what the camera se

6条回答
  •  情深已故
    2020-12-02 17:57

    The bug still exists as of XE16 and XE16.11 but this code gets past the glitch and shows a normal camera preview, note the three parameter setting lines and their values. I have also tested this at 5000 (5FPS) and it works, and at 60000 (60FPS) and it does not work:

        public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
            if (mCamera == null) return;
    
            Camera.Parameters camParameters = mCamera.getParameters();
            camParameters.setPreviewFpsRange(30000, 30000);
            camParameters.setPreviewSize(1920, 1080);
            camParameters.setPictureSize(2592, 1944);
            mCamera.setParameters(camParameters);
            try {
                mCamera.startPreview();
            } catch (Exception e) {
                mCamera.release();
                mCamera = null;
            }
        }
    

提交回复
热议问题