rtcp: Remove unnecessary function set_rtcp_interval()
This commit is contained in:
parent
8f10e220ad
commit
eda7c35f2b
|
@ -231,18 +231,12 @@ namespace uvgrtp {
|
||||||
/* Update various session statistics */
|
/* Update various session statistics */
|
||||||
void update_session_statistics(const uvgrtp::frame::rtp_frame *frame);
|
void update_session_statistics(const uvgrtp::frame::rtp_frame *frame);
|
||||||
|
|
||||||
/* Getter for interval_ms_, which is calculated by set_session_bandwidth */
|
/* Getter for interval_ms_, which is calculated by set_session_bandwidth
|
||||||
|
* Be aware that this interval is frequently re-calculated in rtcp_runner() */
|
||||||
uint32_t get_rtcp_interval_ms() const;
|
uint32_t get_rtcp_interval_ms() const;
|
||||||
|
|
||||||
/* Set RTCP packet transmission interval in milliseconds
|
|
||||||
*
|
|
||||||
* Return RTP_OK if interval was set successfully
|
|
||||||
* Return RTP_INVALID_VALUE if new interval is invalid */
|
|
||||||
rtp_error_t set_rtcp_interval_ms(int32_t new_interval);
|
|
||||||
|
|
||||||
/* Set total bandwidth for this session, called at the start
|
/* Set total bandwidth for this session, called at the start
|
||||||
* If you want to set the interval manually later, use
|
* This affects the RTCP packet transmission interval */
|
||||||
* set_rtcp_interval_ms() function */
|
|
||||||
void set_session_bandwidth(uint32_t kbps);
|
void set_session_bandwidth(uint32_t kbps);
|
||||||
|
|
||||||
std::shared_ptr<uvgrtp::socket> get_socket() const;
|
std::shared_ptr<uvgrtp::socket> get_socket() const;
|
||||||
|
|
14
src/rtcp.cc
14
src/rtcp.cc
|
@ -333,8 +333,6 @@ void uvgrtp::rtcp::rtcp_runner(rtcp* rtcp)
|
||||||
true, (double)rtcp->avg_rtcp_size_, true, true);
|
true, (double)rtcp->avg_rtcp_size_, true, true);
|
||||||
current_interval_ms = (uint32_t)round(1000 * interval_s);
|
current_interval_ms = (uint32_t)round(1000 * interval_s);
|
||||||
|
|
||||||
rtcp->set_rtcp_interval_ms(current_interval_ms);
|
|
||||||
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(current_interval_ms));
|
std::this_thread::sleep_for(std::chrono::milliseconds(current_interval_ms));
|
||||||
}
|
}
|
||||||
UVG_LOG_DEBUG("Exited RTCP loop");
|
UVG_LOG_DEBUG("Exited RTCP loop");
|
||||||
|
@ -1980,18 +1978,6 @@ rtp_error_t uvgrtp::rtcp::set_network_addresses(std::string local_addr, std::str
|
||||||
return RTP_OK;
|
return RTP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtp_error_t uvgrtp::rtcp::set_rtcp_interval_ms(int32_t new_interval) {
|
|
||||||
if (new_interval < 0) {
|
|
||||||
UVG_LOG_WARN("Interval cannot be negative");
|
|
||||||
return RTP_INVALID_VALUE;
|
|
||||||
}
|
|
||||||
interval_ms_ = new_interval;
|
|
||||||
|
|
||||||
|
|
||||||
return RTP_OK;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<uvgrtp::socket> uvgrtp::rtcp::get_socket() const{
|
std::shared_ptr<uvgrtp::socket> uvgrtp::rtcp::get_socket() const{
|
||||||
return rtcp_socket_;
|
return rtcp_socket_;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue