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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include <string> | 21 #include <string> |
22 #include <vector> | 22 #include <vector> |
23 | 23 |
24 #include "webrtc/base/scoped_ptr.h" | 24 #include "webrtc/base/scoped_ptr.h" |
25 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 25 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
26 #include "webrtc/modules/interface/module_common_types.h" | 26 #include "webrtc/modules/interface/module_common_types.h" |
27 #include "webrtc/modules/pacing/include/paced_sender.h" | 27 #include "webrtc/modules/pacing/include/paced_sender.h" |
28 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 28 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
29 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" | 29 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" |
30 #include "webrtc/modules/remote_bitrate_estimator/test/packet.h" | 30 #include "webrtc/modules/remote_bitrate_estimator/test/packet.h" |
| 31 #include "webrtc/modules/remote_bitrate_estimator/test/random.h" |
31 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" | 32 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" |
32 #include "webrtc/system_wrappers/interface/clock.h" | 33 #include "webrtc/system_wrappers/interface/clock.h" |
33 | 34 |
34 namespace webrtc { | 35 namespace webrtc { |
35 | 36 |
36 class RtcpBandwidthObserver; | 37 class RtcpBandwidthObserver; |
37 | 38 |
38 namespace testing { | 39 namespace testing { |
39 namespace bwe { | 40 namespace bwe { |
40 | 41 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 std::vector<T> data_; | 136 std::vector<T> data_; |
136 typename std::vector<T>::size_type last_mean_count_; | 137 typename std::vector<T>::size_type last_mean_count_; |
137 typename std::vector<T>::size_type last_variance_count_; | 138 typename std::vector<T>::size_type last_variance_count_; |
138 typename std::vector<T>::size_type last_minmax_count_; | 139 typename std::vector<T>::size_type last_minmax_count_; |
139 T mean_; | 140 T mean_; |
140 T variance_; | 141 T variance_; |
141 T min_; | 142 T min_; |
142 T max_; | 143 T max_; |
143 }; | 144 }; |
144 | 145 |
145 class Random { | |
146 public: | |
147 explicit Random(uint32_t seed); | |
148 | |
149 // Return pseudo random number in the interval [0.0, 1.0]. | |
150 float Rand(); | |
151 | |
152 // Normal Distribution. | |
153 int Gaussian(int mean, int standard_deviation); | |
154 | |
155 // TODO(solenberg): Random from histogram. | |
156 // template<typename T> int Distribution(const std::vector<T> histogram) { | |
157 | |
158 private: | |
159 uint32_t a_; | |
160 uint32_t b_; | |
161 | |
162 DISALLOW_IMPLICIT_CONSTRUCTORS(Random); | |
163 }; | |
164 | |
165 bool IsTimeSorted(const Packets& packets); | 146 bool IsTimeSorted(const Packets& packets); |
166 | 147 |
167 class PacketProcessor; | 148 class PacketProcessor; |
168 | 149 |
169 enum ProcessorType { kSender, kReceiver, kRegular }; | 150 enum ProcessorType { kSender, kReceiver, kRegular }; |
170 | 151 |
171 class PacketProcessorListener { | 152 class PacketProcessorListener { |
172 public: | 153 public: |
173 virtual ~PacketProcessorListener() {} | 154 virtual ~PacketProcessorListener() {} |
174 | 155 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 uint32_t frame_counter_; | 410 uint32_t frame_counter_; |
430 int compensation_bytes_; | 411 int compensation_bytes_; |
431 int compensation_per_frame_; | 412 int compensation_per_frame_; |
432 DISALLOW_IMPLICIT_CONSTRUCTORS(PeriodicKeyFrameSource); | 413 DISALLOW_IMPLICIT_CONSTRUCTORS(PeriodicKeyFrameSource); |
433 }; | 414 }; |
434 } // namespace bwe | 415 } // namespace bwe |
435 } // namespace testing | 416 } // namespace testing |
436 } // namespace webrtc | 417 } // namespace webrtc |
437 | 418 |
438 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ | 419 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ |
OLD | NEW |