Remove RtpRtcp::RemoteRTCPStat(RTCPSenderInfo*) as unused
BUG=webrtc:5565 Review-Url: https://codereview.webrtc.org/2986543002 Cr-Commit-Position: refs/heads/master@{#19128}
This commit is contained in:
@ -326,10 +326,6 @@ class RtpRtcp : public Module {
|
||||
uint32_t ssrc,
|
||||
struct RtpPacketLossStats* loss_stats) const = 0;
|
||||
|
||||
// Returns received RTCP sender info.
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t RemoteRTCPStat(RTCPSenderInfo* sender_info) = 0;
|
||||
|
||||
// Returns received RTCP report block.
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t RemoteRTCPStat(
|
||||
|
||||
@ -130,14 +130,6 @@ enum RtxMode {
|
||||
|
||||
const size_t kRtxHeaderSize = 2;
|
||||
|
||||
struct RTCPSenderInfo {
|
||||
uint32_t NTPseconds;
|
||||
uint32_t NTPfraction;
|
||||
uint32_t RTPtimeStamp;
|
||||
uint32_t sendPacketCount;
|
||||
uint32_t sendOctetCount;
|
||||
};
|
||||
|
||||
struct RTCPReportBlock {
|
||||
RTCPReportBlock()
|
||||
: remoteSSRC(0), sourceSSRC(0), fractionLost(0), cumulativeLost(0),
|
||||
|
||||
@ -147,7 +147,6 @@ class MockRtpRtcp : public RtpRtcp {
|
||||
void(StreamDataCounters*, StreamDataCounters*));
|
||||
MOCK_CONST_METHOD3(GetRtpPacketLossStats,
|
||||
void(bool, uint32_t, struct RtpPacketLossStats*));
|
||||
MOCK_METHOD1(RemoteRTCPStat, int32_t(RTCPSenderInfo* sender_info));
|
||||
MOCK_CONST_METHOD1(RemoteRTCPStat,
|
||||
int32_t(std::vector<RTCPReportBlock>* receive_blocks));
|
||||
MOCK_METHOD4(SetRTCPApplicationSpecificData,
|
||||
|
||||
@ -119,6 +119,7 @@ RTCPReceiver::RTCPReceiver(
|
||||
bitrate_allocation_observer_(bitrate_allocation_observer),
|
||||
main_ssrc_(0),
|
||||
remote_ssrc_(0),
|
||||
remote_sender_rtp_time_(0),
|
||||
xr_rrtr_status_(false),
|
||||
xr_rr_rtt_ms_(0),
|
||||
oldest_tmmbr_info_ms_(0),
|
||||
@ -129,7 +130,6 @@ RTCPReceiver::RTCPReceiver(
|
||||
num_skipped_packets_(0),
|
||||
last_skipped_packets_warning_ms_(clock->TimeInMilliseconds()) {
|
||||
RTC_DCHECK(owner);
|
||||
memset(&remote_sender_info_, 0, sizeof(remote_sender_info_));
|
||||
}
|
||||
|
||||
RTCPReceiver::~RTCPReceiver() {}
|
||||
@ -155,7 +155,6 @@ int64_t RTCPReceiver::LastReceivedReceiverReport() const {
|
||||
void RTCPReceiver::SetRemoteSSRC(uint32_t ssrc) {
|
||||
rtc::CritScope lock(&rtcp_receiver_lock_);
|
||||
// New SSRC reset old reports.
|
||||
memset(&remote_sender_info_, 0, sizeof(remote_sender_info_));
|
||||
last_received_sr_ntp_.Reset();
|
||||
remote_ssrc_ = ssrc;
|
||||
}
|
||||
@ -234,13 +233,13 @@ bool RTCPReceiver::NTP(uint32_t* received_ntp_secs,
|
||||
|
||||
// NTP from incoming SenderReport.
|
||||
if (received_ntp_secs)
|
||||
*received_ntp_secs = remote_sender_info_.NTPseconds;
|
||||
*received_ntp_secs = remote_sender_ntp_time_.seconds();
|
||||
if (received_ntp_frac)
|
||||
*received_ntp_frac = remote_sender_info_.NTPfraction;
|
||||
*received_ntp_frac = remote_sender_ntp_time_.fractions();
|
||||
|
||||
// Rtp time from incoming SenderReport.
|
||||
if (rtcp_timestamp)
|
||||
*rtcp_timestamp = remote_sender_info_.RTPtimeStamp;
|
||||
*rtcp_timestamp = remote_sender_rtp_time_;
|
||||
|
||||
// Local NTP time when we received a RTCP packet with a send block.
|
||||
if (rtcp_arrival_time_secs)
|
||||
@ -269,16 +268,6 @@ bool RTCPReceiver::LastReceivedXrReferenceTimeInfo(
|
||||
return true;
|
||||
}
|
||||
|
||||
int32_t RTCPReceiver::SenderInfoReceived(RTCPSenderInfo* sender_info) const {
|
||||
RTC_DCHECK(sender_info);
|
||||
rtc::CritScope lock(&rtcp_receiver_lock_);
|
||||
if (!last_received_sr_ntp_.Valid())
|
||||
return -1;
|
||||
|
||||
memcpy(sender_info, &remote_sender_info_, sizeof(RTCPSenderInfo));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// We can get multiple receive reports when we receive the report from a CE.
|
||||
int32_t RTCPReceiver::StatisticsReceived(
|
||||
std::vector<RTCPReportBlock>* receive_blocks) const {
|
||||
@ -413,13 +402,8 @@ void RTCPReceiver::HandleSenderReport(const CommonHeader& rtcp_block,
|
||||
// Only signal that we have received a SR when we accept one.
|
||||
packet_information->packet_type_flags |= kRtcpSr;
|
||||
|
||||
// Save the NTP time of this report.
|
||||
remote_sender_info_.NTPseconds = sender_report.ntp().seconds();
|
||||
remote_sender_info_.NTPfraction = sender_report.ntp().fractions();
|
||||
remote_sender_info_.RTPtimeStamp = sender_report.rtp_timestamp();
|
||||
remote_sender_info_.sendPacketCount = sender_report.sender_packet_count();
|
||||
remote_sender_info_.sendOctetCount = sender_report.sender_octet_count();
|
||||
|
||||
remote_sender_ntp_time_ = sender_report.ntp();
|
||||
remote_sender_rtp_time_ = sender_report.rtp_timestamp();
|
||||
last_received_sr_ntp_ = clock_->CurrentNtpTime();
|
||||
} else {
|
||||
// We will only store the send report from one source, but
|
||||
|
||||
@ -86,8 +86,6 @@ class RTCPReceiver {
|
||||
int64_t* min_rtt_ms,
|
||||
int64_t* max_rtt_ms) const;
|
||||
|
||||
int32_t SenderInfoReceived(RTCPSenderInfo* sender_info) const;
|
||||
|
||||
void SetRtcpXrRrtrStatus(bool enable);
|
||||
bool GetAndResetXrRrRtt(int64_t* rtt_ms);
|
||||
|
||||
@ -222,9 +220,10 @@ class RTCPReceiver {
|
||||
std::set<uint32_t> registered_ssrcs_ GUARDED_BY(rtcp_receiver_lock_);
|
||||
|
||||
// Received sender report.
|
||||
RTCPSenderInfo remote_sender_info_;
|
||||
NtpTime remote_sender_ntp_time_ GUARDED_BY(rtcp_receiver_lock_);
|
||||
uint32_t remote_sender_rtp_time_ GUARDED_BY(rtcp_receiver_lock_);
|
||||
// When did we receive the last send report.
|
||||
NtpTime last_received_sr_ntp_;
|
||||
NtpTime last_received_sr_ntp_ GUARDED_BY(rtcp_receiver_lock_);
|
||||
|
||||
// Received XR receive time report.
|
||||
rtcp::ReceiveTimeInfo remote_time_info_;
|
||||
|
||||
@ -174,8 +174,7 @@ TEST_F(RtcpReceiverTest, InvalidFeedbackPacketIsIgnored) {
|
||||
}
|
||||
|
||||
TEST_F(RtcpReceiverTest, InjectSrPacket) {
|
||||
RTCPSenderInfo info;
|
||||
EXPECT_EQ(-1, rtcp_receiver_.SenderInfoReceived(&info));
|
||||
EXPECT_FALSE(rtcp_receiver_.NTP(nullptr, nullptr, nullptr, nullptr, nullptr));
|
||||
|
||||
int64_t now = system_clock_.TimeInMilliseconds();
|
||||
rtcp::SenderReport sr;
|
||||
@ -186,7 +185,7 @@ TEST_F(RtcpReceiverTest, InjectSrPacket) {
|
||||
OnReceivedRtcpReceiverReport(IsEmpty(), _, now));
|
||||
InjectRtcpPacket(sr);
|
||||
|
||||
EXPECT_EQ(0, rtcp_receiver_.SenderInfoReceived(&info));
|
||||
EXPECT_TRUE(rtcp_receiver_.NTP(nullptr, nullptr, nullptr, nullptr, nullptr));
|
||||
}
|
||||
|
||||
TEST_F(RtcpReceiverTest, InjectSrPacketFromUnknownSender) {
|
||||
@ -201,8 +200,7 @@ TEST_F(RtcpReceiverTest, InjectSrPacketFromUnknownSender) {
|
||||
InjectRtcpPacket(sr);
|
||||
|
||||
// But will not flag that he's gotten sender information.
|
||||
RTCPSenderInfo info;
|
||||
EXPECT_EQ(-1, rtcp_receiver_.SenderInfoReceived(&info));
|
||||
EXPECT_FALSE(rtcp_receiver_.NTP(nullptr, nullptr, nullptr, nullptr, nullptr));
|
||||
}
|
||||
|
||||
TEST_F(RtcpReceiverTest, InjectSrPacketCalculatesRTT) {
|
||||
@ -276,8 +274,6 @@ TEST_F(RtcpReceiverTest, InjectRrPacket) {
|
||||
OnReceivedRtcpReceiverReport(IsEmpty(), _, now));
|
||||
InjectRtcpPacket(rr);
|
||||
|
||||
RTCPSenderInfo info;
|
||||
EXPECT_EQ(-1, rtcp_receiver_.SenderInfoReceived(&info));
|
||||
EXPECT_EQ(now, rtcp_receiver_.LastReceivedReceiverReport());
|
||||
std::vector<RTCPReportBlock> report_blocks;
|
||||
rtcp_receiver_.StatisticsReceived(&report_blocks);
|
||||
|
||||
@ -612,10 +612,6 @@ void ModuleRtpRtcpImpl::GetRtpPacketLossStats(
|
||||
}
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl::RemoteRTCPStat(RTCPSenderInfo* sender_info) {
|
||||
return rtcp_receiver_.SenderInfoReceived(sender_info);
|
||||
}
|
||||
|
||||
// Received RTCP report.
|
||||
int32_t ModuleRtpRtcpImpl::RemoteRTCPStat(
|
||||
std::vector<RTCPReportBlock>* receive_blocks) const {
|
||||
|
||||
@ -187,9 +187,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
|
||||
uint32_t ssrc,
|
||||
struct RtpPacketLossStats* loss_stats) const override;
|
||||
|
||||
// Get received RTCP report, sender info.
|
||||
int32_t RemoteRTCPStat(RTCPSenderInfo* sender_info) override;
|
||||
|
||||
// Get received RTCP report, report block.
|
||||
int32_t RemoteRTCPStat(
|
||||
std::vector<RTCPReportBlock>* receive_blocks) const override;
|
||||
|
||||
Reference in New Issue
Block a user