OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
| 12 #define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
| 13 |
| 14 #include <vector> |
| 15 |
| 16 #include "webrtc/call/rtc_event_log_parser.h" |
| 17 #include "webrtc/tools/event_log_visualizer/plot_base.h" |
| 18 |
| 19 namespace webrtc { |
| 20 namespace plotting { |
| 21 |
| 22 class EventLogAnalyzer { |
| 23 public: |
| 24 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the |
| 25 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or |
| 26 // modified while the EventLogAnalyzer is being used. |
| 27 // By setting the flag |extra_info|, each point will be annotated by |
| 28 // some additional information about the point. The exact contents depends |
| 29 // on the graph. Adding this extra information requires more memory, but may |
| 30 // occasionally be useful. |
| 31 EventLogAnalyzer(const ParsedRtcEventLog& log, bool extra_info); |
| 32 |
| 33 void CreatePacketGraph(PacketDirection desired_direction, Plot* plot); |
| 34 |
| 35 void CreatePlayoutGraph(Plot* plot); |
| 36 |
| 37 void CreateSequenceNumberGraph(Plot* plot); |
| 38 |
| 39 void CreateDelayChangeGraph(Plot* plot); |
| 40 |
| 41 void CreateAccumulatedDelayChangeGraph(Plot* plot); |
| 42 |
| 43 void CreateTotalBitrateGraph(PacketDirection desired_direction, Plot* plot); |
| 44 |
| 45 void CreateStreamBitrateGraph(PacketDirection desired_direction, Plot* plot); |
| 46 |
| 47 private: |
| 48 const ParsedRtcEventLog& parsed_log_; |
| 49 |
| 50 // A list of SSRCs we are interested in analysing. |
| 51 // If left empty, all SSRCs will be considered relevant. |
| 52 std::vector<uint32_t> desired_ssrc_; |
| 53 |
| 54 // Flag to control whether each point should be annotated with additional |
| 55 // information. |
| 56 const bool extra_point_info_; |
| 57 |
| 58 // Window and step size used for calculating moving averages, e.g. bitrate. |
| 59 // The generated data points will be |step_| microseconds apart. |
| 60 // Only events occuring at most |window_duration_| microseconds before the |
| 61 // current data point will be part of the average. |
| 62 uint64_t window_duration_; |
| 63 uint64_t step_; |
| 64 |
| 65 // First and last events of the log. |
| 66 uint64_t begin_time_; |
| 67 uint64_t end_time_; |
| 68 }; |
| 69 |
| 70 } // namespace plotting |
| 71 } // namespace webrtc |
| 72 |
| 73 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ |
OLD | NEW |