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" |
| 18 |
17 namespace webrtc { | 19 namespace webrtc { |
18 namespace testing { | 20 namespace testing { |
19 namespace bwe { | 21 namespace bwe { |
20 | 22 |
21 class DelayCapHelper { | 23 class DelayCapHelper { |
22 public: | 24 public: |
23 // Max delay = 0 stands for +infinite. | 25 // Max delay = 0 stands for +infinite. |
24 DelayCapHelper() : max_delay_us_(0), delay_stats_() {} | 26 DelayCapHelper() : max_delay_us_(0), delay_stats_() {} |
25 | 27 |
26 void set_max_delay_ms(int64_t max_delay_ms) { | 28 void set_max_delay_ms(int64_t max_delay_ms) { |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, | 809 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, |
808 uint32_t remaining_payload) { | 810 uint32_t remaining_payload) { |
809 uint32_t fragments = | 811 uint32_t fragments = |
810 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; | 812 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; |
811 uint32_t avg_size = (frame_size + fragments - 1) / fragments; | 813 uint32_t avg_size = (frame_size + fragments - 1) / fragments; |
812 return std::min(avg_size, remaining_payload); | 814 return std::min(avg_size, remaining_payload); |
813 } | 815 } |
814 } // namespace bwe | 816 } // namespace bwe |
815 } // namespace testing | 817 } // namespace testing |
816 } // namespace webrtc | 818 } // namespace webrtc |
OLD | NEW |