Visualize delay changes based on both abs-send-time and capture time.
Adds reusable template function objects to extract interesting
statistics from data sets. A few more of these will be added later
to reduce the code size.
Review-Url: https://codereview.webrtc.org/2220383004
Cr-Commit-Position: refs/heads/master@{#13713}
diff --git a/webrtc/tools/event_log_visualizer/analyzer.h b/webrtc/tools/event_log_visualizer/analyzer.h
index ce2179f..4a1a2d6 100644
--- a/webrtc/tools/event_log_visualizer/analyzer.h
+++ b/webrtc/tools/event_log_visualizer/analyzer.h
@@ -25,6 +25,31 @@
namespace webrtc {
namespace plotting {
+struct LoggedRtpPacket {
+ LoggedRtpPacket(uint64_t timestamp, RTPHeader header, size_t total_length)
+ : timestamp(timestamp), header(header), total_length(total_length) {}
+ uint64_t timestamp;
+ RTPHeader header;
+ 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 BwePacketLossEvent {
+ uint64_t timestamp;
+ int32_t new_bitrate;
+ uint8_t fraction_loss;
+ int32_t expected_packets;
+};
+
class EventLogAnalyzer {
public:
// The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the
@@ -73,33 +98,6 @@
webrtc::PacketDirection direction_;
};
- struct LoggedRtpPacket {
- LoggedRtpPacket(uint64_t timestamp, RTPHeader header, size_t total_length)
- : timestamp(timestamp), header(header), total_length(total_length) {}
- uint64_t timestamp;
- RTPHeader header;
- 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 BwePacketLossEvent {
- uint64_t timestamp;
- int32_t new_bitrate;
- uint8_t fraction_loss;
- int32_t expected_packets;
- };
-
bool IsRtxSsrc(StreamId stream_id);
bool IsVideoSsrc(StreamId stream_id);