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

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

Issue 2220383004: Visualize delay changes based on both abs-send-time and capture time. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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
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> 14 #include <vector>
15 #include <map> 15 #include <map>
16 #include <memory> 16 #include <memory>
17 #include <set> 17 #include <set>
18 #include <utility> 18 #include <utility>
19 19
20 #include "webrtc/call/rtc_event_log_parser.h" 20 #include "webrtc/call/rtc_event_log_parser.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" 22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
23 #include "webrtc/tools/event_log_visualizer/plot_base.h" 23 #include "webrtc/tools/event_log_visualizer/plot_base.h"
24 24
25 namespace webrtc { 25 namespace webrtc {
26 namespace plotting { 26 namespace plotting {
27 27
28 struct LoggedRtpPacket {
29 LoggedRtpPacket(uint64_t timestamp, RTPHeader header, size_t total_length)
30 : timestamp(timestamp), header(header), total_length(total_length) {}
31 uint64_t timestamp;
32 RTPHeader header;
33 size_t total_length;
34 };
35
28 class EventLogAnalyzer { 36 class EventLogAnalyzer {
29 public: 37 public:
30 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the 38 // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the
31 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or 39 // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or
32 // modified while the EventLogAnalyzer is being used. 40 // modified while the EventLogAnalyzer is being used.
33 explicit EventLogAnalyzer(const ParsedRtcEventLog& log); 41 explicit EventLogAnalyzer(const ParsedRtcEventLog& log);
34 42
35 void CreatePacketGraph(PacketDirection desired_direction, Plot* plot); 43 void CreatePacketGraph(PacketDirection desired_direction, Plot* plot);
36 44
37 void CreatePlayoutGraph(Plot* plot); 45 void CreatePlayoutGraph(Plot* plot);
(...skipping 28 matching lines...) Expand all
66 std::tie(other.ssrc_, other.direction_); 74 std::tie(other.ssrc_, other.direction_);
67 } 75 }
68 uint32_t GetSsrc() const { return ssrc_; } 76 uint32_t GetSsrc() const { return ssrc_; }
69 webrtc::PacketDirection GetDirection() const { return direction_; } 77 webrtc::PacketDirection GetDirection() const { return direction_; }
70 78
71 private: 79 private:
72 uint32_t ssrc_; 80 uint32_t ssrc_;
73 webrtc::PacketDirection direction_; 81 webrtc::PacketDirection direction_;
74 }; 82 };
75 83
76 struct LoggedRtpPacket {
77 LoggedRtpPacket(uint64_t timestamp, RTPHeader header, size_t total_length)
78 : timestamp(timestamp), header(header), total_length(total_length) {}
79 uint64_t timestamp;
80 RTPHeader header;
81 size_t total_length;
82 };
83
84 struct LoggedRtcpPacket { 84 struct LoggedRtcpPacket {
stefan-webrtc 2016/08/09 11:43:17 Maybe move this out too for consistency?
terelius 2016/08/09 12:04:27 Done. Also moved BwePacketLossEvent.
85 LoggedRtcpPacket(uint64_t timestamp, 85 LoggedRtcpPacket(uint64_t timestamp,
86 RTCPPacketType rtcp_type, 86 RTCPPacketType rtcp_type,
87 std::unique_ptr<rtcp::RtcpPacket> rtcp_packet) 87 std::unique_ptr<rtcp::RtcpPacket> rtcp_packet)
88 : timestamp(timestamp), 88 : timestamp(timestamp),
89 type(rtcp_type), 89 type(rtcp_type),
90 packet(std::move(rtcp_packet)) {} 90 packet(std::move(rtcp_packet)) {}
91 uint64_t timestamp; 91 uint64_t timestamp;
92 RTCPPacketType type; 92 RTCPPacketType type;
93 std::unique_ptr<rtcp::RtcpPacket> packet; 93 std::unique_ptr<rtcp::RtcpPacket> packet;
94 }; 94 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 uint64_t end_time_; 143 uint64_t end_time_;
144 144
145 // Duration (in seconds) of log file. 145 // Duration (in seconds) of log file.
146 float call_duration_s_; 146 float call_duration_s_;
147 }; 147 };
148 148
149 } // namespace plotting 149 } // namespace plotting
150 } // namespace webrtc 150 } // namespace webrtc
151 151
152 #endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ 152 #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