Files
esp32cam-rtsp/lib/rtsp_server/rtsp_server.h
Rene a60fbc7917 Develop (#108)
* Added seeed_xiao_esp32s3

* Fixed typo

* Updating build system

* Fixed typos

* Renamed envirnment name to seeed_xiao_esp32s3

* Update README.md

* Updated platformio definitions

* Added cache

* Updated README.md

* - Default value for initResult if initialzation fails

* constexpr camera_config_t m5stack_camera_settings

* Added M5Stack UnitCamS3

* Work in progress

* WIP

* Work in progress

* Removed OTA

* Added unitcams3

* UnitcamS3

* Corrected HTML for ipv4
fixed Sewrial issue esp32s2

* USER_LED_ON_LEVEL=LOW

* Added documentation pins for Mems/grove/led

* Typo

* Removed non required depencency

* Removed non required depencency

* Readded
2024-02-13 14:13:45 +01:00

38 lines
730 B
C++

#pragma once
#include <list>
#include <WiFiServer.h>
#include <ESPmDNS.h>
#include <OV2640.h>
#include <CRtspSession.h>
#include <arduino-timer.h>
class rtsp_server : public WiFiServer
{
public:
rtsp_server(OV2640 &cam, unsigned long interval, int port = 554);
void doLoop();
size_t num_connected();
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<CStreamer> streamer;
// RTSP session and state
std::shared_ptr<CRtspSession> session;
};
OV2640 cam_;
std::list<std::unique_ptr<rtsp_client>> clients_;
uintptr_t task_;
Timer<> timer_;
static bool client_handler(void *);
};