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

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

Issue 2207453003: Track SSRCs configured for each media type in event log visualization tool. (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 side-by-side diff with in-line comments
Download patch
Index: webrtc/tools/event_log_visualizer/analyzer.cc
diff --git a/webrtc/tools/event_log_visualizer/analyzer.cc b/webrtc/tools/event_log_visualizer/analyzer.cc
index c97a30fc0ebc8dc8ddee49372d3491f62ccdcb02..b61fdb445782865bf24568776ba11638b40e7cc6 100644
--- a/webrtc/tools/event_log_visualizer/analyzer.cc
+++ b/webrtc/tools/event_log_visualizer/analyzer.cc
@@ -100,7 +100,7 @@ constexpr float kTopMargin = 0.05f;
} // namespace
-bool EventLogAnalyzer::StreamId::operator<(const StreamId& other) const {
+bool StreamId::operator<(const StreamId& other) const {
if (ssrc_ < other.ssrc_) {
return true;
}
@@ -112,7 +112,7 @@ bool EventLogAnalyzer::StreamId::operator<(const StreamId& other) const {
return false;
}
-bool EventLogAnalyzer::StreamId::operator==(const StreamId& other) const {
+bool StreamId::operator==(const StreamId& other) const {
return ssrc_ == other.ssrc_ && direction_ == other.direction_;
}
@@ -151,10 +151,13 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
StreamId stream(config.rtp.remote_ssrc, kIncomingPacket);
RegisterHeaderExtensions(config.rtp.extensions,
&extension_maps[stream]);
+ video_ssrcs_.insert(stream);
for (auto kv : config.rtp.rtx) {
StreamId rtx_stream(kv.second.ssrc, kIncomingPacket);
RegisterHeaderExtensions(config.rtp.extensions,
&extension_maps[rtx_stream]);
+ video_ssrcs_.insert(rtx_stream);
+ rtx_ssrcs_.insert(rtx_stream);
}
break;
}
@@ -165,11 +168,14 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
StreamId stream(ssrc, kOutgoingPacket);
RegisterHeaderExtensions(config.rtp.extensions,
&extension_maps[stream]);
+ video_ssrcs_.insert(stream);
}
for (auto ssrc : config.rtp.rtx.ssrcs) {
- StreamId stream(ssrc, kOutgoingPacket);
+ StreamId rtx_stream(ssrc, kOutgoingPacket);
RegisterHeaderExtensions(config.rtp.extensions,
- &extension_maps[stream]);
+ &extension_maps[rtx_stream]);
+ video_ssrcs_.insert(rtx_stream);
+ rtx_ssrcs_.insert(rtx_stream);
}
break;
}
@@ -303,6 +309,18 @@ class BitrateObserver : public CongestionController::Observer,
bool bitrate_updated_;
};
+bool EventLogAnalyzer::IsRtxSsrc(StreamId stream_id) {
+ return (rtx_ssrcs_.count(stream_id) == 1);
stefan-webrtc 2016/08/04 14:22:55 I think you can remove (). I'd also prefer using
terelius 2016/08/05 12:24:57 Removed the parenthesis. I prefer count() since th
+}
+
+bool EventLogAnalyzer::IsVideoSsrc(StreamId stream_id) {
+ return (video_ssrcs_.count(stream_id) == 1);
+}
+
+bool EventLogAnalyzer::IsAudioSsrc(StreamId stream_id) {
+ return (audio_ssrcs_.count(stream_id) == 1);
+}
+
void EventLogAnalyzer::CreatePacketGraph(PacketDirection desired_direction,
Plot* plot) {
std::map<uint32_t, TimeSeries> time_series;
« webrtc/tools/event_log_visualizer/analyzer.h ('K') | « webrtc/tools/event_log_visualizer/analyzer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698