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

Side by Side Diff: webrtc/modules/congestion_controller/transport_feedback_adapter.cc

Issue 2735423002: Mark |Clock*| as |const Clock*| (for some CongestionController and BWE related modules) (Closed)
Patch Set: Rebased Created 3 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
11 #include "webrtc/modules/congestion_controller/transport_feedback_adapter.h" 11 #include "webrtc/modules/congestion_controller/transport_feedback_adapter.h"
12 12
13 #include "webrtc/base/checks.h" 13 #include "webrtc/base/checks.h"
14 #include "webrtc/base/logging.h" 14 #include "webrtc/base/logging.h"
15 #include "webrtc/base/mod_ops.h" 15 #include "webrtc/base/mod_ops.h"
16 #include "webrtc/modules/congestion_controller/delay_based_bwe.h" 16 #include "webrtc/modules/congestion_controller/delay_based_bwe.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" 17 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
18 #include "webrtc/system_wrappers/include/field_trial.h" 18 #include "webrtc/system_wrappers/include/field_trial.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 const int64_t kNoTimestamp = -1; 22 const int64_t kNoTimestamp = -1;
23 const int64_t kSendTimeHistoryWindowMs = 60000; 23 const int64_t kSendTimeHistoryWindowMs = 60000;
24 const int64_t kBaseTimestampScaleFactor = 24 const int64_t kBaseTimestampScaleFactor =
25 rtcp::TransportFeedback::kDeltaScaleFactor * (1 << 8); 25 rtcp::TransportFeedback::kDeltaScaleFactor * (1 << 8);
26 const int64_t kBaseTimestampRangeSizeUs = kBaseTimestampScaleFactor * (1 << 24); 26 const int64_t kBaseTimestampRangeSizeUs = kBaseTimestampScaleFactor * (1 << 24);
27 27
28 TransportFeedbackAdapter::TransportFeedbackAdapter(Clock* clock) 28 TransportFeedbackAdapter::TransportFeedbackAdapter(const Clock* clock)
29 : send_side_bwe_with_overhead_( 29 : send_side_bwe_with_overhead_(
30 webrtc::field_trial::IsEnabled("WebRTC-SendSideBwe-WithOverhead")), 30 webrtc::field_trial::IsEnabled("WebRTC-SendSideBwe-WithOverhead")),
31 transport_overhead_bytes_per_packet_(0), 31 transport_overhead_bytes_per_packet_(0),
32 send_time_history_(clock, kSendTimeHistoryWindowMs), 32 send_time_history_(clock, kSendTimeHistoryWindowMs),
33 clock_(clock), 33 clock_(clock),
34 current_offset_ms_(kNoTimestamp), 34 current_offset_ms_(kNoTimestamp),
35 last_timestamp_us_(kNoTimestamp) {} 35 last_timestamp_us_(kNoTimestamp) {}
36 36
37 TransportFeedbackAdapter::~TransportFeedbackAdapter() {} 37 TransportFeedbackAdapter::~TransportFeedbackAdapter() {}
38 38
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void TransportFeedbackAdapter::OnTransportFeedback( 141 void TransportFeedbackAdapter::OnTransportFeedback(
142 const rtcp::TransportFeedback& feedback) { 142 const rtcp::TransportFeedback& feedback) {
143 last_packet_feedback_vector_ = GetPacketFeedbackVector(feedback); 143 last_packet_feedback_vector_ = GetPacketFeedbackVector(feedback);
144 } 144 }
145 145
146 std::vector<PacketFeedback> 146 std::vector<PacketFeedback>
147 TransportFeedbackAdapter::GetTransportFeedbackVector() const { 147 TransportFeedbackAdapter::GetTransportFeedbackVector() const {
148 return last_packet_feedback_vector_; 148 return last_packet_feedback_vector_;
149 } 149 }
150 } // namespace webrtc 150 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/transport_feedback_adapter.h ('k') | webrtc/modules/pacing/paced_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698