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.

10 月之前
1234567891011121314151617181920212223242526
  1. #ifndef _rtp_udp_transport_h_
  2. #define _rtp_udp_transport_h_
  3. #include "sys/sock.h"
  4. #include "media/media-source.h"
  5. class RTPUdpTransport : public IRTPTransport
  6. {
  7. public:
  8. RTPUdpTransport();
  9. virtual ~RTPUdpTransport();
  10. public:
  11. virtual int Send(bool rtcp, const void* data, size_t bytes);
  12. public:
  13. int Init(const char* ip, unsigned short port[2]);
  14. int Init(socket_t socket[2], const char* peer, unsigned short port[2]);
  15. private:
  16. socket_t m_socket[2];
  17. socklen_t m_addrlen[2];
  18. struct sockaddr_storage m_addr[2];
  19. };
  20. #endif /* !_rtp_udp_transport_h_ */