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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 webrtc::MediaType media_type_; | 60 webrtc::MediaType media_type_; |
61 }; | 61 }; |
62 | 62 |
63 struct LoggedRtpPacket { | 63 struct LoggedRtpPacket { |
64 LoggedRtpPacket(uint64_t timestamp, RTPHeader header) | 64 LoggedRtpPacket(uint64_t timestamp, RTPHeader header) |
65 : timestamp(timestamp), header(header) {} | 65 : timestamp(timestamp), header(header) {} |
66 uint64_t timestamp; | 66 uint64_t timestamp; |
67 RTPHeader header; | 67 RTPHeader header; |
68 }; | 68 }; |
69 | 69 |
| 70 struct BwePacketLossEvent { |
| 71 BwePacketLossEvent(uint64_t timestamp, |
| 72 int32_t new_bitrate, |
| 73 uint8_t fraction_loss, |
| 74 int expected_packets) |
| 75 : timestamp(timestamp), |
| 76 new_bitrate(new_bitrate), |
| 77 fraction_loss(fraction_loss), |
| 78 expected_packets(expected_packets) {} |
| 79 uint64_t timestamp; |
| 80 int32_t new_bitrate; |
| 81 uint8_t fraction_loss; |
| 82 int32_t expected_packets; |
| 83 }; |
| 84 |
70 const ParsedRtcEventLog& parsed_log_; | 85 const ParsedRtcEventLog& parsed_log_; |
71 | 86 |
72 // A list of SSRCs we are interested in analysing. | 87 // A list of SSRCs we are interested in analysing. |
73 // If left empty, all SSRCs will be considered relevant. | 88 // If left empty, all SSRCs will be considered relevant. |
74 std::vector<uint32_t> desired_ssrc_; | 89 std::vector<uint32_t> desired_ssrc_; |
75 | 90 |
76 // Maps a stream identifier consisting of ssrc, direction and MediaType | 91 // Maps a stream identifier consisting of ssrc, direction and MediaType |
77 // to the parsed RTP headers in that stream. Header extensions are parsed | 92 // to the parsed RTP headers in that stream. Header extensions are parsed |
78 // if the stream has been configured. | 93 // if the stream has been configured. |
79 std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_; | 94 std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_; |
80 | 95 |
| 96 // A list of all updates from the send-side loss-based bandwidth estimator. |
| 97 std::vector<BwePacketLossEvent> bwe_loss_updates_; |
| 98 |
81 // Window and step size used for calculating moving averages, e.g. bitrate. | 99 // Window and step size used for calculating moving averages, e.g. bitrate. |
82 // The generated data points will be |step_| microseconds apart. | 100 // The generated data points will be |step_| microseconds apart. |
83 // Only events occuring at most |window_duration_| microseconds before the | 101 // Only events occuring at most |window_duration_| microseconds before the |
84 // current data point will be part of the average. | 102 // current data point will be part of the average. |
85 uint64_t window_duration_; | 103 uint64_t window_duration_; |
86 uint64_t step_; | 104 uint64_t step_; |
87 | 105 |
88 // First and last events of the log. | 106 // First and last events of the log. |
89 uint64_t begin_time_; | 107 uint64_t begin_time_; |
90 uint64_t end_time_; | 108 uint64_t end_time_; |
91 }; | 109 }; |
92 | 110 |
93 } // namespace plotting | 111 } // namespace plotting |
94 } // namespace webrtc | 112 } // namespace webrtc |
95 | 113 |
96 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ | 114 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
OLD | NEW |