Add : RTSP audio/video with back channel, and auth
- cam_stream: shared JPEG feed for /pic, /stream and RTSP; RTSP server (port 554, TCP) with MJPEG video, G.711 mic audio and an ONVIF-style back channel to the speaker - cam_auth: RTSP Digest login and HTTP Basic / ?key= check on all endpoints - Mic task feeds HTTP and RTSP with a sticky channel choice
This commit is contained in:
+8
-2
@@ -1,6 +1,10 @@
|
||||
#include "driver/i2c_master.h"
|
||||
#include "board.h"
|
||||
#include "esp32_s3_cam_ovxxxx.h"
|
||||
#include "cam_stream.h"
|
||||
|
||||
#define CAM_USER "admin"
|
||||
#define CAM_PASS "ChangeThis123"
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
@@ -15,17 +19,19 @@ void app_main(void)
|
||||
#endif
|
||||
|
||||
ESP_ERROR_CHECK(audio_init(bsp_i2c_get_handle()));
|
||||
|
||||
ESP_ERROR_CHECK(cam_feed_start());
|
||||
wifi_start_provisioning_if_needed(); // station mode, or the captive portal if no credentials
|
||||
|
||||
while (!wifi_wait_connected(5000)) {
|
||||
ESP_LOGI("Main", "Waiting for Wi-Fi (or setup portal)...");
|
||||
}
|
||||
|
||||
cam_auth_init(CAM_USER, CAM_PASS);
|
||||
start_camera_server(); // port 80: /pic, /stream
|
||||
xTaskCreate(mic_task, "mic", 6144, NULL, 5, NULL);
|
||||
start_audio_server(); // ports 81 and 82: /mic, /spk, /vol
|
||||
|
||||
rtsp_set_speaker_sink(rtsp_speaker_sink);
|
||||
rtsp_server_start();
|
||||
while (1) vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user