#pragma once #include #include #include #include #include #include class rtsp_server : public WiFiServer { public: rtsp_server(OV2640 &cam, unsigned long interval, int port = 554); void doLoop(); private: struct rtsp_client { public: rtsp_client(const WiFiClient &client, OV2640 &cam); WiFiClient wifi_client; // Streamer for UDP/TCP based RTP transport std::shared_ptr streamer; // RTSP session and state std::shared_ptr session; }; OV2640 cam_; std::list> clients_; uintptr_t task_; Timer<> timer_; static bool client_handler(void *); };