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/common.h" | 17 #include "webrtc/base/common.h" // For RTC_UNUSED |
18 #include "webrtc/base/constructormagic.h" | 18 #include "webrtc/base/constructormagic.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_() {} |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, | 813 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, |
814 uint32_t remaining_payload) { | 814 uint32_t remaining_payload) { |
815 uint32_t fragments = | 815 uint32_t fragments = |
816 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; | 816 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; |
817 uint32_t avg_size = (frame_size + fragments - 1) / fragments; | 817 uint32_t avg_size = (frame_size + fragments - 1) / fragments; |
818 return std::min(avg_size, remaining_payload); | 818 return std::min(avg_size, remaining_payload); |
819 } | 819 } |
820 } // namespace bwe | 820 } // namespace bwe |
821 } // namespace testing | 821 } // namespace testing |
822 } // namespace webrtc | 822 } // namespace webrtc |
OLD | NEW |