rtsp_fairplay.h 693 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <stddef.h>
  3. #include <stdint.h>
  4. /**
  5. * FairPlay handshake handling for AirPlay 2
  6. * Contains pre-computed static response tables
  7. */
  8. #define FP_REPLY_SIZE 142
  9. #define FP_HEADER_SIZE 12
  10. #define FP_SETUP2_SUFFIX_LEN 20
  11. /**
  12. * Handle FairPlay setup request
  13. * @param body Request body from POST /fp-setup
  14. * @param body_len Length of request body
  15. * @param response Output buffer for response (caller must free if *response !=
  16. * NULL)
  17. * @param response_len Output: length of response
  18. * @return 0 on success, -1 on error
  19. */
  20. int rtsp_fairplay_handle(const uint8_t *body, size_t body_len,
  21. uint8_t **response, size_t *response_len);