I have some questions regarding the code below for camera preview applicaiton. I am hoping someone can help me out. Thanks in advance.
1. How does surfaceCreated() and CreateSurface() relate? Is this surface created via createSurface() from SurfaceFlinger client to SurfaceFlinger server? If so, there must be 2 buffers (frame buffers from display driver if there is hw acceleration or if it is the emulator, it will be from ashmem) associated with this surface: surface BB (for composition) and surface FB (for display). Am I correct? Can you please confirm? 2. How does the rendering buffer (frame buffer BB and frame buffer FB) get allocated in the camera preview application? Are they allocated by the application? 3. How does this surface relate to the preview buffers? Are the preview buffers allocated by the Camera Service during startPreview? private class CameraSurfaceView extends SurfaceView implements SurfaceHolder.Callback { private SurfaceHolder mHolder; private Camera camera = null; public CameraSurfaceView(Context context) { super(context); mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public void surfaceCreated(SurfaceHolder holder) { camera = Camera.open(); try { camera.setPreviewDisplay(mHolder); } catch (Exception e) { Log.e("Camera", "Failed to set camera preview display", e); } } } Thank you very much for your help. an -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en