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

Unified Diff: webrtc/video/video_quality_test.cc

Issue 1774123003: Fixed incorrect handling of timestamps in video quality test (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_quality_test.cc
diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc
index 84dbb5104e7c970a0634857cdb82b018e56c02a7..e43ddb16ce4055c765076db7c2196d8db9efd35b 100644
--- a/webrtc/video/video_quality_test.cc
+++ b/webrtc/video/video_quality_test.cc
@@ -120,8 +120,9 @@ class VideoAnalyzer : public PacketReceiver,
parser.Parse(&header);
{
rtc::CritScope lock(&crit_);
- int64_t timestamp = wrap_handler_.Unwrap(header.timestamp);
- recv_times_[timestamp - rtp_timestamp_delta_] =
+ int64_t timestamp =
+ wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_);
+ recv_times_[timestamp] =
Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
}
@@ -191,11 +192,12 @@ class VideoAnalyzer : public PacketReceiver,
int time_to_render_ms) override {
int64_t render_time_ms =
Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
- uint32_t send_timestamp = video_frame.timestamp() - rtp_timestamp_delta_;
rtc::CritScope lock(&crit_);
+ uint32_t send_timestamp =
+ wrap_handler_.Unwrap(video_frame.timestamp() - rtp_timestamp_delta_);
- while (frames_.front().timestamp() < send_timestamp) {
+ while (wrap_handler_.Unwrap(frames_.front().timestamp()) < send_timestamp) {
AddFrameComparison(frames_.front(), last_rendered_frame_, true,
render_time_ms);
frames_.pop_front();
@@ -204,13 +206,14 @@ class VideoAnalyzer : public PacketReceiver,
VideoFrame reference_frame = frames_.front();
frames_.pop_front();
assert(!reference_frame.IsZeroSize());
- if (send_timestamp == reference_frame.timestamp() - 1) {
+ int64_t reference_timestamp =
+ wrap_handler_.Unwrap(reference_frame.timestamp());
+ if (send_timestamp == reference_timestamp - 1) {
// TODO(ivica): Make this work for > 2 streams.
// Look at RTPSender::BuildRTPHeader.
++send_timestamp;
}
- EXPECT_EQ(reference_frame.timestamp(), send_timestamp);
- assert(reference_frame.timestamp() == send_timestamp);
+ ASSERT_EQ(reference_timestamp, send_timestamp);
AddFrameComparison(reference_frame, video_frame, false, render_time_ms);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698