Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

49 Zeilen
2.0KB

  1. #ifndef _rtsp_muxer_h_
  2. #define _rtsp_muxer_h_
  3. #include <stdint.h>
  4. #if defined(__cplusplus)
  5. extern "C" {
  6. #endif
  7. struct rtsp_muxer_t;
  8. /// @param[in] flags 0x0100-packet lost, 0x0200-packet corrupt
  9. /// @return 0-ok, other-error
  10. typedef int (*rtsp_muxer_onpacket)(void* param, int pid, const void* data, int bytes, uint32_t timestamp, int flags);
  11. struct rtsp_muxer_t* rtsp_muxer_create(rtsp_muxer_onpacket onpacket, void* param);
  12. int rtsp_muxer_destroy(struct rtsp_muxer_t* muxer);
  13. /// @param[in] proto RTP/AVP, see more @librtsp/include/sdp-options.h
  14. /// @param[in] payload rtp payload id, e.g. RTP_PAYLOAD_MP2P, see more @librtp/include/rtp-profile.h
  15. /// @param[in] encoding rtp payload encoding(for payload > 96 only)
  16. /// @return >=0-paylad index, <0-error
  17. int rtsp_muxer_add_payload(struct rtsp_muxer_t* muxer, const char* proto, int frequence, int payload, const char* encoding, uint16_t seq, uint32_t ssrc, uint16_t port, const void* extra, int size);
  18. /// @param[in] pid payload index, create by rtsp_muxer_add_payload
  19. /// @param[in] codec rtp media codec id, e.g. RTP_PAYLOAD_H264, see more @librtp/include/rtp-profile.h
  20. /// @return >=0-media index (for rtsp_muxer_input), <0-error
  21. int rtsp_muxer_add_media(struct rtsp_muxer_t* muxer, int pid, int codec, const void* extra, int size);
  22. /// Get RTP-Info
  23. /// @return 0-ok, <0-error
  24. int rtsp_muxer_getinfo(struct rtsp_muxer_t* muxer, int pid, uint16_t* seq, uint32_t* timestamp, const char** sdp, int *size);
  25. /// @param[in] mid media index, create by rtsp_muxer_add_media
  26. /// @return 0-ok, >0-rtcp message type, <0-error
  27. int rtsp_muxer_input(struct rtsp_muxer_t* muxer, int mid, int64_t pts, int64_t dts, const void* data, int bytes, int flags);
  28. /// Get RTCP packet
  29. /// @return >0-rtcp report length, 0-don't need send rtcp
  30. int rtsp_muxer_rtcp(struct rtsp_muxer_t* muxer, int pid, void* buf, int len);
  31. /// Input RTCP packet
  32. int rtsp_muxer_onrtcp(struct rtsp_muxer_t* muxer, int pid, const void* buf, int len);
  33. #if defined(__cplusplus)
  34. }
  35. #endif
  36. #endif /* !_rtsp_muxer_h_ */