Hello,
I am developing an app very similar to the CCTV example where I capture a preview frame, convert it to a JPEG, send it through a socket, and display on another device. So far so good – it works fairly well.
As Erel mentioned in the example, five frames per second seems to be the max. I did some timing and found out the preview frame rate on my Nexus 5 was about 150 ms with no processing of the preview image. This corroborates the approximately five frames per second max.
I have been searching the B4A forums and Internet for ways to possibly speed this up – 10-15 frames per second would be a major win.
I have seen several posts mention using setPreviewCallbackWithBuffer along with addCallbackBuffer instead of setPreviewCallback. The former allows one to reuse preallocated buffers.
Erel posted the source code for the Camera library (thanks Erel) http://www.b4x.com/android/forum/threads/camera-library-v2-20.23799/#post-137872. I think he uses the latter.
Question: Does anybody have experience using the preallocated buffers? Do you think it would be worth trying to modify the Camera library to allow the use of the preallocated buffers?
Thanks,
Barry.
I am developing an app very similar to the CCTV example where I capture a preview frame, convert it to a JPEG, send it through a socket, and display on another device. So far so good – it works fairly well.
As Erel mentioned in the example, five frames per second seems to be the max. I did some timing and found out the preview frame rate on my Nexus 5 was about 150 ms with no processing of the preview image. This corroborates the approximately five frames per second max.
I have been searching the B4A forums and Internet for ways to possibly speed this up – 10-15 frames per second would be a major win.
I have seen several posts mention using setPreviewCallbackWithBuffer along with addCallbackBuffer instead of setPreviewCallback. The former allows one to reuse preallocated buffers.
Erel posted the source code for the Camera library (thanks Erel) http://www.b4x.com/android/forum/threads/camera-library-v2-20.23799/#post-137872. I think he uses the latter.
Question: Does anybody have experience using the preallocated buffers? Do you think it would be worth trying to modify the Camera library to allow the use of the preallocated buffers?
Thanks,
Barry.