blob: 49e06209343b97a079e832f2ee6b515ffafe2b86 [file] [log] [blame]
Bjorn Terelius2eb31882017-11-30 15:15:25 +01001/*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef RTC_TOOLS_EVENT_LOG_VISUALIZER_TRIAGE_NOTIFICATIONS_H_
12#define RTC_TOOLS_EVENT_LOG_VISUALIZER_TRIAGE_NOTIFICATIONS_H_
13
14#include <string>
15
16namespace webrtc {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010017
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020018class IncomingRtpReceiveTimeGap {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010019 public:
20 IncomingRtpReceiveTimeGap(float time_seconds, int64_t duration)
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020021 : time_seconds_(time_seconds), duration_(duration) {}
22 float Time() const { return time_seconds_; }
23 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010024 return std::string("No RTP packets received for ") +
25 std::to_string(duration_) + std::string(" ms");
26 }
27
28 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020029 float time_seconds_;
Bjorn Terelius2eb31882017-11-30 15:15:25 +010030 int64_t duration_;
31};
32
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020033class IncomingRtcpReceiveTimeGap {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010034 public:
35 IncomingRtcpReceiveTimeGap(float time_seconds, int64_t duration)
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020036 : time_seconds_(time_seconds), duration_(duration) {}
37 float Time() const { return time_seconds_; }
38 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010039 return std::string("No RTCP packets received for ") +
40 std::to_string(duration_) + std::string(" ms");
41 }
42
43 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020044 float time_seconds_;
Bjorn Terelius2eb31882017-11-30 15:15:25 +010045 int64_t duration_;
46};
47
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020048class OutgoingRtpSendTimeGap {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010049 public:
50 OutgoingRtpSendTimeGap(float time_seconds, int64_t duration)
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020051 : time_seconds_(time_seconds), duration_(duration) {}
52 float Time() const { return time_seconds_; }
53 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010054 return std::string("No RTP packets sent for ") + std::to_string(duration_) +
55 std::string(" ms");
56 }
57
58 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020059 float time_seconds_;
Bjorn Terelius2eb31882017-11-30 15:15:25 +010060 int64_t duration_;
61};
62
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020063class OutgoingRtcpSendTimeGap {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010064 public:
65 OutgoingRtcpSendTimeGap(float time_seconds, int64_t duration)
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020066 : time_seconds_(time_seconds), duration_(duration) {}
67 float Time() const { return time_seconds_; }
68 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010069 return std::string("No RTCP packets sent for ") +
70 std::to_string(duration_) + std::string(" ms");
71 }
72
73 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020074 float time_seconds_;
Bjorn Terelius2eb31882017-11-30 15:15:25 +010075 int64_t duration_;
76};
77
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020078class IncomingSeqNumJump {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010079 public:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020080 IncomingSeqNumJump(float time_seconds, uint32_t ssrc)
81 : time_seconds_(time_seconds), ssrc_(ssrc) {}
82 float Time() const { return time_seconds_; }
83 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010084 return std::string("Sequence number jumps on incoming SSRC ") +
85 std::to_string(ssrc_);
86 }
87
88 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020089 float time_seconds_;
90
Bjorn Terelius2eb31882017-11-30 15:15:25 +010091 uint32_t ssrc_;
92};
93
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020094class IncomingCaptureTimeJump {
Bjorn Terelius2eb31882017-11-30 15:15:25 +010095 public:
96 IncomingCaptureTimeJump(float time_seconds, uint32_t ssrc)
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +020097 : time_seconds_(time_seconds), ssrc_(ssrc) {}
98 float Time() const { return time_seconds_; }
99 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100100 return std::string("Capture timestamp jumps on incoming SSRC ") +
101 std::to_string(ssrc_);
102 }
103
104 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200105 float time_seconds_;
106
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100107 uint32_t ssrc_;
108};
109
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200110class OutgoingSeqNoJump {
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100111 public:
112 OutgoingSeqNoJump(float time_seconds, uint32_t ssrc)
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200113 : time_seconds_(time_seconds), ssrc_(ssrc) {}
114 float Time() const { return time_seconds_; }
115 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100116 return std::string("Sequence number jumps on outgoing SSRC ") +
117 std::to_string(ssrc_);
118 }
119
120 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200121 float time_seconds_;
122
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100123 uint32_t ssrc_;
124};
125
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200126class OutgoingCaptureTimeJump {
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100127 public:
128 OutgoingCaptureTimeJump(float time_seconds, uint32_t ssrc)
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200129 : time_seconds_(time_seconds), ssrc_(ssrc) {}
130 float Time() const { return time_seconds_; }
131 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100132 return std::string("Capture timestamp jumps on outgoing SSRC ") +
133 std::to_string(ssrc_);
134 }
135
136 private:
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200137 float time_seconds_;
138
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100139 uint32_t ssrc_;
140};
141
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200142class OutgoingHighLoss {
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100143 public:
144 explicit OutgoingHighLoss(double avg_loss_fraction)
145 : avg_loss_fraction_(avg_loss_fraction) {}
Bjorn Tereliusc4ca1d32018-04-27 14:33:34 +0200146 std::string ToString() const {
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100147 return std::string("High average loss (") +
148 std::to_string(avg_loss_fraction_ * 100) +
149 std::string("%) across the call.");
150 }
151
152 private:
153 double avg_loss_fraction_;
154};
155
Bjorn Terelius2eb31882017-11-30 15:15:25 +0100156} // namespace webrtc
157
158#endif // RTC_TOOLS_EVENT_LOG_VISUALIZER_TRIAGE_NOTIFICATIONS_H_