rtsp_server.h 881 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "esp_err.h"
  3. #include <stdint.h>
  4. /**
  5. * Start the AirPlay RTSP server on port 7000
  6. * Handles initial connection requests from iOS devices
  7. */
  8. esp_err_t rtsp_server_start(void);
  9. /**
  10. * Stop the RTSP server
  11. */
  12. void rtsp_server_stop(void);
  13. /**
  14. * Set volume from AirPlay (in dB, range -144 to 0)
  15. * @param volume_db Volume in dB (0 = max, -144 = mute)
  16. */
  17. void airplay_set_volume(float volume_db);
  18. /**
  19. * Get current volume as Q15 scale factor for audio processing
  20. * @return Q15 fixed-point multiplier (0 = mute, 32768 = unity)
  21. */
  22. int32_t airplay_get_volume_q15(void);
  23. /**
  24. * Request resume during the AirPlay v1 grace period.
  25. * Called from the play/pause button when the source is still AirPlay
  26. * but the RTSP connection has been torn down (paused). Sends a DACP
  27. * playpause to the phone so it reconnects.
  28. */
  29. void rtsp_server_request_resume(void);