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

Unified Diff: webrtc/tools/event_log_visualizer/analyzer.h

Issue 2145153002: Event log visualization tool keeps a map from SSRC to parsed headers (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Nit Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/tools/event_log_visualizer/analyzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/event_log_visualizer/analyzer.h
diff --git a/webrtc/tools/event_log_visualizer/analyzer.h b/webrtc/tools/event_log_visualizer/analyzer.h
index 08fcd5c99f2db410cb5515297651b81faebfb0f3..9b69ff12630d9186ef8c964fc5fb00b3d670a5f2 100644
--- a/webrtc/tools/event_log_visualizer/analyzer.h
+++ b/webrtc/tools/event_log_visualizer/analyzer.h
@@ -12,6 +12,7 @@
#define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_
#include <vector>
+#include <map>
#include "webrtc/call/rtc_event_log_parser.h"
#include "webrtc/tools/event_log_visualizer/plot_base.h"
@@ -41,12 +42,42 @@ class EventLogAnalyzer {
void CreateStreamBitrateGraph(PacketDirection desired_direction, Plot* plot);
private:
+ class StreamId {
+ public:
+ StreamId(uint32_t ssrc,
+ webrtc::PacketDirection direction,
+ webrtc::MediaType media_type)
+ : ssrc_(ssrc), direction_(direction), media_type_(media_type) {}
+ bool operator<(const StreamId& other) const;
+ bool operator==(const StreamId& other) const;
+ uint32_t GetSsrc() const { return ssrc_; }
+ webrtc::PacketDirection GetDirection() const { return direction_; }
+ webrtc::MediaType GetMediaType() const { return media_type_; }
+
+ private:
+ uint32_t ssrc_;
+ webrtc::PacketDirection direction_;
+ webrtc::MediaType media_type_;
+ };
+
+ struct LoggedRtpPacket {
+ LoggedRtpPacket(uint64_t timestamp, RTPHeader header)
+ : timestamp(timestamp), header(header) {}
+ uint64_t timestamp;
+ RTPHeader header;
+ };
+
const ParsedRtcEventLog& parsed_log_;
// A list of SSRCs we are interested in analysing.
// If left empty, all SSRCs will be considered relevant.
std::vector<uint32_t> desired_ssrc_;
+ // Maps a stream identifier consisting of ssrc, direction and MediaType
+ // to the parsed RTP headers in that stream. Header extensions are parsed
+ // if the stream has been configured.
+ std::map<StreamId, std::vector<LoggedRtpPacket>> rtp_packets_;
+
// Window and step size used for calculating moving averages, e.g. bitrate.
// The generated data points will be |step_| microseconds apart.
// Only events occuring at most |window_duration_| microseconds before the
« no previous file with comments | « no previous file | webrtc/tools/event_log_visualizer/analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698