OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ | 11 #ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
12 #define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ | 12 #define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
13 | 13 |
14 #include <vector> | |
15 #include <map> | 14 #include <map> |
16 #include <memory> | 15 #include <memory> |
17 #include <set> | 16 #include <set> |
| 17 #include <string> |
18 #include <utility> | 18 #include <utility> |
| 19 #include <vector> |
19 | 20 |
20 #include "webrtc/call/rtc_event_log_parser.h" | 21 #include "webrtc/call/rtc_event_log_parser.h" |
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 22 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" | 23 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" |
23 #include "webrtc/tools/event_log_visualizer/plot_base.h" | 24 #include "webrtc/tools/event_log_visualizer/plot_base.h" |
24 | 25 |
25 namespace webrtc { | 26 namespace webrtc { |
26 namespace plotting { | 27 namespace plotting { |
27 | 28 |
28 struct LoggedRtpPacket { | 29 struct LoggedRtpPacket { |
(...skipping 24 matching lines...) Expand all Loading... |
53 | 54 |
54 class EventLogAnalyzer { | 55 class EventLogAnalyzer { |
55 public: | 56 public: |
56 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the | 57 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the |
57 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or | 58 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or |
58 // modified while the EventLogAnalyzer is being used. | 59 // modified while the EventLogAnalyzer is being used. |
59 explicit EventLogAnalyzer(const ParsedRtcEventLog& log); | 60 explicit EventLogAnalyzer(const ParsedRtcEventLog& log); |
60 | 61 |
61 void CreatePacketGraph(PacketDirection desired_direction, Plot* plot); | 62 void CreatePacketGraph(PacketDirection desired_direction, Plot* plot); |
62 | 63 |
| 64 void CreateAccumulatedPacketsGraph(PacketDirection desired_direction, |
| 65 Plot* plot); |
| 66 |
63 void CreatePlayoutGraph(Plot* plot); | 67 void CreatePlayoutGraph(Plot* plot); |
64 | 68 |
65 void CreateSequenceNumberGraph(Plot* plot); | 69 void CreateSequenceNumberGraph(Plot* plot); |
66 | 70 |
67 void CreateDelayChangeGraph(Plot* plot); | 71 void CreateDelayChangeGraph(Plot* plot); |
68 | 72 |
69 void CreateAccumulatedDelayChangeGraph(Plot* plot); | 73 void CreateAccumulatedDelayChangeGraph(Plot* plot); |
70 | 74 |
71 void CreateFractionLossGraph(Plot* plot); | 75 void CreateFractionLossGraph(Plot* plot); |
72 | 76 |
(...skipping 19 matching lines...) Expand all Loading... |
92 std::tie(other.ssrc_, other.direction_); | 96 std::tie(other.ssrc_, other.direction_); |
93 } | 97 } |
94 uint32_t GetSsrc() const { return ssrc_; } | 98 uint32_t GetSsrc() const { return ssrc_; } |
95 webrtc::PacketDirection GetDirection() const { return direction_; } | 99 webrtc::PacketDirection GetDirection() const { return direction_; } |
96 | 100 |
97 private: | 101 private: |
98 uint32_t ssrc_; | 102 uint32_t ssrc_; |
99 webrtc::PacketDirection direction_; | 103 webrtc::PacketDirection direction_; |
100 }; | 104 }; |
101 | 105 |
| 106 template <typename T> |
| 107 void CreateAccumulatedPacketsTimeSeries( |
| 108 PacketDirection desired_direction, |
| 109 Plot* plot, |
| 110 const std::map<StreamId, std::vector<T>>& packets, |
| 111 const std::string& label_prefix); |
| 112 |
102 bool IsRtxSsrc(StreamId stream_id); | 113 bool IsRtxSsrc(StreamId stream_id); |
103 | 114 |
104 bool IsVideoSsrc(StreamId stream_id); | 115 bool IsVideoSsrc(StreamId stream_id); |
105 | 116 |
106 bool IsAudioSsrc(StreamId stream_id); | 117 bool IsAudioSsrc(StreamId stream_id); |
107 | 118 |
108 const ParsedRtcEventLog& parsed_log_; | 119 const ParsedRtcEventLog& parsed_log_; |
109 | 120 |
110 // A list of SSRCs we are interested in analysing. | 121 // A list of SSRCs we are interested in analysing. |
111 // If left empty, all SSRCs will be considered relevant. | 122 // If left empty, all SSRCs will be considered relevant. |
(...skipping 30 matching lines...) Expand all Loading... |
142 uint64_t end_time_; | 153 uint64_t end_time_; |
143 | 154 |
144 // Duration (in seconds) of log file. | 155 // Duration (in seconds) of log file. |
145 float call_duration_s_; | 156 float call_duration_s_; |
146 }; | 157 }; |
147 | 158 |
148 } // namespace plotting | 159 } // namespace plotting |
149 } // namespace webrtc | 160 } // namespace webrtc |
150 | 161 |
151 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ | 162 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
OLD | NEW |