72a2d714ab
- 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
31 lines
886 B
C
31 lines
886 B
C
#include "driver/i2c_master.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "freertos/event_groups.h"
|
|
#include <string.h>
|
|
#include "sdkconfig.h"
|
|
#include <esp_log.h>
|
|
#include <esp_system.h>
|
|
#include "esp_http_server.h"
|
|
#include "cam_auth.h"
|
|
|
|
// support IDF 5.x
|
|
#ifndef portTICK_RATE_MS
|
|
#define portTICK_RATE_MS portTICK_PERIOD_MS
|
|
#endif
|
|
|
|
#define BOARD_WAVESHARE_ESP32S3 1
|
|
|
|
esp_err_t audio_ws_handler(httpd_req_t *req);
|
|
esp_err_t stream_handler(httpd_req_t *req);
|
|
esp_err_t capture_handler(httpd_req_t *req);
|
|
|
|
esp_err_t init_camera(void);
|
|
esp_err_t audio_init(i2c_master_bus_handle_t bus);
|
|
void mic_task(void *arg);
|
|
void start_wifi_and_server(void);
|
|
void start_audio_server(void);
|
|
void start_camera_server(void);
|
|
void wifi_start_provisioning_if_needed(void);
|
|
bool wifi_wait_connected(uint32_t timeout_ms);
|
|
void rtsp_speaker_sink(const int16_t *pcm, size_t samples); |