I want to show filtered camera preview in my application.
I'm using Camera.setPreviewCallback() for this. I managed to process callback data and show filtered image in OpenGL view but I have no idea how to hide original camera preview and still receive preview callbacks. Making surface view "gone" or "invisible" doesn't work, making it small enough (10x10) to hide behind GUI doesn't work either. It just stops sending callbacks with preview data.
Can you share some workaround on this? I'm testing using Galaxy S2.
Thank you in advance.
A solution is to even though set the Preview Size to be as the actual screen, in the onMeasure of the Preview SurfaceView make it smaller, that works for me:
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
this.setMeasuredDimension(2, 2);
}