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

Unified Diff: webrtc/video/video_quality_test.cc

Issue 1889443002: Delete method webrtc::VideoFrame::Reset. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
Index: webrtc/video/video_quality_test.cc
diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc
index 60f957c456ab2312773e551fe7e7a9bef0e0fc51..057a8a2ab71aa2d2be32b1e19e65e31860cf3138 100644
--- a/webrtc/video/video_quality_test.cc
+++ b/webrtc/video/video_quality_test.cc
@@ -21,6 +21,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/event.h"
#include "webrtc/base/format_macros.h"
+#include "webrtc/base/optional.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/call.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
@@ -146,8 +147,8 @@ class VideoAnalyzer : public PacketReceiver,
{
rtc::CritScope lock(&crit_);
- if (first_send_frame_.IsZeroSize() && rtp_timestamp_delta_ == 0)
- first_send_frame_ = copy;
+ if (!first_send_timestamp_ && rtp_timestamp_delta_ == 0)
+ first_send_timestamp_ = rtc::Optional<uint32_t>(copy.timestamp());
frames_.push_back(copy);
}
@@ -169,8 +170,8 @@ class VideoAnalyzer : public PacketReceiver,
rtc::CritScope lock(&crit_);
if (rtp_timestamp_delta_ == 0) {
- rtp_timestamp_delta_ = header.timestamp - first_send_frame_.timestamp();
- first_send_frame_.Reset();
+ rtp_timestamp_delta_ = header.timestamp - *first_send_timestamp_;
+ first_send_timestamp_ = rtc::Optional<uint32_t>();
}
int64_t timestamp =
wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_);
@@ -622,7 +623,7 @@ class VideoAnalyzer : public PacketReceiver,
std::map<int64_t, int64_t> send_times_ GUARDED_BY(crit_);
std::map<int64_t, int64_t> recv_times_ GUARDED_BY(crit_);
std::map<int64_t, size_t> encoded_frame_sizes_ GUARDED_BY(crit_);
- VideoFrame first_send_frame_ GUARDED_BY(crit_);
+ rtc::Optional<uint32_t> first_send_timestamp_ GUARDED_BY(crit_);
const double avg_psnr_threshold_;
const double avg_ssim_threshold_;

Powered by Google App Engine
This is Rietveld 408576698