Replace inconsistent log_segments() function in RTC event log parser

Bug: webrtc:11566
Change-Id: I739bbc29ae5423f3fedcc08e991e27fa0af840c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176081
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31371}
This commit is contained in:
Björn Terelius
2020-05-27 20:25:06 +02:00
committed by Commit Bot
parent 0ee4ee85dd
commit 0d1b28cf09
6 changed files with 59 additions and 59 deletions

View File

@ -62,10 +62,7 @@ void TriageHelper::AnalyzeStreamGaps(const ParsedRtcEventLog& parsed_log,
direction == kIncomingPacket ? TriageAlertType::kIncomingCaptureTimeJump
: TriageAlertType::kOutgoingCaptureTimeJump;
const int64_t segment_end_us =
parsed_log.log_segments().empty()
? std::numeric_limits<int64_t>::max()
: parsed_log.log_segments().front().stop_time_us();
const int64_t segment_end_us = parsed_log.first_log_segment().stop_time_us();
// Check for gaps in sequence numbers and capture timestamps.
for (const auto& stream : parsed_log.rtp_packets_by_ssrc(direction)) {
@ -133,10 +130,7 @@ void TriageHelper::AnalyzeTransmissionGaps(const ParsedRtcEventLog& parsed_log,
? TriageAlertType::kIncomingRtcpGap
: TriageAlertType::kOutgoingRtcpGap;
const int64_t segment_end_us =
parsed_log.log_segments().empty()
? std::numeric_limits<int64_t>::max()
: parsed_log.log_segments().front().stop_time_us();
const int64_t segment_end_us = parsed_log.first_log_segment().stop_time_us();
// TODO(terelius): The parser could provide a list of all packets, ordered
// by time, for each direction.
@ -202,10 +196,7 @@ void TriageHelper::AnalyzeLog(const ParsedRtcEventLog& parsed_log) {
AnalyzeTransmissionGaps(parsed_log, kIncomingPacket);
AnalyzeTransmissionGaps(parsed_log, kOutgoingPacket);
const int64_t segment_end_us =
parsed_log.log_segments().empty()
? std::numeric_limits<int64_t>::max()
: parsed_log.log_segments().front().stop_time_us();
const int64_t segment_end_us = parsed_log.first_log_segment().stop_time_us();
int64_t first_occurrence = parsed_log.last_timestamp();
constexpr double kMaxLossFraction = 0.05;