2

this is a little pain in the ass lately for me. Some of the devices on which I'm running my app, are getting this error.

Basically, application starts recording, goes to background. When app is being brought to front, it should perform mediarecorder.stop() and restart recording. Somehow, some of the devices have problem with this. In those situations, I'm getting black screen and "timed out waiting for incoming camera video frames" message. Camera is locked and can't be used anymore even when I kill the app.

Would appreciate any help with this. I'm trying to figure it out for a week now.


@Override
public void onPause() {
    editor.putInt("checkBackground", 1);  
    editor.commit();  

    if (inRecord){  
        editor.putInt("autoResume", 1);  
        editor.commit();  
    }  
    if (inPreview){  
        if (camera != null) {  
            camera.stopPreview();  
            camera.setPreviewCallback(null);  
            camera.release();  
            camera = null;  
        }  
        inPreview = false;  
        gpsManager.stopListening();  
    }  
    super.onPause();
}

After some investigation, while app is going to background, I'm getting below messages in LogCat.


WORKING VERSION

08-13 12:30:16.245: E/BufferQueue(1684): [SurfaceView] dequeueBuffer: SurfaceTexture has been abandoned!
08-13 12:30:16.245: E/CameraHal(1705): ExtIsp  ! CameraFillBufferDone dequeueNativeBuffer failed vendor/st-ericsson/variant/hardware/libcamera/STEExtIspInternal.cpp:836

HANGING VERSION WITH BLACK SCREEN

08-13 12:12:01.385: E/BufferQueue(104): [SurfaceView] queueBuffer: SurfaceTexture has been abandoned!
08-13 12:12:01.385: E/SurfaceTextureClient(107): queueBuffer: error queuing buffer to SurfaceTexture, -19
08-13 12:12:01.385: E/CameraHAL(107): Surface::queueBuffer returned error -19
08-13 12:12:01.385: E/BufferQueue(104): [SurfaceView] dequeueBuffer: SurfaceTexture has been abandoned!
08-13 12:12:01.385: E/CameraHAL(107): (41b7c548)   hardware/ti/omap4xxx/camera/espresso/ANativeWindowDisplayAdapter.cpp:1199 handleFrameReturn - dequeueBuffer failed: No such device (19)
cyrial
  • 163
  • 1
  • 8
  • have you confirmed that it records in background? I could imagine that it goes in an onPause state, and if you haven't handled this event properly you get an error. – sschrass Aug 13 '13 at 07:30
  • edit your question please, code in the comments is barely readable. – sschrass Aug 13 '13 at 07:36
  • Here is the onPause() method - http://pastebin.com/teYmPkaH – cyrial Aug 13 '13 at 07:42
  • You can edit your question and add your code, no need for external resources. – sschrass Aug 13 '13 at 07:43
  • Thanks for updating. Anyway, the only thing which is being executed here is if (inRecord) part and setting checkBackground. Is there anything more which should be set for mediarecorder while going into onPause? Funny thing that this works on most of the devices. – cyrial Aug 13 '13 at 08:12

0 Answers0