| OLD | NEW |
| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 public: | 60 public: |
| 61 NullBweSender() {} | 61 NullBweSender() {} |
| 62 virtual ~NullBweSender() {} | 62 virtual ~NullBweSender() {} |
| 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 void Process() override {} | 70 int Process() override { return 0; } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 RTC_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); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |