| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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/remote_bitrate_estimator/test/bwe_test_framework.h" | 11 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h" |
| 12 | 12 |
| 13 #include <stdio.h> | 13 #include <stdio.h> |
| 14 | 14 |
| 15 #include <sstream> | 15 #include <sstream> |
| 16 | 16 |
| 17 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/rtc_base/constructormagic.h" |
| 18 #include "webrtc/base/safe_minmax.h" | 18 #include "webrtc/rtc_base/safe_minmax.h" |
| 19 | 19 |
| 20 namespace webrtc { | 20 namespace webrtc { |
| 21 namespace testing { | 21 namespace testing { |
| 22 namespace bwe { | 22 namespace bwe { |
| 23 | 23 |
| 24 class DelayCapHelper { | 24 class DelayCapHelper { |
| 25 public: | 25 public: |
| 26 // Max delay = 0 stands for +infinite. | 26 // Max delay = 0 stands for +infinite. |
| 27 DelayCapHelper() : max_delay_us_(0), delay_stats_() {} | 27 DelayCapHelper() : max_delay_us_(0), delay_stats_() {} |
| 28 | 28 |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, | 820 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, |
| 821 uint32_t remaining_payload) { | 821 uint32_t remaining_payload) { |
| 822 uint32_t fragments = | 822 uint32_t fragments = |
| 823 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; | 823 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; |
| 824 uint32_t avg_size = (frame_size + fragments - 1) / fragments; | 824 uint32_t avg_size = (frame_size + fragments - 1) / fragments; |
| 825 return std::min(avg_size, remaining_payload); | 825 return std::min(avg_size, remaining_payload); |
| 826 } | 826 } |
| 827 } // namespace bwe | 827 } // namespace bwe |
| 828 } // namespace testing | 828 } // namespace testing |
| 829 } // namespace webrtc | 829 } // namespace webrtc |
| OLD | NEW |