2017-11-30 15:15:25 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef RTC_TOOLS_EVENT_LOG_VISUALIZER_TRIAGE_NOTIFICATIONS_H_
|
|
|
|
|
#define RTC_TOOLS_EVENT_LOG_VISUALIZER_TRIAGE_NOTIFICATIONS_H_
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
2018-04-25 14:23:01 +00:00
|
|
|
namespace plotting {
|
2017-11-30 15:15:25 +01:00
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class TriageNotification {
|
|
|
|
|
public:
|
|
|
|
|
TriageNotification() : time_seconds_() {}
|
|
|
|
|
explicit TriageNotification(float time_seconds)
|
|
|
|
|
: time_seconds_(time_seconds) {}
|
|
|
|
|
virtual ~TriageNotification() = default;
|
|
|
|
|
virtual std::string ToString() = 0;
|
|
|
|
|
rtc::Optional<float> Time() { return time_seconds_; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
rtc::Optional<float> time_seconds_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class IncomingRtpReceiveTimeGap : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
IncomingRtpReceiveTimeGap(float time_seconds, int64_t duration)
|
2018-04-25 14:23:01 +00:00
|
|
|
: TriageNotification(time_seconds), duration_(duration) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("No RTP packets received for ") +
|
|
|
|
|
std::to_string(duration_) + std::string(" ms");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
int64_t duration_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class IncomingRtcpReceiveTimeGap : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
IncomingRtcpReceiveTimeGap(float time_seconds, int64_t duration)
|
2018-04-25 14:23:01 +00:00
|
|
|
: TriageNotification(time_seconds), duration_(duration) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("No RTCP packets received for ") +
|
|
|
|
|
std::to_string(duration_) + std::string(" ms");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
int64_t duration_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class OutgoingRtpSendTimeGap : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
OutgoingRtpSendTimeGap(float time_seconds, int64_t duration)
|
2018-04-25 14:23:01 +00:00
|
|
|
: TriageNotification(time_seconds), duration_(duration) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("No RTP packets sent for ") + std::to_string(duration_) +
|
|
|
|
|
std::string(" ms");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
int64_t duration_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class OutgoingRtcpSendTimeGap : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
OutgoingRtcpSendTimeGap(float time_seconds, int64_t duration)
|
2018-04-25 14:23:01 +00:00
|
|
|
: TriageNotification(time_seconds), duration_(duration) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("No RTCP packets sent for ") +
|
|
|
|
|
std::to_string(duration_) + std::string(" ms");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
int64_t duration_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class IncomingSeqNoJump : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
2018-04-25 14:23:01 +00:00
|
|
|
IncomingSeqNoJump(float time_seconds, uint32_t ssrc)
|
|
|
|
|
: TriageNotification(time_seconds), ssrc_(ssrc) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("Sequence number jumps on incoming SSRC ") +
|
|
|
|
|
std::to_string(ssrc_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
uint32_t ssrc_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class IncomingCaptureTimeJump : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
IncomingCaptureTimeJump(float time_seconds, uint32_t ssrc)
|
2018-04-25 14:23:01 +00:00
|
|
|
: TriageNotification(time_seconds), ssrc_(ssrc) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("Capture timestamp jumps on incoming SSRC ") +
|
|
|
|
|
std::to_string(ssrc_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
uint32_t ssrc_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class OutgoingSeqNoJump : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
OutgoingSeqNoJump(float time_seconds, uint32_t ssrc)
|
2018-04-25 14:23:01 +00:00
|
|
|
: TriageNotification(time_seconds), ssrc_(ssrc) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("Sequence number jumps on outgoing SSRC ") +
|
|
|
|
|
std::to_string(ssrc_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
uint32_t ssrc_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class OutgoingCaptureTimeJump : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
OutgoingCaptureTimeJump(float time_seconds, uint32_t ssrc)
|
2018-04-25 14:23:01 +00:00
|
|
|
: TriageNotification(time_seconds), ssrc_(ssrc) {}
|
|
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("Capture timestamp jumps on outgoing SSRC ") +
|
|
|
|
|
std::to_string(ssrc_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
uint32_t ssrc_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
class OutgoingHighLoss : public TriageNotification {
|
2017-11-30 15:15:25 +01:00
|
|
|
public:
|
|
|
|
|
explicit OutgoingHighLoss(double avg_loss_fraction)
|
|
|
|
|
: avg_loss_fraction_(avg_loss_fraction) {}
|
2018-04-25 14:23:01 +00:00
|
|
|
std::string ToString() {
|
2017-11-30 15:15:25 +01:00
|
|
|
return std::string("High average loss (") +
|
|
|
|
|
std::to_string(avg_loss_fraction_ * 100) +
|
|
|
|
|
std::string("%) across the call.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
double avg_loss_fraction_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-25 14:23:01 +00:00
|
|
|
} // namespace plotting
|
2017-11-30 15:15:25 +01:00
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // RTC_TOOLS_EVENT_LOG_VISUALIZER_TRIAGE_NOTIFICATIONS_H_
|