tags:

views:

228

answers:

1

I am trying to display a filtered camera preview, using onPreviewFrame() callback.

The problem is that when i remove this line: mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

to hide the preview, the app crashes. The log reads: 08-19 15:57:51.042: ERROR/CameraService(59): registerBuffers failed with status -38

What does this mean? Is this documented anywhere?

I am using the CameraPreview from the SDK APIDemos: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html

A: 

What does this mean?

It means that you did not properly configure the SurfaceView via the SurfaceHolder.

Is this documented anywhere?

What is "this"? Here is the documentation for SurfaceView, SurfaceHolder, SURFACE_TYPE_PUSH_BUFFERS, and Camera.

If your real question is "where is it documented that Camera requires SURFACE_TYPE_PUSH_BUFFERS", I suspect that is undocumented. You use SURFACE_TYPE_PUSH_BUFFERS for camera preview and video playback, and perhaps other situations as well.

CommonsWare
Thanks for the attentionI tried to use other surface type to hide the view because i don't want to show the raw camera preview, but my own processed stream, much like this app http://www.androidtapp.com/camera-illusion/ .So, i do not know if i must use SURFACE_TYPE_PUSH_BUFFERS, as mentioned in this thread: http://groups.google.com/group/android-developers/msg/5eee66acae3f7c1fIf you know other resources (open source apps, books, etc) that can be useful for this intention, please share.
Julio Faerman