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

Unified Diff: webrtc/api/video/video_timing.cc

Issue 3008983002: Change reporting of timing frames conditions in GetStats on receive side (Closed)
Patch Set: Implement Tommi@ comments Created 3 years, 3 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 | « webrtc/api/video/video_timing.h ('k') | webrtc/call/video_receive_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/video/video_timing.cc
diff --git a/webrtc/api/video/video_timing.cc b/webrtc/api/video/video_timing.cc
index 0d22f904bf0f8cac635afbd934415d38fcfb3189..2804c8ba45152adb7986cc0b7f02012749e5bf21 100644
--- a/webrtc/api/video/video_timing.cc
+++ b/webrtc/api/video/video_timing.cc
@@ -39,6 +39,14 @@ bool TimingFrameInfo::IsLongerThan(const TimingFrameInfo& other) const {
return other_delay == -1 || EndToEndDelay() > other_delay;
}
+bool TimingFrameInfo::operator<(const TimingFrameInfo& other) const {
+ return other.IsLongerThan(*this);
+}
+
+bool TimingFrameInfo::operator<=(const TimingFrameInfo& other) const {
+ return !IsLongerThan(other);
+}
+
bool TimingFrameInfo::IsOutlier() const {
return !IsInvalid() && (flags & TimingFrameFlags::kTriggeredBySize);
}
@@ -54,15 +62,15 @@ bool TimingFrameInfo::IsInvalid() const {
std::string TimingFrameInfo::ToString() const {
std::stringstream out;
if (IsInvalid()) {
- out << "[Invalid]";
+ out << "";
} else {
out << rtp_timestamp << ',' << capture_time_ms << ',' << encode_start_ms
<< ',' << encode_finish_ms << ',' << packetization_finish_ms << ','
<< pacer_exit_ms << ',' << network_timestamp_ms << ','
<< network2_timestamp_ms << ',' << receive_start_ms << ','
<< receive_finish_ms << ',' << decode_start_ms << ','
- << decode_finish_ms << ',' << render_time_ms << ", outlier_triggered "
- << IsOutlier() << ", timer_triggered " << IsTimerTriggered();
+ << decode_finish_ms << ',' << render_time_ms << ','
+ << IsOutlier() << ',' << IsTimerTriggered();
}
return out.str();
}
« no previous file with comments | « webrtc/api/video/video_timing.h ('k') | webrtc/call/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698