Yesterday I tried that buffered methods in a real device (HTC Desire) and it didn't work either. Now I'm wondering if I use it the wrong way. My code is this:
Parameters params = mCamera.getParameters(); mPixelFormat = PixelFormat.YCbCr_420_SP; params.setPreviewFormat(mPixelFormat); mCamera.setParameters(params); Size previewSize = mCamera.getParameters().getPreviewSize(); int bytesPerPixel = ImageFormat.getBitsPerPixel(mPixelFormat); int bufferSize = Math.round(bytesPerPixel/8.0f * previewSize.height * previewSize.width); byte[] buffer = new byte[bufferSize]; mCamera.addCallbackBuffer(buffer); Is that code ok? Again, if I hardcode the buffer size (in the Desire case 800*480*2) it works well. could anyone make that methods work? Thanks -- 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