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

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

Issue 2917873002: Refactored incoming bitrate estimator. (Closed)
Patch Set: Respond to comments Created 3 years, 6 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 24 matching lines...) Expand all
35 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" 35 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h"
36 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 36 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
37 #include "webrtc/video_receive_stream.h" 37 #include "webrtc/video_receive_stream.h"
38 #include "webrtc/video_send_stream.h" 38 #include "webrtc/video_send_stream.h"
39 39
40 namespace webrtc { 40 namespace webrtc {
41 namespace plotting { 41 namespace plotting {
42 42
43 namespace { 43 namespace {
44 44
45 class PacketFeedbackComparator {
46 public:
47 inline bool operator()(const webrtc::PacketFeedback& lhs,
48 const webrtc::PacketFeedback& rhs) {
49 if (lhs.arrival_time_ms != rhs.arrival_time_ms)
50 return lhs.arrival_time_ms < rhs.arrival_time_ms;
51 if (lhs.send_time_ms != rhs.send_time_ms)
52 return lhs.send_time_ms < rhs.send_time_ms;
53 return lhs.sequence_number < rhs.sequence_number;
54 }
55 };
56
57 void SortPacketFeedbackVector(std::vector<PacketFeedback>* vec) { 45 void SortPacketFeedbackVector(std::vector<PacketFeedback>* vec) {
58 auto pred = [](const PacketFeedback& packet_feedback) { 46 auto pred = [](const PacketFeedback& packet_feedback) {
59 return packet_feedback.arrival_time_ms == PacketFeedback::kNotReceived; 47 return packet_feedback.arrival_time_ms == PacketFeedback::kNotReceived;
60 }; 48 };
61 vec->erase(std::remove_if(vec->begin(), vec->end(), pred), vec->end()); 49 vec->erase(std::remove_if(vec->begin(), vec->end(), pred), vec->end());
62 std::sort(vec->begin(), vec->end(), PacketFeedbackComparator()); 50 std::sort(vec->begin(), vec->end(), PacketFeedbackComparator());
63 } 51 }
64 52
65 std::string SsrcToString(uint32_t ssrc) { 53 std::string SsrcToString(uint32_t ssrc) {
66 std::stringstream ss; 54 std::stringstream ss;
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 }, 1379 },
1392 audio_network_adaptation_events_, begin_time_, &time_series); 1380 audio_network_adaptation_events_, begin_time_, &time_series);
1393 plot->AppendTimeSeries(std::move(time_series)); 1381 plot->AppendTimeSeries(std::move(time_series));
1394 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); 1382 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
1395 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))", 1383 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))",
1396 kBottomMargin, kTopMargin); 1384 kBottomMargin, kTopMargin);
1397 plot->SetTitle("Reported audio encoder number of channels"); 1385 plot->SetTitle("Reported audio encoder number of channels");
1398 } 1386 }
1399 } // namespace plotting 1387 } // namespace plotting
1400 } // namespace webrtc 1388 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698