Supreethks
Supreethks

Reputation: 607

Android camera freeze issue

I have implemented a custom camera application. I have followed the steps explained in this tutorial.

On some devices, on taking a picture, my application freezes.

I get the following error message in logcat.

E/V4LCameraAdapter(2321): hardware/amlogic/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:834 GetFrame - GetFrame: No buff for Dequeue

E/V4LCameraAdapter(2321): hardware/amlogic/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:993 previewThread - Preview thread get frame fail, need sleep:33333

Is the error specific to the hardware of the device? Is there a way to set the camera parameter from SDK to avoid No buff error?

Upvotes: 1

Views: 707

Answers (1)

Supreethks
Supreethks

Reputation: 607

Figured out the problem.

Apparently this call back was choking the buffers with the data for each frame of the camera preview.

camera.setPreviewCallback(new PreviewCallback() {
      public void onPreviewFrame(byte[] data, Camera arg1) {
    //invalidate surfaceview
}
 });

Removing the callback worked for me.

Upvotes: 1

Related Questions