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.

49 lines
1.6KB

  1. #ifndef _rtmp_event_h_
  2. #define _rtmp_event_h_
  3. // 7.1.3. Shared Object Message (19, 16) (p24)
  4. // AMF Shared Object Message Event
  5. enum
  6. {
  7. RTMP_AMF_EVENT_USE = 1,
  8. RTMP_AMF_EVENT_RELEASE = 2,
  9. RTMP_AMF_EVENT_REQUEST_CHANGE = 3,
  10. RTMP_AMF_EVENT_CHANGE = 4,
  11. RTMP_AMF_EVENT_SUCCESS = 5,
  12. RTMP_AMF_EVENT_SEND_MESSAGE = 6,
  13. RTMP_AMF_EVENT_STATUS = 7,
  14. RTMP_AMF_EVENT_CLEAR = 8,
  15. RTMP_AMF_EVENT_REMOVE = 9,
  16. RTMP_AMF_EVENT_REQUEST_REMOVE = 10,
  17. RTMP_AMF_EVENT_USE_SUCCESS = 11,
  18. };
  19. // 7.1.7. User Control Message Events (p27)
  20. enum
  21. {
  22. RTMP_EVENT_STREAM_BEGIN = 0,
  23. RTMP_EVENT_STREAM_EOF = 1,
  24. RTMP_EVENT_STREAM_DRY = 2,
  25. RTMP_EVENT_SET_BUFFER_LENGTH = 3,
  26. RTMP_EVENT_STREAM_IS_RECORD = 4,
  27. RTMP_EVENT_PING = 6, // RTMP_EVENT_PING_REQUEST
  28. RTMP_EVENT_PONG = 7, // RTMP_EVENT_PING_RESPONSE
  29. // https://www.gnu.org/software/gnash/manual/doxygen/namespacegnash_1_1rtmp.html
  30. RTMP_EVENT_REQUEST_VERIFY = 0x1a,
  31. RTMP_EVENT_RESPOND_VERIFY = 0x1b,
  32. RTMP_EVENT_BUFFER_EMPTY = 0x1f,
  33. RTMP_EVENT_BUFFER_READY = 0x20,
  34. };
  35. int rtmp_event_stream_begin(uint8_t* data, size_t bytes, uint32_t streamId);
  36. int rtmp_event_stream_eof(uint8_t* data, size_t bytes, uint32_t streamId);
  37. int rtmp_event_stream_dry(uint8_t* data, size_t bytes, uint32_t streamId);
  38. int rtmp_event_set_buffer_length(uint8_t* data, size_t bytes, uint32_t streamId, uint32_t ms);
  39. int rtmp_event_stream_is_record(uint8_t* data, size_t bytes, uint32_t streamId);
  40. int rtmp_event_ping(uint8_t* data, size_t bytes, uint32_t timstamp);
  41. int rtmp_event_pong(uint8_t* data, size_t bytes, uint32_t timstamp);
  42. #endif /* !_rtmp_event_h_ */