Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: webrtc/tools/event_log_visualizer/analyzer.h

Issue 2695613005: Add ana config to event log visualiser (Closed)
Patch Set: Respond to comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 std::unique_ptr<rtcp::RtcpPacket> packet; 45 std::unique_ptr<rtcp::RtcpPacket> packet;
46 }; 46 };
47 47
48 struct BwePacketLossEvent { 48 struct BwePacketLossEvent {
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 struct AudioNetworkAdaptationEvent {
56 uint64_t timestamp;
57 AudioNetworkAdaptor::EncoderRuntimeConfig config;
58 };
59
55 class EventLogAnalyzer { 60 class EventLogAnalyzer {
56 public: 61 public:
57 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the 62 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the
58 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or 63 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or
59 // modified while the EventLogAnalyzer is being used. 64 // modified while the EventLogAnalyzer is being used.
60 explicit EventLogAnalyzer(const ParsedRtcEventLog& log); 65 explicit EventLogAnalyzer(const ParsedRtcEventLog& log);
61 66
62 void CreatePacketGraph(PacketDirection desired_direction, Plot* plot); 67 void CreatePacketGraph(PacketDirection desired_direction, Plot* plot);
63 68
64 void CreateAccumulatedPacketsGraph(PacketDirection desired_direction, 69 void CreateAccumulatedPacketsGraph(PacketDirection desired_direction,
(...skipping 15 matching lines...) Expand all
80 85
81 void CreateTotalBitrateGraph(PacketDirection desired_direction, Plot* plot); 86 void CreateTotalBitrateGraph(PacketDirection desired_direction, Plot* plot);
82 87
83 void CreateStreamBitrateGraph(PacketDirection desired_direction, Plot* plot); 88 void CreateStreamBitrateGraph(PacketDirection desired_direction, Plot* plot);
84 89
85 void CreateBweSimulationGraph(Plot* plot); 90 void CreateBweSimulationGraph(Plot* plot);
86 91
87 void CreateNetworkDelayFeedbackGraph(Plot* plot); 92 void CreateNetworkDelayFeedbackGraph(Plot* plot);
88 void CreateTimestampGraph(Plot* plot); 93 void CreateTimestampGraph(Plot* plot);
89 94
95 void CreateAudioEncoderTargetBitrateGraph(Plot* plot);
96 void CreateAudioEncoderFrameLengthGraph(Plot* plot);
97 void CreateAudioEncoderUplinkPacketLossFractionGraph(Plot* plot);
98 void CreateAudioEncoderEnableFecGraph(Plot* plot);
99 void CreateAudioEncoderEnableDtxGraph(Plot* plot);
100 void CreateAudioEncoderNumChannelsGraph(Plot* plot);
101
90 // Returns a vector of capture and arrival timestamps for the video frames 102 // Returns a vector of capture and arrival timestamps for the video frames
91 // of the stream with the most number of frames. 103 // of the stream with the most number of frames.
92 std::vector<std::pair<int64_t, int64_t>> GetFrameTimestamps() const; 104 std::vector<std::pair<int64_t, int64_t>> GetFrameTimestamps() const;
93 105
94 private: 106 private:
95 class StreamId { 107 class StreamId {
96 public: 108 public:
97 StreamId(uint32_t ssrc, webrtc::PacketDirection direction) 109 StreamId(uint32_t ssrc, webrtc::PacketDirection direction)
98 : ssrc_(ssrc), direction_(direction) {} 110 : ssrc_(ssrc), direction_(direction) {}
99 bool operator<(const StreamId& other) const { 111 bool operator<(const StreamId& other) const {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Maps a stream identifier consisting of ssrc and direction to the parsed 157 // 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 158 // RTP headers in that stream. Header extensions are parsed if the stream
147 // has been configured. 159 // has been configured.
148 std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_; 160 std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_;
149 161
150 std::map<StreamId, std::vector<LoggedRtcpPacket>> rtcp_packets_; 162 std::map<StreamId, std::vector<LoggedRtcpPacket>> rtcp_packets_;
151 163
152 // A list of all updates from the send-side loss-based bandwidth estimator. 164 // A list of all updates from the send-side loss-based bandwidth estimator.
153 std::vector<BwePacketLossEvent> bwe_loss_updates_; 165 std::vector<BwePacketLossEvent> bwe_loss_updates_;
154 166
167 std::vector<AudioNetworkAdaptationEvent> audio_network_adaptation_events_;
168
155 // Window and step size used for calculating moving averages, e.g. bitrate. 169 // Window and step size used for calculating moving averages, e.g. bitrate.
156 // The generated data points will be |step_| microseconds apart. 170 // The generated data points will be |step_| microseconds apart.
157 // Only events occuring at most |window_duration_| microseconds before the 171 // Only events occuring at most |window_duration_| microseconds before the
158 // current data point will be part of the average. 172 // current data point will be part of the average.
159 uint64_t window_duration_; 173 uint64_t window_duration_;
160 uint64_t step_; 174 uint64_t step_;
161 175
162 // First and last events of the log. 176 // First and last events of the log.
163 uint64_t begin_time_; 177 uint64_t begin_time_;
164 uint64_t end_time_; 178 uint64_t end_time_;
165 179
166 // Duration (in seconds) of log file. 180 // Duration (in seconds) of log file.
167 float call_duration_s_; 181 float call_duration_s_;
168 }; 182 };
169 183
170 } // namespace plotting 184 } // namespace plotting
171 } // namespace webrtc 185 } // namespace webrtc
172 186
173 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ 187 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/tools/event_log_visualizer/analyzer.cc » ('j') | webrtc/tools/event_log_visualizer/analyzer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698