Refactor/reimplement RTC event log triage alerts.
- Moves AnalyzerConfig and helper functions IsAudioSsrc, IsVideoSsrc, IsRtxSsrc, GetStreamNam and GetLayerName to analyzer_common.h - Moves log_segments() code to rtc_event_log_parser.h - Moves TriageAlert/Notification code to a new file with a couple of minor fixes to make it less spammy. Bug: webrtc:11566 Change-Id: Ib33941d8185f7382fc72ed65768e46015e0320de Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174824 Commit-Queue: Björn Terelius <terelius@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31318}
This commit is contained in:
committed by
Commit Bot
parent
41559a2b46
commit
48b8279813
@ -330,6 +330,20 @@ class ParsedRtcEventLog {
|
||||
PacketView<const LoggedRtpPacket> packet_view;
|
||||
};
|
||||
|
||||
class LogSegment {
|
||||
public:
|
||||
LogSegment(int64_t start_time_us, int64_t stop_time_us)
|
||||
: start_time_us_(start_time_us), stop_time_us_(stop_time_us) {}
|
||||
int64_t start_time_ms() const { return start_time_us_ / 1000; }
|
||||
int64_t start_time_us() const { return start_time_us_; }
|
||||
int64_t stop_time_ms() const { return stop_time_us_ / 1000; }
|
||||
int64_t stop_time_us() const { return stop_time_us_; }
|
||||
|
||||
private:
|
||||
int64_t start_time_us_;
|
||||
int64_t stop_time_us_;
|
||||
};
|
||||
|
||||
static webrtc::RtpHeaderExtensionMap GetDefaultHeaderExtensionMap();
|
||||
|
||||
explicit ParsedRtcEventLog(
|
||||
@ -597,6 +611,8 @@ class ParsedRtcEventLog {
|
||||
int64_t first_timestamp() const { return first_timestamp_; }
|
||||
int64_t last_timestamp() const { return last_timestamp_; }
|
||||
|
||||
const std::vector<LogSegment>& log_segments() const { return log_segments_; }
|
||||
|
||||
std::vector<LoggedPacketInfo> GetPacketInfos(PacketDirection direction) const;
|
||||
std::vector<LoggedPacketInfo> GetIncomingPacketInfos() const {
|
||||
return GetPacketInfos(kIncomingPacket);
|
||||
@ -850,6 +866,9 @@ class ParsedRtcEventLog {
|
||||
int64_t first_timestamp_;
|
||||
int64_t last_timestamp_;
|
||||
|
||||
// Stores the start and end timestamp for each log segments.
|
||||
std::vector<LogSegment> log_segments_;
|
||||
|
||||
// The extension maps are mutable to allow us to insert the default
|
||||
// configuration when parsing an RTP header for an unconfigured stream.
|
||||
// TODO(terelius): This is only used for the legacy format. Remove once we've
|
||||
|
||||
Reference in New Issue
Block a user