android camera error 1001 - what the heck is that?

后端 未结 4 1378
独厮守ぢ
独厮守ぢ 2020-12-19 04:53

I\'ve searched all over on the web and I can\'t find out what that 1001 error is. A few seconds after that I get the camera 100 error but I can\'t find out what the first er

4条回答
  •  感情败类
    2020-12-19 05:26

    So there was another reason for why I got it on my Galaxy S3. I was using a TextureView to show my camera preview and got this dreaded error when pressing the home button after a successful preview and then entering the app again. In the onResume() function I started up the preview again and found that I had not released the SurfaceTexture instance variable in the onSurfaceTextureDestroyed() function.

    I added the release line to this function and it now looks like this and works perfectly:

    @Override public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
        mSurfaceTexture = null; //This was the offending culprit.
    
        releaseMediaPlayer();
        releaseVideoRecorder();
        releaseCamera();
    
        return false;
    }
    

提交回复
热议问题