android-gpuimage
android-gpuimage copied to clipboard
Problem when GPUImageView.setImage continuously
Hi everyone
I use GPUImageView to preview camera video frames, because the camera is not standard Android camera, it captures data from USB connection or network stream. so I don't use GPUImage.setUpCamera feature.
my app preview the image frames with GPUImageView.setImage method. I found that if the objects in front of the camera lens move quickly, the image will be splitted.
I think that's because GPUImage rendering is slower than image frames feeding.
Am i right?
How to known if the rendering is finishhed.
I also checked if GLSurfaceView is dirty before setImage
Maybe you need to setup a vsync situation to swap graphics buffers ?
This is how grafika does it:
/**
* Calls eglSwapBuffers. Use this to "publish" the current frame.
*
* @return false on failure
*/
public boolean swapBuffers(EGLSurface eglSurface) {
return EGL14.eglSwapBuffers(mEGLDisplay, eglSurface);
}
(referenced from https://github.com/google/grafika/blob/f3c8c3dee60153f471312e21acac8b3a3cddd7dc/src/com/android/grafika/gles/EglCore.java)
I have already done it..but still it lacking how to solve
Sorry?
The GPUImage and GPUImageFilter apply and draw data from the camera are very slow or if apply group filter. I have modified some class of the GPUImageFilter end render, It runs very fast. If you want I can send to you my source code, I do not post it to here because of code very long.
do a Pull Request?
@monxarat I also encountered this problem. I was very slow in camera preview at high resolution. How do you solve this problem? Can you send me the source code? Email: [email protected]