Revert "Create new API for RtcEventLogParser."

This reverts commit 9e336ec0b8a77c3461d13677cff3563c11c88daa.

Reason for revert: Code can accidentally include the deprecated parser but link with the new one, or vice versa. Reverting to fix naming.

Original change's description:
> Create new API for RtcEventLogParser.
> 
> The new API stores events gathered by event type. For example, it is
> possible to ask fo a list of all incoming RTCP messages or all audio
> playout events.
> 
> The new API is experimental and may change over next few weeks. Once
> it has stabilized and all unit tests and existing tools have been
> ported to the new API, the old one will be removed.
> 
> This CL also updates the event_log_visualizer tool to use the new
> parser API. This is not a funcional change except for:
> - Incoming and outgoing audio level are now drawn in two separate plots.
> - Incoming and outgoing timstamps are now drawn in two separate plots.
> - RTCP count is no longer split into Video and Audio. It also counts
>   all RTCP packets rather than only specific message types.
> - Slight timing difference in sendside BWE simulation due to only
>   iterating over transport feedbacks and not over all RTCP packets.
>   This timing changes are not visible in the plots.
> 
> 
> Media type for RTCP messages might not be identified correctly by
> rtc_event_log2text anymore. On the other hand, assigning a specific
> media type to an RTCP packet was a bit hacky to begin with.
> 
> Bug: webrtc:8111
> Change-Id: I8e7168302beb69b2e163a097a2a142b86dd4a26b
> Reviewed-on: https://webrtc-review.googlesource.com/60865
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23015}

TBR=terelius@webrtc.org,srte@webrtc.org,minyue@webrtc.org

Change-Id: Ib4bbcf0563423675a3cc1dce59ebf665e0c5dae9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8111
Reviewed-on: https://webrtc-review.googlesource.com/72500
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23026}
This commit is contained in:
Björn Terelius
2018-04-25 14:23:01 +00:00
committed by Commit Bot
parent 65fb4049c1
commit ff61273c01
23 changed files with 1422 additions and 3279 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,12 +18,54 @@
#include <utility>
#include <vector>
#include "logging/rtc_event_log/rtc_event_log_parser2.h"
#include "rtc_base/strings/string_builder.h"
#include "logging/rtc_event_log/rtc_event_log_parser.h"
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtcp_packet.h"
#include "rtc_base/function_view.h"
#include "rtc_tools/event_log_visualizer/plot_base.h"
#include "rtc_tools/event_log_visualizer/triage_notifications.h"
namespace webrtc {
namespace plotting {
struct LoggedRtpPacket {
LoggedRtpPacket(uint64_t timestamp,
RTPHeader header,
size_t header_length,
size_t total_length)
: timestamp(timestamp),
header(header),
header_length(header_length),
total_length(total_length) {}
uint64_t timestamp;
// TODO(terelius): This allocates space for 15 CSRCs even if none are used.
RTPHeader header;
size_t header_length;
size_t total_length;
};
struct LoggedRtcpPacket {
LoggedRtcpPacket(uint64_t timestamp,
RTCPPacketType rtcp_type,
std::unique_ptr<rtcp::RtcpPacket> rtcp_packet)
: timestamp(timestamp), type(rtcp_type), packet(std::move(rtcp_packet)) {}
uint64_t timestamp;
RTCPPacketType type;
std::unique_ptr<rtcp::RtcpPacket> packet;
};
struct LossBasedBweUpdate {
uint64_t timestamp;
int32_t new_bitrate;
uint8_t fraction_loss;
int32_t expected_packets;
};
struct AudioNetworkAdaptationEvent {
uint64_t timestamp;
AudioEncoderRuntimeConfig config;
};
class EventLogAnalyzer {
public:
@ -32,13 +74,14 @@ class EventLogAnalyzer {
// modified while the EventLogAnalyzer is being used.
explicit EventLogAnalyzer(const ParsedRtcEventLog& log);
void CreatePacketGraph(PacketDirection direction, Plot* plot);
void CreatePacketGraph(PacketDirection desired_direction, Plot* plot);
void CreateAccumulatedPacketsGraph(PacketDirection direction, Plot* plot);
void CreateAccumulatedPacketsGraph(PacketDirection desired_direction,
Plot* plot);
void CreatePlayoutGraph(Plot* plot);
void CreateAudioLevelGraph(PacketDirection direction, Plot* plot);
void CreateAudioLevelGraph(Plot* plot);
void CreateSequenceNumberGraph(Plot* plot);
@ -49,20 +92,19 @@ class EventLogAnalyzer {
void CreateFractionLossGraph(Plot* plot);
void CreateTotalIncomingBitrateGraph(Plot* plot);
void CreateTotalOutgoingBitrateGraph(Plot* plot,
bool show_detector_state = false,
bool show_alr_state = false);
void CreateTotalBitrateGraph(PacketDirection desired_direction,
Plot* plot,
bool show_detector_state = false,
bool show_alr_state = false);
void CreateStreamBitrateGraph(PacketDirection direction, Plot* plot);
void CreateStreamBitrateGraph(PacketDirection desired_direction, Plot* plot);
void CreateSendSideBweSimulationGraph(Plot* plot);
void CreateReceiveSideBweSimulationGraph(Plot* plot);
void CreateNetworkDelayFeedbackGraph(Plot* plot);
void CreatePacerDelayGraph(Plot* plot);
void CreateTimestampGraph(PacketDirection direction, Plot* plot);
void CreateTimestampGraph(Plot* plot);
void CreateAudioEncoderTargetBitrateGraph(Plot* plot);
void CreateAudioEncoderFrameLengthGraph(Plot* plot);
@ -77,114 +119,55 @@ class EventLogAnalyzer {
void CreateIceCandidatePairConfigGraph(Plot* plot);
void CreateIceConnectivityCheckGraph(Plot* plot);
// Returns a vector of capture and arrival timestamps for the video frames
// of the stream with the most number of frames.
std::vector<std::pair<int64_t, int64_t>> GetFrameTimestamps() const;
void CreateTriageNotifications();
void PrintNotifications(FILE* file);
private:
bool IsRtxSsrc(PacketDirection direction, uint32_t ssrc) const {
if (direction == kIncomingPacket) {
return parsed_log_.incoming_rtx_ssrcs().find(ssrc) !=
parsed_log_.incoming_rtx_ssrcs().end();
} else {
return parsed_log_.outgoing_rtx_ssrcs().find(ssrc) !=
parsed_log_.outgoing_rtx_ssrcs().end();
class StreamId {
public:
StreamId(uint32_t ssrc, webrtc::PacketDirection direction)
: ssrc_(ssrc), direction_(direction) {}
bool operator<(const StreamId& other) const {
return std::tie(ssrc_, direction_) <
std::tie(other.ssrc_, other.direction_);
}
}
bool IsVideoSsrc(PacketDirection direction, uint32_t ssrc) const {
if (direction == kIncomingPacket) {
return parsed_log_.incoming_video_ssrcs().find(ssrc) !=
parsed_log_.incoming_video_ssrcs().end();
} else {
return parsed_log_.outgoing_video_ssrcs().find(ssrc) !=
parsed_log_.outgoing_video_ssrcs().end();
bool operator==(const StreamId& other) const {
return std::tie(ssrc_, direction_) ==
std::tie(other.ssrc_, other.direction_);
}
}
uint32_t GetSsrc() const { return ssrc_; }
webrtc::PacketDirection GetDirection() const { return direction_; }
bool IsAudioSsrc(PacketDirection direction, uint32_t ssrc) const {
if (direction == kIncomingPacket) {
return parsed_log_.incoming_audio_ssrcs().find(ssrc) !=
parsed_log_.incoming_audio_ssrcs().end();
} else {
return parsed_log_.outgoing_audio_ssrcs().find(ssrc) !=
parsed_log_.outgoing_audio_ssrcs().end();
}
}
private:
uint32_t ssrc_;
webrtc::PacketDirection direction_;
};
template <typename IterableType>
void CreateAccumulatedPacketsTimeSeries(Plot* plot,
const IterableType& packets,
const std::string& label);
template <typename T>
void CreateAccumulatedPacketsTimeSeries(
PacketDirection desired_direction,
Plot* plot,
const std::map<StreamId, std::vector<T>>& packets,
const std::string& label_prefix);
void CreateStreamGapAlerts(PacketDirection direction);
void CreateTransmissionGapAlerts(PacketDirection direction);
bool IsRtxSsrc(StreamId stream_id) const;
std::string GetStreamName(PacketDirection direction, uint32_t ssrc) const {
char buffer[200];
rtc::SimpleStringBuilder name(buffer);
if (IsAudioSsrc(direction, ssrc)) {
name << "Audio ";
} else if (IsVideoSsrc(direction, ssrc)) {
name << "Video ";
} else {
name << "Unknown ";
}
if (IsRtxSsrc(direction, ssrc)) {
name << "RTX ";
}
if (direction == kIncomingPacket)
name << "(In) ";
else
name << "(Out) ";
name << "SSRC " << ssrc;
return name.str();
}
bool IsVideoSsrc(StreamId stream_id) const;
bool IsAudioSsrc(StreamId stream_id) const;
std::string GetStreamName(StreamId stream_id) const;
rtc::Optional<uint32_t> EstimateRtpClockFrequency(
const std::vector<LoggedRtpPacket>& packets) const;
float ToCallTime(int64_t timestamp) const;
void Alert_RtpLogTimeGap(PacketDirection direction,
float time_seconds,
int64_t duration) {
if (direction == kIncomingPacket) {
incoming_rtp_recv_time_gaps_.emplace_back(time_seconds, duration);
} else {
outgoing_rtp_send_time_gaps_.emplace_back(time_seconds, duration);
}
}
void Alert_RtcpLogTimeGap(PacketDirection direction,
float time_seconds,
int64_t duration) {
if (direction == kIncomingPacket) {
incoming_rtcp_recv_time_gaps_.emplace_back(time_seconds, duration);
} else {
outgoing_rtcp_send_time_gaps_.emplace_back(time_seconds, duration);
}
}
void Alert_SeqNumJump(PacketDirection direction,
float time_seconds,
uint32_t ssrc) {
if (direction == kIncomingPacket) {
incoming_seq_num_jumps_.emplace_back(time_seconds, ssrc);
} else {
outgoing_seq_num_jumps_.emplace_back(time_seconds, ssrc);
}
}
void Alert_CaptureTimeJump(PacketDirection direction,
float time_seconds,
uint32_t ssrc) {
if (direction == kIncomingPacket) {
incoming_capture_time_jumps_.emplace_back(time_seconds, ssrc);
} else {
outgoing_capture_time_jumps_.emplace_back(time_seconds, ssrc);
}
}
void Alert_OutgoingHighLoss(double avg_loss_fraction) {
outgoing_high_loss_alerts_.emplace_back(avg_loss_fraction);
}
void Notification(std::unique_ptr<TriageNotification> notification);
std::string GetCandidatePairLogDescriptionFromId(uint32_t candidate_pair_id);
@ -194,19 +177,50 @@ class EventLogAnalyzer {
// If left empty, all SSRCs will be considered relevant.
std::vector<uint32_t> desired_ssrc_;
// Tracks what each stream is configured for. Note that a single SSRC can be
// in several sets. For example, the SSRC used for sending video over RTX
// will appear in both video_ssrcs_ and rtx_ssrcs_. In the unlikely case that
// an SSRC is reconfigured to a different media type mid-call, it will also
// appear in multiple sets.
std::set<StreamId> rtx_ssrcs_;
std::set<StreamId> video_ssrcs_;
std::set<StreamId> audio_ssrcs_;
// Maps a stream identifier consisting of ssrc and direction to the parsed
// RTP headers in that stream. Header extensions are parsed if the stream
// has been configured.
std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_;
std::map<StreamId, std::vector<LoggedRtcpPacket>> rtcp_packets_;
// Maps an SSRC to the timestamps of parsed audio playout events.
std::map<uint32_t, std::vector<uint64_t>> audio_playout_events_;
// Stores the timestamps for all log segments, in the form of associated start
// and end events.
std::vector<std::pair<int64_t, int64_t>> log_segments_;
std::vector<std::pair<uint64_t, uint64_t>> log_segments_;
std::vector<IncomingRtpReceiveTimeGap> incoming_rtp_recv_time_gaps_;
std::vector<IncomingRtcpReceiveTimeGap> incoming_rtcp_recv_time_gaps_;
std::vector<OutgoingRtpSendTimeGap> outgoing_rtp_send_time_gaps_;
std::vector<OutgoingRtcpSendTimeGap> outgoing_rtcp_send_time_gaps_;
std::vector<IncomingSeqNumJump> incoming_seq_num_jumps_;
std::vector<IncomingCaptureTimeJump> incoming_capture_time_jumps_;
std::vector<OutgoingSeqNoJump> outgoing_seq_num_jumps_;
std::vector<OutgoingCaptureTimeJump> outgoing_capture_time_jumps_;
std::vector<OutgoingHighLoss> outgoing_high_loss_alerts_;
// A list of all updates from the send-side loss-based bandwidth estimator.
std::vector<LossBasedBweUpdate> bwe_loss_updates_;
std::vector<AudioNetworkAdaptationEvent> audio_network_adaptation_events_;
std::vector<ParsedRtcEventLog::BweProbeClusterCreatedEvent>
bwe_probe_cluster_created_events_;
std::vector<ParsedRtcEventLog::BweProbeResultEvent> bwe_probe_result_events_;
std::vector<ParsedRtcEventLog::BweDelayBasedUpdate> bwe_delay_updates_;
std::vector<std::unique_ptr<TriageNotification>> notifications_;
std::vector<ParsedRtcEventLog::AlrStateEvent> alr_state_events_;
std::vector<ParsedRtcEventLog::IceCandidatePairConfig>
ice_candidate_pair_configs_;
std::vector<ParsedRtcEventLog::IceCandidatePairEvent>
ice_candidate_pair_events_;
std::map<uint32_t, std::string> candidate_pair_desc_by_id_;
@ -214,17 +228,18 @@ class EventLogAnalyzer {
// The generated data points will be |step_| microseconds apart.
// Only events occuring at most |window_duration_| microseconds before the
// current data point will be part of the average.
int64_t window_duration_;
int64_t step_;
uint64_t window_duration_;
uint64_t step_;
// First and last events of the log.
int64_t begin_time_;
int64_t end_time_;
uint64_t begin_time_;
uint64_t end_time_;
// Duration (in seconds) of log file.
float call_duration_s_;
};
} // namespace plotting
} // namespace webrtc
#endif // RTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_

View File

@ -10,7 +10,7 @@
#include <iostream>
#include "logging/rtc_event_log/rtc_event_log_parser2.h"
#include "logging/rtc_event_log/rtc_event_log_parser.h"
#include "rtc_base/flags.h"
#include "rtc_tools/event_log_visualizer/analyzer.h"
#include "rtc_tools/event_log_visualizer/plot_base.h"
@ -143,15 +143,10 @@ DEFINE_bool(show_alr_state,
false,
"Show the state ALR state on the total bitrate graph");
DEFINE_bool(parse_unconfigured_header_extensions,
true,
"Attempt to parse unconfigured header extensions using the default "
"WebRTC mapping. This can give very misleading results if the "
"application negotiates a different mapping.");
DEFINE_bool(print_triage_alerts,
false,
"Print triage alerts, i.e. a list of potential problems.");
DEFINE_bool(
print_triage_notifications,
false,
"Print triage notifications, i.e. a list of suspicious looking events.");
void SetAllPlotFlags(bool setting);
@ -214,13 +209,7 @@ int main(int argc, char* argv[]) {
std::string filename = argv[1];
webrtc::ParsedRtcEventLog::UnconfiguredHeaderExtensions header_extensions =
webrtc::ParsedRtcEventLog::UnconfiguredHeaderExtensions::kDontParse;
if (FLAG_parse_unconfigured_header_extensions) {
header_extensions = webrtc::ParsedRtcEventLog::
UnconfiguredHeaderExtensions::kAttemptWebrtcDefaultConfig;
}
webrtc::ParsedRtcEventLog parsed_log(header_extensions);
webrtc::ParsedRtcEventLog parsed_log;
if (!parsed_log.ParseFile(filename)) {
std::cerr << "Could not parse the entire log file." << std::endl;
@ -229,34 +218,31 @@ int main(int argc, char* argv[]) {
<< std::endl;
}
webrtc::EventLogAnalyzer analyzer(parsed_log);
std::unique_ptr<webrtc::PlotCollection> collection(
new webrtc::PythonPlotCollection());
webrtc::plotting::EventLogAnalyzer analyzer(parsed_log);
std::unique_ptr<webrtc::plotting::PlotCollection> collection(
new webrtc::plotting::PythonPlotCollection());
if (FLAG_plot_incoming_packet_sizes) {
analyzer.CreatePacketGraph(webrtc::kIncomingPacket,
analyzer.CreatePacketGraph(webrtc::PacketDirection::kIncomingPacket,
collection->AppendNewPlot());
}
if (FLAG_plot_outgoing_packet_sizes) {
analyzer.CreatePacketGraph(webrtc::kOutgoingPacket,
analyzer.CreatePacketGraph(webrtc::PacketDirection::kOutgoingPacket,
collection->AppendNewPlot());
}
if (FLAG_plot_incoming_packet_count) {
analyzer.CreateAccumulatedPacketsGraph(webrtc::kIncomingPacket,
collection->AppendNewPlot());
analyzer.CreateAccumulatedPacketsGraph(
webrtc::PacketDirection::kIncomingPacket, collection->AppendNewPlot());
}
if (FLAG_plot_outgoing_packet_count) {
analyzer.CreateAccumulatedPacketsGraph(webrtc::kOutgoingPacket,
collection->AppendNewPlot());
analyzer.CreateAccumulatedPacketsGraph(
webrtc::PacketDirection::kOutgoingPacket, collection->AppendNewPlot());
}
if (FLAG_plot_audio_playout) {
analyzer.CreatePlayoutGraph(collection->AppendNewPlot());
}
if (FLAG_plot_audio_level) {
analyzer.CreateAudioLevelGraph(webrtc::kIncomingPacket,
collection->AppendNewPlot());
analyzer.CreateAudioLevelGraph(webrtc::kOutgoingPacket,
collection->AppendNewPlot());
analyzer.CreateAudioLevelGraph(collection->AppendNewPlot());
}
if (FLAG_plot_incoming_sequence_number_delta) {
analyzer.CreateSequenceNumberGraph(collection->AppendNewPlot());
@ -271,19 +257,23 @@ int main(int argc, char* argv[]) {
analyzer.CreateIncomingPacketLossGraph(collection->AppendNewPlot());
}
if (FLAG_plot_incoming_bitrate) {
analyzer.CreateTotalIncomingBitrateGraph(collection->AppendNewPlot());
analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kIncomingPacket,
collection->AppendNewPlot(),
FLAG_show_detector_state,
FLAG_show_alr_state);
}
if (FLAG_plot_outgoing_bitrate) {
analyzer.CreateTotalOutgoingBitrateGraph(collection->AppendNewPlot(),
FLAG_show_detector_state,
FLAG_show_alr_state);
analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kOutgoingPacket,
collection->AppendNewPlot(),
FLAG_show_detector_state,
FLAG_show_alr_state);
}
if (FLAG_plot_incoming_stream_bitrate) {
analyzer.CreateStreamBitrateGraph(webrtc::kIncomingPacket,
analyzer.CreateStreamBitrateGraph(webrtc::PacketDirection::kIncomingPacket,
collection->AppendNewPlot());
}
if (FLAG_plot_outgoing_stream_bitrate) {
analyzer.CreateStreamBitrateGraph(webrtc::kOutgoingPacket,
analyzer.CreateStreamBitrateGraph(webrtc::PacketDirection::kOutgoingPacket,
collection->AppendNewPlot());
}
if (FLAG_plot_simulated_receiveside_bwe) {
@ -299,10 +289,7 @@ int main(int argc, char* argv[]) {
analyzer.CreateFractionLossGraph(collection->AppendNewPlot());
}
if (FLAG_plot_timestamps) {
analyzer.CreateTimestampGraph(webrtc::kIncomingPacket,
collection->AppendNewPlot());
analyzer.CreateTimestampGraph(webrtc::kOutgoingPacket,
collection->AppendNewPlot());
analyzer.CreateTimestampGraph(collection->AppendNewPlot());
}
if (FLAG_plot_pacer_delay) {
analyzer.CreatePacerDelayGraph(collection->AppendNewPlot());
@ -346,7 +333,7 @@ int main(int argc, char* argv[]) {
collection->Draw();
if (FLAG_print_triage_alerts) {
if (FLAG_print_triage_notifications) {
analyzer.CreateTriageNotifications();
analyzer.PrintNotifications(stderr);
}

View File

@ -15,6 +15,7 @@
#include "rtc_base/checks.h"
namespace webrtc {
namespace plotting {
void Plot::SetXAxis(float min_value,
float max_value,
@ -84,4 +85,5 @@ void Plot::AppendTimeSeriesIfNotEmpty(TimeSeries&& time_series) {
}
}
} // namespace plotting
} // namespace webrtc

View File

@ -16,6 +16,7 @@
#include <vector>
namespace webrtc {
namespace plotting {
enum class LineStyle {
kNone, // No line connecting the points. Used to create scatter plots.
@ -172,6 +173,7 @@ class PlotCollection {
std::vector<std::unique_ptr<Plot> > plots_;
};
} // namespace plotting
} // namespace webrtc
#endif // RTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_BASE_H_

View File

@ -13,6 +13,7 @@
#include <memory>
namespace webrtc {
namespace plotting {
ProtobufPlot::ProtobufPlot() {}
@ -82,4 +83,5 @@ Plot* ProtobufPlotCollection::AppendNewPlot() {
return plot;
}
} // namespace plotting
} // namespace webrtc

View File

@ -17,6 +17,7 @@ RTC_POP_IGNORING_WUNDEF()
#include "rtc_tools/event_log_visualizer/plot_base.h"
namespace webrtc {
namespace plotting {
class ProtobufPlot final : public Plot {
public:
@ -35,6 +36,7 @@ class ProtobufPlotCollection final : public PlotCollection {
void ExportProtobuf(webrtc::analytics::ChartCollection* collection);
};
} // namespace plotting
} // namespace webrtc
#endif // RTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PROTOBUF_H_

View File

@ -17,6 +17,7 @@
#include "rtc_base/checks.h"
namespace webrtc {
namespace plotting {
PythonPlot::PythonPlot() {}
@ -179,4 +180,5 @@ Plot* PythonPlotCollection::AppendNewPlot() {
return plot;
}
} // namespace plotting
} // namespace webrtc

View File

@ -13,6 +13,7 @@
#include "rtc_tools/event_log_visualizer/plot_base.h"
namespace webrtc {
namespace plotting {
class PythonPlot final : public Plot {
public:
@ -29,6 +30,7 @@ class PythonPlotCollection final : public PlotCollection {
Plot* AppendNewPlot() override;
};
} // namespace plotting
} // namespace webrtc
#endif // RTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PYTHON_H_

View File

@ -14,136 +14,130 @@
#include <string>
namespace webrtc {
namespace plotting {
class IncomingRtpReceiveTimeGap {
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 {
public:
IncomingRtpReceiveTimeGap(float time_seconds, int64_t duration)
: time_seconds_(time_seconds), duration_(duration) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
: TriageNotification(time_seconds), duration_(duration) {}
std::string ToString() {
return std::string("No RTP packets received for ") +
std::to_string(duration_) + std::string(" ms");
}
private:
float time_seconds_;
int64_t duration_;
};
class IncomingRtcpReceiveTimeGap {
class IncomingRtcpReceiveTimeGap : public TriageNotification {
public:
IncomingRtcpReceiveTimeGap(float time_seconds, int64_t duration)
: time_seconds_(time_seconds), duration_(duration) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
: TriageNotification(time_seconds), duration_(duration) {}
std::string ToString() {
return std::string("No RTCP packets received for ") +
std::to_string(duration_) + std::string(" ms");
}
private:
float time_seconds_;
int64_t duration_;
};
class OutgoingRtpSendTimeGap {
class OutgoingRtpSendTimeGap : public TriageNotification {
public:
OutgoingRtpSendTimeGap(float time_seconds, int64_t duration)
: time_seconds_(time_seconds), duration_(duration) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
: TriageNotification(time_seconds), duration_(duration) {}
std::string ToString() {
return std::string("No RTP packets sent for ") + std::to_string(duration_) +
std::string(" ms");
}
private:
float time_seconds_;
int64_t duration_;
};
class OutgoingRtcpSendTimeGap {
class OutgoingRtcpSendTimeGap : public TriageNotification {
public:
OutgoingRtcpSendTimeGap(float time_seconds, int64_t duration)
: time_seconds_(time_seconds), duration_(duration) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
: TriageNotification(time_seconds), duration_(duration) {}
std::string ToString() {
return std::string("No RTCP packets sent for ") +
std::to_string(duration_) + std::string(" ms");
}
private:
float time_seconds_;
int64_t duration_;
};
class IncomingSeqNumJump {
class IncomingSeqNoJump : public TriageNotification {
public:
IncomingSeqNumJump(float time_seconds, uint32_t ssrc)
: time_seconds_(time_seconds), ssrc_(ssrc) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
IncomingSeqNoJump(float time_seconds, uint32_t ssrc)
: TriageNotification(time_seconds), ssrc_(ssrc) {}
std::string ToString() {
return std::string("Sequence number jumps on incoming SSRC ") +
std::to_string(ssrc_);
}
private:
float time_seconds_;
uint32_t ssrc_;
};
class IncomingCaptureTimeJump {
class IncomingCaptureTimeJump : public TriageNotification {
public:
IncomingCaptureTimeJump(float time_seconds, uint32_t ssrc)
: time_seconds_(time_seconds), ssrc_(ssrc) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
: TriageNotification(time_seconds), ssrc_(ssrc) {}
std::string ToString() {
return std::string("Capture timestamp jumps on incoming SSRC ") +
std::to_string(ssrc_);
}
private:
float time_seconds_;
uint32_t ssrc_;
};
class OutgoingSeqNoJump {
class OutgoingSeqNoJump : public TriageNotification {
public:
OutgoingSeqNoJump(float time_seconds, uint32_t ssrc)
: time_seconds_(time_seconds), ssrc_(ssrc) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
: TriageNotification(time_seconds), ssrc_(ssrc) {}
std::string ToString() {
return std::string("Sequence number jumps on outgoing SSRC ") +
std::to_string(ssrc_);
}
private:
float time_seconds_;
uint32_t ssrc_;
};
class OutgoingCaptureTimeJump {
class OutgoingCaptureTimeJump : public TriageNotification {
public:
OutgoingCaptureTimeJump(float time_seconds, uint32_t ssrc)
: time_seconds_(time_seconds), ssrc_(ssrc) {}
float Time() const { return time_seconds_; }
std::string ToString() const {
: TriageNotification(time_seconds), ssrc_(ssrc) {}
std::string ToString() {
return std::string("Capture timestamp jumps on outgoing SSRC ") +
std::to_string(ssrc_);
}
private:
float time_seconds_;
uint32_t ssrc_;
};
class OutgoingHighLoss {
class OutgoingHighLoss : public TriageNotification {
public:
explicit OutgoingHighLoss(double avg_loss_fraction)
: avg_loss_fraction_(avg_loss_fraction) {}
std::string ToString() const {
std::string ToString() {
return std::string("High average loss (") +
std::to_string(avg_loss_fraction_ * 100) +
std::string("%) across the call.");
@ -153,6 +147,7 @@ class OutgoingHighLoss {
double avg_loss_fraction_;
};
} // namespace plotting
} // namespace webrtc
#endif // RTC_TOOLS_EVENT_LOG_VISUALIZER_TRIAGE_NOTIFICATIONS_H_