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

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

Issue 3000753002: Add a flags field to video timing extension. (Closed)
Patch Set: Addressed comments Created 3 years, 4 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/api/video/video_timing.cc
diff --git a/webrtc/api/video/video_timing.cc b/webrtc/api/video/video_timing.cc
index a0a3f4d10f70df71da505f726d6d19ebf35ca307..58acdb617bbfec100fee821dbd98fa835016ab9e 100644
--- a/webrtc/api/video/video_timing.cc
+++ b/webrtc/api/video/video_timing.cc
@@ -27,7 +27,8 @@ TimingFrameInfo::TimingFrameInfo()
receive_finish_ms(-1),
decode_start_ms(-1),
decode_finish_ms(-1),
- render_time_ms(-1) {}
+ render_time_ms(-1),
+ flags(TimingFrameFlags::kDefault) {}
int64_t TimingFrameInfo::EndToEndDelay() const {
return capture_time_ms >= 0 ? decode_finish_ms - capture_time_ms : -1;
@@ -38,14 +39,27 @@ bool TimingFrameInfo::IsLongerThan(const TimingFrameInfo& other) const {
return other_delay == -1 || EndToEndDelay() > other_delay;
}
+bool TimingFrameInfo::IsOutlier() const {
+ return flags & TimingFrameFlags::kTriggeredBySize;
danilchap 2017/08/11 13:51:16 are Invalid frames outliers?
sprang_webrtc 2017/08/11 15:06:33 No, this is a bug.
+}
+
+bool TimingFrameInfo::IsInvalid() const {
+ return flags == TimingFrameFlags::kTriggeredBySize;
danilchap 2017/08/11 13:51:16 == ::kInvalid ?
sprang_webrtc 2017/08/11 15:06:33 Yes. What a brain fart...
+}
+
std::string TimingFrameInfo::ToString() const {
std::stringstream out;
- 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;
+ if (IsInvalid()) {
+ out << "[Invalid]";
+ } 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 "
+ << IsOutlier();
danilchap 2017/08/11 13:51:16 can it be usefull to trace also if frame trigger b
sprang_webrtc 2017/08/11 15:06:33 Done.
+ }
return out.str();
}

Powered by Google App Engine
This is Rietveld 408576698