ipv6: remove clutter from media_stream api
This commit is contained in:
parent
a533b82e4c
commit
0d9e3beed6
|
@ -352,8 +352,6 @@ namespace uvgrtp {
|
|||
*/
|
||||
uint32_t get_ssrc() const;
|
||||
|
||||
bool get_ipv6() const;
|
||||
|
||||
private:
|
||||
/* Initialize the connection by initializing the socket
|
||||
* and binding ourselves to specified interface and creating
|
||||
|
|
|
@ -230,8 +230,6 @@ namespace uvgrtp {
|
|||
/* Getter for interval_ms_, which is calculated by set_session_bandwidth */
|
||||
uint32_t get_rtcp_interval_ms() const;
|
||||
|
||||
void set_ipv6(bool set);
|
||||
|
||||
/* Set RTCP packet transmission interval in milliseconds
|
||||
*
|
||||
* Return RTP_OK if interval was set successfully
|
||||
|
@ -253,7 +251,7 @@ namespace uvgrtp {
|
|||
* These are used when adding new participants and creating sockets for them */
|
||||
|
||||
rtp_error_t set_network_addresses(std::string local_addr, std::string remote_addr,
|
||||
uint16_t local_port, uint16_t dst_port);
|
||||
uint16_t local_port, uint16_t dst_port, bool ipv6);
|
||||
|
||||
/* Return SSRCs of all participants */
|
||||
std::vector<uint32_t> get_participants() const;
|
||||
|
|
|
@ -306,9 +306,6 @@ rtp_error_t uvgrtp::media_stream::init()
|
|||
|
||||
rtp_ = std::shared_ptr<uvgrtp::rtp> (new uvgrtp::rtp(fmt_, ssrc_));
|
||||
rtcp_ = std::shared_ptr<uvgrtp::rtcp> (new uvgrtp::rtcp(rtp_, ssrc_, cname_, rce_flags_));
|
||||
if (ipv6_) {
|
||||
rtcp_->set_ipv6(true);
|
||||
}
|
||||
|
||||
socket_->install_handler(rtcp_.get(), rtcp_->send_packet_handler_vec);
|
||||
|
||||
|
@ -364,9 +361,7 @@ rtp_error_t uvgrtp::media_stream::init(std::shared_ptr<uvgrtp::zrtp> zrtp)
|
|||
zrtp->dh_has_finished(); // only after the DH stream has gotten its keys, do we let non-DH stream perform ZRTP
|
||||
|
||||
rtcp_ = std::shared_ptr<uvgrtp::rtcp> (new uvgrtp::rtcp(rtp_, ssrc_, cname_, srtcp_, rce_flags_));
|
||||
if (ipv6_) {
|
||||
rtcp_->set_ipv6(true);
|
||||
}
|
||||
|
||||
socket_->install_handler(rtcp_.get(), rtcp_->send_packet_handler_vec);
|
||||
socket_->install_handler(srtp_.get(), srtp_->send_packet_handler);
|
||||
|
||||
|
@ -446,7 +441,7 @@ rtp_error_t uvgrtp::media_stream::start_components()
|
|||
}
|
||||
else
|
||||
{
|
||||
rtcp_->set_network_addresses(local_address_, remote_address_, src_port_ + 1, dst_port_ + 1);
|
||||
rtcp_->set_network_addresses(local_address_, remote_address_, src_port_ + 1, dst_port_ + 1, ipv6_);
|
||||
rtcp_->add_initial_participant(rtp_->get_clock_rate());
|
||||
bandwidth_ = get_default_bandwidth_kbps(fmt_);
|
||||
rtcp_->set_session_bandwidth(bandwidth_);
|
||||
|
@ -804,10 +799,6 @@ uint32_t uvgrtp::media_stream::get_ssrc() const
|
|||
return *ssrc_.get();
|
||||
}
|
||||
|
||||
bool uvgrtp::media_stream::get_ipv6() const {
|
||||
return ipv6_;
|
||||
}
|
||||
|
||||
rtp_error_t uvgrtp::media_stream::init_srtp_with_zrtp(int rce_flags, int type, std::shared_ptr<uvgrtp::base_srtp> srtp,
|
||||
std::shared_ptr<uvgrtp::zrtp> zrtp)
|
||||
{
|
||||
|
|
|
@ -2036,17 +2036,14 @@ uint32_t uvgrtp::rtcp::get_rtcp_interval_ms() const
|
|||
return interval_ms_.load();
|
||||
}
|
||||
|
||||
void uvgrtp::rtcp::set_ipv6(bool set) {
|
||||
ipv6_ = set;
|
||||
}
|
||||
|
||||
rtp_error_t uvgrtp::rtcp::set_network_addresses(std::string local_addr, std::string remote_addr,
|
||||
uint16_t local_port, uint16_t dst_port)
|
||||
uint16_t local_port, uint16_t dst_port, bool ipv6)
|
||||
{
|
||||
local_addr_ = local_addr;
|
||||
remote_addr_ = remote_addr;
|
||||
local_port_ = local_port;
|
||||
dst_port_ = dst_port;
|
||||
ipv6_ = ipv6;
|
||||
|
||||
return RTP_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue