When I take picture with android, I call
camera.TakePicture(shutterCallback, rawCallback, postCallback, jpegCallback);
However I only need the post-image data. So I call
camera.TakePicture(null, null, postCallback, null);
I want to take sequential pictures as quickly as possible. The android spec tells me I have to wait for the jpeg callback to finish before I call takePicture again (fair enough).
But does this mean I have to add a jpegCallback and wait for it to be called? Is the compression an unskippable part of the Camera.takepicture process for android? It seems like a waste to have to wait for a compressed version of the image, when I don’t need it.
Many devices hae H/W image codecs built-in. Some of them totally skip rawCallback and postViewCallback and return only compressed data (jpeg). That way, uncompressed image (large) does not have to be copied into user space at all, resulting in faster image taking.
I think that when using H/W codecs compressed callback may actually be faster than uncompressed (less data to transfer).
So, you cannot rely on raw and postView callbacks to get picture data on all devices.