@RequiresPermission(Manifest.permission.CAMERA) public CameraSource start() throws IOException {
synchronized (mCameraLock) {
    if (mCamera != null) {
      return this;
    }
    mCamera=createCamera();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
      mDummySurfaceTexture=new SurfaceTexture(DUMMY_TEXTURE_NAME);
      mCamera.setPreviewTexture(mDummySurfaceTexture);
    }
 else {
      mDummySurfaceView=new SurfaceView(mContext);
      mCamera.setPreviewDisplay(mDummySurfaceView.getHolder());
    }
    mCamera.startPreview();
    mProcessingThread=new Thread(mFrameProcessor);
    mFrameProcessor.setActive(true);
    mProcessingThread.start();
  }
  return this;
}

@ RequiresPermission ( Manifest . permission . CAMERA ) public CameraSource start ( ) throws IOException { synchronized ( mCameraLock ) { if ( mCamera != null ) { return this ; } mCamera = createCamera ( ) ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . HONEYCOMB ) { mDummySurfaceTexture = new SurfaceTexture ( DUMMY_TEXTURE_NAME ) ; mCamera . setPreviewTexture ( mDummySurfaceTexture ) ; } else { mDummySurfaceView = new SurfaceView ( mContext ) ; mCamera . setPreviewDisplay ( mDummySurfaceView . getHolder ( ) ) ; } mCamera . startPreview ( ) ; mProcessingThread = new Thread ( mFrameProcessor ) ; mFrameProcessor . setActive ( true ) ; mProcessingThread . start ( ) ; } return this ; }
opens the camera and starts sending preview frames to the underlying detector . the preview frames are not displayed .
