選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

42 行
1.6KB

  1. #ifndef _rtsp_demuxer_h_
  2. #define _rtsp_demuxer_h_
  3. #include <stdint.h>
  4. #include "avpacket.h" // https://github.com/ireader/avcodec #avcodec/include
  5. #if defined(__cplusplus)
  6. extern "C" {
  7. #endif
  8. struct rtsp_demuxer_t;
  9. /// @param[in] pkt rtp packet flags, RTP_PAYLOAD_FLAG_PACKET_xxx, see more @rtp-payload.h
  10. typedef int (*rtsp_demuxer_onpacket)(void* param, struct avpacket_t* pkt);
  11. /// @param[in] stream user defined stream id, copy to rtsp_demuxer_onpacket pkt->stream->stream
  12. /// @param[in] jitter rtp reorder jitter(ms), e.g. 200(ms)
  13. struct rtsp_demuxer_t* rtsp_demuxer_create(int stream, int jitter, rtsp_demuxer_onpacket onpkt, void* param);
  14. int rtsp_demuxer_destroy(struct rtsp_demuxer_t* demuxer);
  15. /// @param[in] frequency audio/video sample rate, e.g. video 90000, audio 48000
  16. /// @param[in] payload rtp payload id, see more @rtp-profile.h
  17. /// @param[in] encoding rtp payload encoding, see more @rtp-profile.h
  18. /// @param[in] fmtp rtp payload format parameter, sdp a=fmtp
  19. /// @return 0-ok, other-error
  20. int rtsp_demuxer_add_payload(struct rtsp_demuxer_t* demuxer, int frequency, int payload, const char* encoding, const char* fmtp);
  21. /// Set RTP-Info
  22. int rtsp_demuxer_rtpinfo(struct rtsp_demuxer_t* demuxer, uint16_t seq, uint32_t timestamp);
  23. /// @return 0-ok, >0-rtcp message type, <0-error
  24. int rtsp_demuxer_input(struct rtsp_demuxer_t* demuxer, const void* data, int bytes);
  25. /// Get RTCP packet
  26. /// @return >0-rtcp report length, 0-don't need send rtcp
  27. int rtsp_demuxer_rtcp(struct rtsp_demuxer_t* demuxer, void* buf, int len);
  28. #if defined(__cplusplus)
  29. }
  30. #endif
  31. #endif /* _rtsp_demuxer_h_ */