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 |
(...skipping 27 matching lines...) Expand all Loading... |
38 struct LoggedRtcpPacket { | 38 struct LoggedRtcpPacket { |
39 LoggedRtcpPacket(uint64_t timestamp, | 39 LoggedRtcpPacket(uint64_t timestamp, |
40 RTCPPacketType rtcp_type, | 40 RTCPPacketType rtcp_type, |
41 std::unique_ptr<rtcp::RtcpPacket> rtcp_packet) | 41 std::unique_ptr<rtcp::RtcpPacket> rtcp_packet) |
42 : timestamp(timestamp), type(rtcp_type), packet(std::move(rtcp_packet)) {} | 42 : timestamp(timestamp), type(rtcp_type), packet(std::move(rtcp_packet)) {} |
43 uint64_t timestamp; | 43 uint64_t timestamp; |
44 RTCPPacketType type; | 44 RTCPPacketType type; |
45 std::unique_ptr<rtcp::RtcpPacket> packet; | 45 std::unique_ptr<rtcp::RtcpPacket> packet; |
46 }; | 46 }; |
47 | 47 |
48 struct BwePacketLossEvent { | 48 struct LossBasedBweUpdate { |
49 uint64_t timestamp; | 49 uint64_t timestamp; |
50 int32_t new_bitrate; | 50 int32_t new_bitrate; |
51 uint8_t fraction_loss; | 51 uint8_t fraction_loss; |
52 int32_t expected_packets; | 52 int32_t expected_packets; |
53 }; | 53 }; |
54 | 54 |
55 class EventLogAnalyzer { | 55 class EventLogAnalyzer { |
56 public: | 56 public: |
57 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the | 57 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the |
58 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or | 58 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 std::set<StreamId> audio_ssrcs_; | 143 std::set<StreamId> audio_ssrcs_; |
144 | 144 |
145 // Maps a stream identifier consisting of ssrc and direction to the parsed | 145 // Maps a stream identifier consisting of ssrc and direction to the parsed |
146 // RTP headers in that stream. Header extensions are parsed if the stream | 146 // RTP headers in that stream. Header extensions are parsed if the stream |
147 // has been configured. | 147 // has been configured. |
148 std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_; | 148 std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_; |
149 | 149 |
150 std::map<StreamId, std::vector<LoggedRtcpPacket>> rtcp_packets_; | 150 std::map<StreamId, std::vector<LoggedRtcpPacket>> rtcp_packets_; |
151 | 151 |
152 // A list of all updates from the send-side loss-based bandwidth estimator. | 152 // A list of all updates from the send-side loss-based bandwidth estimator. |
153 std::vector<BwePacketLossEvent> bwe_loss_updates_; | 153 std::vector<LossBasedBweUpdate> bwe_loss_updates_; |
154 | 154 |
155 // Window and step size used for calculating moving averages, e.g. bitrate. | 155 // Window and step size used for calculating moving averages, e.g. bitrate. |
156 // The generated data points will be |step_| microseconds apart. | 156 // The generated data points will be |step_| microseconds apart. |
157 // Only events occuring at most |window_duration_| microseconds before the | 157 // Only events occuring at most |window_duration_| microseconds before the |
158 // current data point will be part of the average. | 158 // current data point will be part of the average. |
159 uint64_t window_duration_; | 159 uint64_t window_duration_; |
160 uint64_t step_; | 160 uint64_t step_; |
161 | 161 |
162 // First and last events of the log. | 162 // First and last events of the log. |
163 uint64_t begin_time_; | 163 uint64_t begin_time_; |
164 uint64_t end_time_; | 164 uint64_t end_time_; |
165 | 165 |
166 // Duration (in seconds) of log file. | 166 // Duration (in seconds) of log file. |
167 float call_duration_s_; | 167 float call_duration_s_; |
168 }; | 168 }; |
169 | 169 |
170 } // namespace plotting | 170 } // namespace plotting |
171 } // namespace webrtc | 171 } // namespace webrtc |
172 | 172 |
173 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ | 173 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
OLD | NEW |