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

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

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 auto delta_it = delta_vec.begin(); 81 auto delta_it = delta_vec.begin();
82 std::vector<PacketInfo> packet_feedback_vector; 82 std::vector<PacketInfo> packet_feedback_vector;
83 packet_feedback_vector.reserve(delta_vec.size()); 83 packet_feedback_vector.reserve(delta_vec.size());
84 84
85 { 85 {
86 rtc::CritScope cs(&lock_); 86 rtc::CritScope cs(&lock_);
87 size_t failed_lookups = 0; 87 size_t failed_lookups = 0;
88 int64_t offset_us = 0; 88 int64_t offset_us = 0;
89 for (auto symbol : feedback.GetStatusVector()) { 89 for (auto symbol : feedback.GetStatusVector()) {
90 if (symbol != rtcp::TransportFeedback::StatusSymbol::kNotReceived) { 90 if (symbol != rtcp::TransportFeedback::StatusSymbol::kNotReceived) {
91 DCHECK(delta_it != delta_vec.end()); 91 RTC_DCHECK(delta_it != delta_vec.end());
92 offset_us += *(delta_it++); 92 offset_us += *(delta_it++);
93 int64_t timestamp_ms = current_offset_ms_ + (offset_us / 1000); 93 int64_t timestamp_ms = current_offset_ms_ + (offset_us / 1000);
94 PacketInfo info = {timestamp_ms, 0, sequence_number, 0, false}; 94 PacketInfo info = {timestamp_ms, 0, sequence_number, 0, false};
95 if (send_time_history_.GetInfo(&info, true)) { 95 if (send_time_history_.GetInfo(&info, true)) {
96 packet_feedback_vector.push_back(info); 96 packet_feedback_vector.push_back(info);
97 } else { 97 } else {
98 ++failed_lookups; 98 ++failed_lookups;
99 } 99 }
100 } 100 }
101 ++sequence_number; 101 ++sequence_number;
102 } 102 }
103 DCHECK(delta_it == delta_vec.end()); 103 RTC_DCHECK(delta_it == delta_vec.end());
104 if (failed_lookups > 0) { 104 if (failed_lookups > 0) {
105 LOG(LS_WARNING) << "Failed to lookup send time for " << failed_lookups 105 LOG(LS_WARNING) << "Failed to lookup send time for " << failed_lookups
106 << " packet" << (failed_lookups > 1 ? "s" : "") 106 << " packet" << (failed_lookups > 1 ? "s" : "")
107 << ". Send time history too small?"; 107 << ". Send time history too small?";
108 } 108 }
109 } 109 }
110 DCHECK(bitrate_estimator_.get() != nullptr); 110 RTC_DCHECK(bitrate_estimator_.get() != nullptr);
111 bitrate_estimator_->IncomingPacketFeedbackVector(packet_feedback_vector); 111 bitrate_estimator_->IncomingPacketFeedbackVector(packet_feedback_vector);
112 } 112 }
113 113
114 void TransportFeedbackAdapter::OnReceiveBitrateChanged( 114 void TransportFeedbackAdapter::OnReceiveBitrateChanged(
115 const std::vector<unsigned int>& ssrcs, 115 const std::vector<unsigned int>& ssrcs,
116 unsigned int bitrate) { 116 unsigned int bitrate) {
117 rtcp_bandwidth_observer_->OnReceivedEstimatedBitrate(bitrate); 117 rtcp_bandwidth_observer_->OnReceivedEstimatedBitrate(bitrate);
118 } 118 }
119 119
120 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms, 120 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms,
121 int64_t max_rtt_ms) { 121 int64_t max_rtt_ms) {
122 DCHECK(bitrate_estimator_.get() != nullptr); 122 RTC_DCHECK(bitrate_estimator_.get() != nullptr);
123 bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); 123 bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms);
124 } 124 }
125 125
126 } // namespace webrtc 126 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc ('k') | webrtc/modules/rtp_rtcp/source/packet_loss_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698