Skip to content

Commit 2b3ad35

Browse files
committed
RTSPServer class docu
1 parent 0082e2f commit 2b3ad35

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

src/AudioTools/Communication/RTSP/RTSPServer.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@
1919

2020
namespace audio_tools {
2121

22+
/**
23+
* @brief RTSPServer - Multi-client Audio Streaming Server (task-based)
24+
*
25+
* This class extends RTSPServerBase to add task/thread management for handling RTSP sessions.
26+
* It schedules the main server loop and individual session loops as tasks, allowing concurrent
27+
* client handling on platforms that support threading (e.g., ESP32 with FreeRTOS).
28+
*
29+
* Usage:
30+
* - Construct with a valid RTSPAudioStreamer and port number.
31+
* - Call begin() to start the server and listen for clients.
32+
* - Optionally set a session path callback for custom session handling.
33+
*
34+
* Inherits all protocol, session, and connection logic from RTSPServerBase.
35+
* Only task scheduling and concurrency logic is implemented here.
36+
* @tparam Platform Target hardware platform (e.g., Arduino, ESP32)
37+
* @ingroup rtsp
38+
*/
2239
template <typename Platform>
2340
class RTSPServer : public RTSPServerBase<Platform> {
2441
public:

src/AudioTools/Communication/RTSP/RTSPServerBase.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ namespace audio_tools {
2020
*
2121
* This class contains all protocol, session, and connection logic, but no task/timer code.
2222
* Derived classes implement scheduling: either with tasks (RTSPServer) or manual loop (RTSPServerTaskless).
23+
*
24+
* @tparam Platform Target hardware platform (e.g., Arduino, ESP32)
25+
*
26+
* @ingroup rtsp
2327
*/
2428
template <typename Platform>
2529
class RTSPServerBase {

src/AudioTools/Communication/RTSP/RTSPServerTaskless.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,9 @@ namespace audio_tools {
3636
* - Inherits all configuration and session management from RTSPServerBase
3737
* - Designed for maximum control and minimal resource usage
3838
*
39-
* Usage Example:
40-
* RTSPAudioStreamerBase<Platform> streamer(...);
41-
* RTSPServerTaskless<Platform> server(streamer, 8554);
42-
* server.begin();
43-
* // In your main loop:
44-
* void loop() {
45-
* server.doLoop();
46-
* }
47-
*
4839
* @tparam Platform Target hardware platform (e.g., Arduino, ESP32)
40+
*
41+
* @ingroup rtsp
4942
*/
5043
template <typename Platform>
5144
class RTSPServerTaskless : public RTSPServerBase<Platform> {

0 commit comments

Comments
 (0)