您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

rtsp-header-rtp-info.h 984B

6 个月前
1234567891011121314151617181920212223242526272829
  1. #ifndef _rtsp_header_rtp_info_h_
  2. #define _rtsp_header_rtp_info_h_
  3. #include <stdint.h>
  4. struct rtsp_header_rtp_info_t
  5. {
  6. char url[256];
  7. uint64_t seq;
  8. uint64_t rtptime;
  9. };
  10. /// parse RTSP RTP-Info header
  11. /// @return 0-ok, other-error
  12. /// usage 1:
  13. /// struct rtsp_header_rtp_info_t rtpinfo;
  14. /// const char* header = "RTP-Info: url=rtsp://foo.com/bar.avi/streamid=0;seq=45102";
  15. /// r = rtsp_header_rtp_info("url=rtsp://foo.com/bar.avi/streamid=0;seq=45102", &rtpinfo);
  16. /// check(r)
  17. ///
  18. /// usage 2:
  19. /// const char* header = "RTP-Info: url=rtsp://foo.com/bar.avi/streamid=0;seq=45102,url=rtsp://foo.com/bar.avi/streamid=1;seq=30211";
  20. /// split(header, ',');
  21. /// r1 = rtsp_header_rtp_info("url=rtsp://foo.com/bar.avi/streamid=0;seq=45102", &rtpinfo);
  22. /// r2 = rtsp_header_rtp_info("url=rtsp://foo.com/bar.avi/streamid=1;seq=30211", &rtpinfo);
  23. /// check(r1, r2)
  24. int rtsp_header_rtp_info(const char* field, struct rtsp_header_rtp_info_t* rtpinfo);
  25. #endif /* !_rtsp_header_rtp_info_h_ */