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

Unified Diff: webrtc/video/stream_synchronization_unittest.cc

Issue 2385763002: Add stats for frequency offset when converting RTP timestamp to NTP time. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/stream_synchronization.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/stream_synchronization_unittest.cc
diff --git a/webrtc/video/stream_synchronization_unittest.cc b/webrtc/video/stream_synchronization_unittest.cc
index f09bee4ae70e3edf82770c30b2e6f2a02596f785..d328d6af437ff5c8761f73ecbc46e425efa9beb8 100644
--- a/webrtc/video/stream_synchronization_unittest.cc
+++ b/webrtc/video/stream_synchronization_unittest.cc
@@ -98,24 +98,30 @@ class StreamSynchronizationTest : public ::testing::Test {
int audio_offset = 0;
int video_frequency = static_cast<int>(kDefaultVideoFrequency *
video_clock_drift_ + 0.5);
+ bool new_sr;
int video_offset = 0;
StreamSynchronization::Measurements audio;
StreamSynchronization::Measurements video;
// Generate NTP/RTP timestamp pair for both streams corresponding to RTCP.
- audio.rtcp.push_front(send_time_->GenerateRtcp(audio_frequency,
- audio_offset));
+ RtcpMeasurement rtcp =
+ send_time_->GenerateRtcp(audio_frequency, audio_offset);
+ EXPECT_TRUE(UpdateRtcpList(rtcp.ntp_secs, rtcp.ntp_frac, rtcp.rtp_timestamp,
+ &audio.rtcp, &new_sr));
send_time_->IncreaseTimeMs(100);
receive_time_->IncreaseTimeMs(100);
- video.rtcp.push_front(send_time_->GenerateRtcp(video_frequency,
- video_offset));
+ rtcp = send_time_->GenerateRtcp(video_frequency, video_offset);
+ EXPECT_TRUE(UpdateRtcpList(rtcp.ntp_secs, rtcp.ntp_frac, rtcp.rtp_timestamp,
+ &video.rtcp, &new_sr));
send_time_->IncreaseTimeMs(900);
receive_time_->IncreaseTimeMs(900);
- audio.rtcp.push_front(send_time_->GenerateRtcp(audio_frequency,
- audio_offset));
+ rtcp = send_time_->GenerateRtcp(audio_frequency, audio_offset);
+ EXPECT_TRUE(UpdateRtcpList(rtcp.ntp_secs, rtcp.ntp_frac, rtcp.rtp_timestamp,
+ &audio.rtcp, &new_sr));
send_time_->IncreaseTimeMs(100);
receive_time_->IncreaseTimeMs(100);
- video.rtcp.push_front(send_time_->GenerateRtcp(video_frequency,
- video_offset));
+ rtcp = send_time_->GenerateRtcp(video_frequency, video_offset);
+ EXPECT_TRUE(UpdateRtcpList(rtcp.ntp_secs, rtcp.ntp_frac, rtcp.rtp_timestamp,
+ &video.rtcp, &new_sr));
send_time_->IncreaseTimeMs(900);
receive_time_->IncreaseTimeMs(900);
« no previous file with comments | « webrtc/video/stream_synchronization.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698