OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 int fps_; | 94 int fps_; |
95 int bitrate_bps_; | 95 int bitrate_bps_; |
96 unsigned int ssrc_; | 96 unsigned int ssrc_; |
97 unsigned int frequency_; | 97 unsigned int frequency_; |
98 int64_t next_rtp_time_; | 98 int64_t next_rtp_time_; |
99 int64_t next_rtcp_time_; | 99 int64_t next_rtcp_time_; |
100 uint32_t rtp_timestamp_offset_; | 100 uint32_t rtp_timestamp_offset_; |
101 const double kNtpFracPerMs; | 101 const double kNtpFracPerMs; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(RtpStream); | 103 RTC_DISALLOW_COPY_AND_ASSIGN(RtpStream); |
104 }; | 104 }; |
105 | 105 |
106 class StreamGenerator { | 106 class StreamGenerator { |
107 public: | 107 public: |
108 typedef std::list<RtpStream::RtcpPacket*> RtcpList; | 108 typedef std::list<RtpStream::RtcpPacket*> RtcpList; |
109 | 109 |
110 StreamGenerator(int capacity, double time_now); | 110 StreamGenerator(int capacity, double time_now); |
111 | 111 |
112 ~StreamGenerator(); | 112 ~StreamGenerator(); |
113 | 113 |
(...skipping 17 matching lines...) Expand all Loading... |
131 private: | 131 private: |
132 typedef std::map<unsigned int, RtpStream*> StreamMap; | 132 typedef std::map<unsigned int, RtpStream*> StreamMap; |
133 | 133 |
134 // Capacity of the simulated channel in bits per second. | 134 // Capacity of the simulated channel in bits per second. |
135 int capacity_; | 135 int capacity_; |
136 // The time when the last packet arrived. | 136 // The time when the last packet arrived. |
137 int64_t prev_arrival_time_us_; | 137 int64_t prev_arrival_time_us_; |
138 // All streams being transmitted on this simulated channel. | 138 // All streams being transmitted on this simulated channel. |
139 StreamMap streams_; | 139 StreamMap streams_; |
140 | 140 |
141 DISALLOW_COPY_AND_ASSIGN(StreamGenerator); | 141 RTC_DISALLOW_COPY_AND_ASSIGN(StreamGenerator); |
142 }; | 142 }; |
143 } // namespace testing | 143 } // namespace testing |
144 | 144 |
145 class RemoteBitrateEstimatorTest : public ::testing::Test { | 145 class RemoteBitrateEstimatorTest : public ::testing::Test { |
146 public: | 146 public: |
147 RemoteBitrateEstimatorTest(); | 147 RemoteBitrateEstimatorTest(); |
148 virtual ~RemoteBitrateEstimatorTest(); | 148 virtual ~RemoteBitrateEstimatorTest(); |
149 | 149 |
150 protected: | 150 protected: |
151 virtual void SetUp() = 0; | 151 virtual void SetUp() = 0; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 unsigned int expected_bitrate_drop_delta); | 204 unsigned int expected_bitrate_drop_delta); |
205 | 205 |
206 static const unsigned int kDefaultSsrc; | 206 static const unsigned int kDefaultSsrc; |
207 static const int kArrivalTimeClockOffsetMs = 60000; | 207 static const int kArrivalTimeClockOffsetMs = 60000; |
208 | 208 |
209 SimulatedClock clock_; // Time at the receiver. | 209 SimulatedClock clock_; // Time at the receiver. |
210 rtc::scoped_ptr<testing::TestBitrateObserver> bitrate_observer_; | 210 rtc::scoped_ptr<testing::TestBitrateObserver> bitrate_observer_; |
211 rtc::scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_; | 211 rtc::scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_; |
212 rtc::scoped_ptr<testing::StreamGenerator> stream_generator_; | 212 rtc::scoped_ptr<testing::StreamGenerator> stream_generator_; |
213 | 213 |
214 DISALLOW_COPY_AND_ASSIGN(RemoteBitrateEstimatorTest); | 214 RTC_DISALLOW_COPY_AND_ASSIGN(RemoteBitrateEstimatorTest); |
215 }; | 215 }; |
216 } // namespace webrtc | 216 } // namespace webrtc |
217 | 217 |
218 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_UNIT
TEST_HELPER_H_ | 218 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_UNIT
TEST_HELPER_H_ |
OLD | NEW |