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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/bwe.cc

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 int GetFeedbackIntervalMs() const override { return 1000; } 64 int GetFeedbackIntervalMs() const override { return 1000; }
65 void GiveFeedback(const FeedbackPacket& feedback) override {} 65 void GiveFeedback(const FeedbackPacket& feedback) override {}
66 void OnPacketsSent(const Packets& packets) override {} 66 void OnPacketsSent(const Packets& packets) override {}
67 int64_t TimeUntilNextProcess() override { 67 int64_t TimeUntilNextProcess() override {
68 return std::numeric_limits<int64_t>::max(); 68 return std::numeric_limits<int64_t>::max();
69 } 69 }
70 int Process() override { return 0; } 70 int Process() override { return 0; }
71 71
72 private: 72 private:
73 DISALLOW_COPY_AND_ASSIGN(NullBweSender); 73 RTC_DISALLOW_COPY_AND_ASSIGN(NullBweSender);
74 }; 74 };
75 75
76 int64_t GetAbsSendTimeInMs(uint32_t abs_send_time) { 76 int64_t GetAbsSendTimeInMs(uint32_t abs_send_time) {
77 const int kInterArrivalShift = 26; 77 const int kInterArrivalShift = 26;
78 const int kAbsSendTimeInterArrivalUpshift = 8; 78 const int kAbsSendTimeInterArrivalUpshift = 8;
79 const double kTimestampToMs = 79 const double kTimestampToMs =
80 1000.0 / static_cast<double>(1 << kInterArrivalShift); 80 1000.0 / static_cast<double>(1 << kInterArrivalShift);
81 uint32_t timestamp = abs_send_time << kAbsSendTimeInterArrivalUpshift; 81 uint32_t timestamp = abs_send_time << kAbsSendTimeInterArrivalUpshift;
82 return static_cast<int64_t>(timestamp) * kTimestampToMs; 82 return static_cast<int64_t>(timestamp) * kTimestampToMs;
83 } 83 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 float LossAccount::LossRatio() { 272 float LossAccount::LossRatio() {
273 if (num_total == 0) 273 if (num_total == 0)
274 return 0.0f; 274 return 0.0f;
275 return static_cast<float>(num_lost) / num_total; 275 return static_cast<float>(num_lost) / num_total;
276 } 276 }
277 277
278 } // namespace bwe 278 } // namespace bwe
279 } // namespace testing 279 } // namespace testing
280 } // namespace webrtc 280 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/bwe.h ('k') | webrtc/modules/remote_bitrate_estimator/test/bwe_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698