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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc

Issue 1703833002: Remove ignored return code from modules. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 9 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 int64_t RemoteEstimatorProxy::TimeUntilNextProcess() { 64 int64_t RemoteEstimatorProxy::TimeUntilNextProcess() {
65 int64_t now = clock_->TimeInMilliseconds(); 65 int64_t now = clock_->TimeInMilliseconds();
66 int64_t time_until_next = 0; 66 int64_t time_until_next = 0;
67 if (last_process_time_ms_ != -1 && 67 if (last_process_time_ms_ != -1 &&
68 now - last_process_time_ms_ < kDefaultProcessIntervalMs) { 68 now - last_process_time_ms_ < kDefaultProcessIntervalMs) {
69 time_until_next = (last_process_time_ms_ + kDefaultProcessIntervalMs - now); 69 time_until_next = (last_process_time_ms_ + kDefaultProcessIntervalMs - now);
70 } 70 }
71 return time_until_next; 71 return time_until_next;
72 } 72 }
73 73
74 int32_t RemoteEstimatorProxy::Process() { 74 void RemoteEstimatorProxy::Process() {
75 if (TimeUntilNextProcess() > 0) 75 if (TimeUntilNextProcess() > 0)
76 return 0; 76 return;
77 last_process_time_ms_ = clock_->TimeInMilliseconds(); 77 last_process_time_ms_ = clock_->TimeInMilliseconds();
78 78
79 bool more_to_build = true; 79 bool more_to_build = true;
80 while (more_to_build) { 80 while (more_to_build) {
81 rtcp::TransportFeedback feedback_packet; 81 rtcp::TransportFeedback feedback_packet;
82 if (BuildFeedbackPacket(&feedback_packet)) { 82 if (BuildFeedbackPacket(&feedback_packet)) {
83 RTC_DCHECK(packet_router_ != nullptr); 83 RTC_DCHECK(packet_router_ != nullptr);
84 packet_router_->SendFeedback(&feedback_packet); 84 packet_router_->SendFeedback(&feedback_packet);
85 } else { 85 } else {
86 more_to_build = false; 86 more_to_build = false;
87 } 87 }
88 } 88 }
89
90 return 0;
91 } 89 }
92 90
93 void RemoteEstimatorProxy::OnPacketArrival(uint16_t sequence_number, 91 void RemoteEstimatorProxy::OnPacketArrival(uint16_t sequence_number,
94 int64_t arrival_time) { 92 int64_t arrival_time) {
95 int64_t seq = unwrapper_.Unwrap(sequence_number); 93 int64_t seq = unwrapper_.Unwrap(sequence_number);
96 94
97 if (window_start_seq_ == -1) { 95 if (window_start_seq_ == -1) {
98 window_start_seq_ = seq; 96 window_start_seq_ = seq;
99 // Start new feedback packet, cull old packets. 97 // Start new feedback packet, cull old packets.
100 for (auto it = packet_arrival_times_.begin(); 98 for (auto it = packet_arrival_times_.begin();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // they need to be re-sent after a reordering. Removal will be handled 145 // they need to be re-sent after a reordering. Removal will be handled
148 // by OnPacketArrival once packets are too old. 146 // by OnPacketArrival once packets are too old.
149 } 147 }
150 if (it == packet_arrival_times_.end()) 148 if (it == packet_arrival_times_.end())
151 window_start_seq_ = -1; 149 window_start_seq_ = -1;
152 150
153 return true; 151 return true;
154 } 152 }
155 153
156 } // namespace webrtc 154 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h ('k') | webrtc/modules/remote_bitrate_estimator/test/bwe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698