Decouple camera and client implementations

Pass a callback function and context pointer to the client,
instead of relying on the shared buffer implementation.