Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc

Issue 2368983002: Replace RtcpReceiveTimeInfo with rtcp::ReceiveTimeInfo (Closed)
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 EXPECT_EQ(metric.RXconfig, parser()->voip_metric()->RXconfig); 628 EXPECT_EQ(metric.RXconfig, parser()->voip_metric()->RXconfig);
629 EXPECT_EQ(metric.JBnominal, parser()->voip_metric()->JBnominal); 629 EXPECT_EQ(metric.JBnominal, parser()->voip_metric()->JBnominal);
630 EXPECT_EQ(metric.JBmax, parser()->voip_metric()->JBmax); 630 EXPECT_EQ(metric.JBmax, parser()->voip_metric()->JBmax);
631 EXPECT_EQ(metric.JBabsMax, parser()->voip_metric()->JBabsMax); 631 EXPECT_EQ(metric.JBabsMax, parser()->voip_metric()->JBabsMax);
632 } 632 }
633 633
634 TEST_F(RtcpSenderTest, SendXrWithDlrr) { 634 TEST_F(RtcpSenderTest, SendXrWithDlrr) {
635 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); 635 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound);
636 RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState(); 636 RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
637 feedback_state.has_last_xr_rr = true; 637 feedback_state.has_last_xr_rr = true;
638 RtcpReceiveTimeInfo last_xr_rr; 638 rtcp::ReceiveTimeInfo last_xr_rr;
639 last_xr_rr.sourceSSRC = 0x11111111; 639 last_xr_rr.ssrc = 0x11111111;
640 last_xr_rr.lastRR = 0x22222222; 640 last_xr_rr.last_rr = 0x22222222;
641 last_xr_rr.delaySinceLastRR = 0x33333333; 641 last_xr_rr.delay_since_last_rr = 0x33333333;
642 feedback_state.last_xr_rr = last_xr_rr; 642 feedback_state.last_xr_rr = last_xr_rr;
643 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpReport)); 643 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpReport));
644 EXPECT_EQ(1, parser()->xr()->num_packets()); 644 EXPECT_EQ(1, parser()->xr()->num_packets());
645 EXPECT_EQ(kSenderSsrc, parser()->xr()->sender_ssrc()); 645 EXPECT_EQ(kSenderSsrc, parser()->xr()->sender_ssrc());
646 EXPECT_EQ(1U, parser()->xr()->dlrrs().size()); 646 EXPECT_EQ(1U, parser()->xr()->dlrrs().size());
647 EXPECT_EQ(1U, parser()->xr()->dlrrs()[0].sub_blocks().size()); 647 EXPECT_EQ(1U, parser()->xr()->dlrrs()[0].sub_blocks().size());
648 EXPECT_EQ(last_xr_rr.sourceSSRC, 648 EXPECT_EQ(last_xr_rr.ssrc, parser()->xr()->dlrrs()[0].sub_blocks()[0].ssrc);
649 parser()->xr()->dlrrs()[0].sub_blocks()[0].ssrc); 649 EXPECT_EQ(last_xr_rr.last_rr,
650 EXPECT_EQ(last_xr_rr.lastRR,
651 parser()->xr()->dlrrs()[0].sub_blocks()[0].last_rr); 650 parser()->xr()->dlrrs()[0].sub_blocks()[0].last_rr);
652 EXPECT_EQ(last_xr_rr.delaySinceLastRR, 651 EXPECT_EQ(last_xr_rr.delay_since_last_rr,
653 parser()->xr()->dlrrs()[0].sub_blocks()[0].delay_since_last_rr); 652 parser()->xr()->dlrrs()[0].sub_blocks()[0].delay_since_last_rr);
654 } 653 }
655 654
656 TEST_F(RtcpSenderTest, SendXrWithRrtr) { 655 TEST_F(RtcpSenderTest, SendXrWithRrtr) {
657 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); 656 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound);
658 EXPECT_EQ(0, rtcp_sender_->SetSendingStatus(feedback_state(), false)); 657 EXPECT_EQ(0, rtcp_sender_->SetSendingStatus(feedback_state(), false));
659 rtcp_sender_->SendRtcpXrReceiverReferenceTime(true); 658 rtcp_sender_->SendRtcpXrReceiverReferenceTime(true);
660 uint32_t ntp_secs; 659 uint32_t ntp_secs;
661 uint32_t ntp_frac; 660 uint32_t ntp_frac;
662 clock_.CurrentNtp(ntp_secs, ntp_frac); 661 clock_.CurrentNtp(ntp_secs, ntp_frac);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 rtcp_sender_->SetLastRtpTime(kRtpTimestamp, clock_.TimeInMilliseconds()); 816 rtcp_sender_->SetLastRtpTime(kRtpTimestamp, clock_.TimeInMilliseconds());
818 817
819 // Set up XR VoIP metric to be included with BYE 818 // Set up XR VoIP metric to be included with BYE
820 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); 819 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound);
821 RTCPVoIPMetric metric; 820 RTCPVoIPMetric metric;
822 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric)); 821 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric));
823 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye)); 822 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye));
824 } 823 }
825 824
826 } // namespace webrtc 825 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698