Skip to content
Prev Previous commit
Next Next commit
USE_RTSP_LOGIN
  • Loading branch information
pschatzmann committed Sep 23, 2025
commit e01d7bb0f1637633fcd3d88cd8a81b890c549cf5
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "AudioTools.h"
#include "AudioTools/AudioLibs/AudioBoardStream.h"
#define USE_RTSP_LOGIN // activate RTSP login support
#include "AudioTools/Communication/RTSP.h"

int port = 554;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
#include "AudioTools.h"
#include "AudioTools/AudioCodecs/CodecG7xx.h" // https://github.com/pschatzmann/arduino-libg7xx.git
#define USE_RTSP_LOGIN // activate RTSP login support
#include "AudioTools/Communication/RTSP.h"

int port = 554;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

#include "AudioTools.h"
#define USE_RTSP_LOGIN // activate RTSP login support
#include "AudioTools/Communication/RTSP.h"

int port = 554;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

#include "AudioTools.h"
#include "AudioTools/Disk/AudioSourceSDMMC.h"
#include "AudioTools/Communication/RTSP.h"
#include "AudioTools/AudioCodecs/MP3Parser.h"
#define USE_RTSP_LOGIN // activate RTSP login support
#include "AudioTools/Communication/RTSP.h"

int port = 554;
const char* wifi = "SSID";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "AudioTools/Disk/AudioSourceSDMMC.h"
#include "AudioTools/AudioCodecs/CodecMP3Helix.h"
#include "AudioTools/AudioCodecs/CodecADPCM.h"
#define USE_RTSP_LOGIN // activate RTSP login support
#include "AudioTools/Communication/RTSP.h"

int port = 554;
Expand Down
11 changes: 6 additions & 5 deletions src/AudioTools/Communication/RTSP/RTSPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ class RTSPServer {
onSessionPathRef = ref;
}

/**
#if defined(USE_RTSP_LOGIN)

/**
* @brief Initialize WiFi and start RTSP server
*
* Convenience method that connects to a WiFi network and then starts the RTSP
Expand All @@ -112,16 +114,13 @@ class RTSPServer {
* @see runAsync()
*/
bool begin(const char* ssid, const char* password) {
#ifdef ESP32
// Start Wifi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}

esp_wifi_set_ps(WIFI_PS_NONE);
#endif
WiFi.setSleep(WIFI_PS_NONE);

Serial.println();
Serial.print("connect to rtsp://");
Expand All @@ -131,6 +130,8 @@ class RTSPServer {
Serial.println();
return begin();
}

#endif

/** Start the RTSP server */
bool begin() {
Expand Down