Description
This would enable adding support for WS streams and probably make it easier to add other protocol support (e.g. UDP-based protocols like RTSP). It would also enable having a single port to serve/configure multiple cameras, which is not currently feasible.
More research/testing is needed to look into the viability of also using libuv for camera sources. The current implementation is already set up to be non-blocking (for Linux, there's a custom event loop using select()), but each camera is handled in a separate thread. Testing would be required to see if using libuv and a common loop for all cameras and network handling would be equally as robust, especially with camera disconnects. If it is viable, this would likely simplify the code by reducing the amount of independent threads.