You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1KB

  1. #ifndef _rtmp_control_message_h_
  2. #define _rtmp_control_message_h_
  3. #include <stdint.h>
  4. #include <stddef.h>
  5. enum
  6. {
  7. // 5.4.1. Set Chunk Size (1) (p19)
  8. // The maximum chunk size defaults to 128 bytes
  9. RTMP_CHUNK_SIZE = 128,
  10. };
  11. /// 5.4.1. Set Chunk Size (1)
  12. /// @return 0-error, >0-ok
  13. int rtmp_set_chunk_size(uint8_t* out, size_t size, uint32_t chunkSize);
  14. /// 5.4.2. Abort Message (2)
  15. /// @return 0-error, >0-ok
  16. int rtmp_abort_message(uint8_t* out, size_t size, uint32_t chunkStreamId);
  17. /// 5.4.3. Acknowledgement (3)
  18. /// @return 0-error, >0-ok
  19. int rtmp_acknowledgement(uint8_t* out, size_t size, uint32_t sequenceNumber);
  20. /// 5.4.4. Window Acknowledgement Size (5)
  21. /// @return 0-error, >0-ok
  22. int rtmp_window_acknowledgement_size(uint8_t* out, size_t size, uint32_t windowSize);
  23. enum
  24. {
  25. RTMP_BANDWIDTH_LIMIT_HARD = 0,
  26. RTMP_BANDWIDTH_LIMIT_SOFT = 1,
  27. RTMP_BANDWIDTH_LIMIT_DYNAMIC = 2,
  28. };
  29. /// 5.4.5. Set Peer Bandwidth (6)
  30. /// @return 0-error, >0-ok
  31. int rtmp_set_peer_bandwidth(uint8_t* out, size_t size, uint32_t windowSize, uint8_t limitType);
  32. #endif /* !_rtmp_control_message_h_ */