| 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 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ | 11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ |
| 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ | 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ |
| 13 | 13 |
| 14 #include <assert.h> | 14 #include <assert.h> |
| 15 #include <math.h> | 15 #include <math.h> |
| 16 | 16 |
| 17 #include <algorithm> | 17 #include <algorithm> |
| 18 #include <list> | 18 #include <list> |
| 19 #include <memory> |
| 19 #include <numeric> | 20 #include <numeric> |
| 20 #include <set> | 21 #include <set> |
| 21 #include <sstream> | 22 #include <sstream> |
| 22 #include <string> | 23 #include <string> |
| 23 #include <utility> | 24 #include <utility> |
| 24 #include <vector> | 25 #include <vector> |
| 25 | 26 |
| 26 #include "webrtc/base/common.h" | 27 #include "webrtc/base/common.h" |
| 27 #include "webrtc/base/random.h" | 28 #include "webrtc/base/random.h" |
| 28 #include "webrtc/base/scoped_ptr.h" | |
| 29 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 29 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
| 30 #include "webrtc/modules/include/module_common_types.h" | 30 #include "webrtc/modules/include/module_common_types.h" |
| 31 #include "webrtc/modules/pacing/paced_sender.h" | 31 #include "webrtc/modules/pacing/paced_sender.h" |
| 32 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 32 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
| 33 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" | 33 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" |
| 34 #include "webrtc/modules/remote_bitrate_estimator/test/packet.h" | 34 #include "webrtc/modules/remote_bitrate_estimator/test/packet.h" |
| 35 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 35 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 36 #include "webrtc/system_wrappers/include/clock.h" | 36 #include "webrtc/system_wrappers/include/clock.h" |
| 37 | 37 |
| 38 namespace webrtc { | 38 namespace webrtc { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 uint32_t capacity_kbps(); | 339 uint32_t capacity_kbps(); |
| 340 | 340 |
| 341 virtual void RunFor(int64_t time_ms, Packets* in_out); | 341 virtual void RunFor(int64_t time_ms, Packets* in_out); |
| 342 | 342 |
| 343 Stats<double> GetDelayStats() const; | 343 Stats<double> GetDelayStats() const; |
| 344 | 344 |
| 345 private: | 345 private: |
| 346 uint32_t capacity_kbps_; | 346 uint32_t capacity_kbps_; |
| 347 int64_t last_send_time_us_; | 347 int64_t last_send_time_us_; |
| 348 rtc::scoped_ptr<DelayCapHelper> delay_cap_helper_; | 348 std::unique_ptr<DelayCapHelper> delay_cap_helper_; |
| 349 | 349 |
| 350 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ChokeFilter); | 350 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ChokeFilter); |
| 351 }; | 351 }; |
| 352 | 352 |
| 353 class TraceBasedDeliveryFilter : public PacketProcessor { | 353 class TraceBasedDeliveryFilter : public PacketProcessor { |
| 354 public: | 354 public: |
| 355 TraceBasedDeliveryFilter(PacketProcessorListener* listener, int flow_id); | 355 TraceBasedDeliveryFilter(PacketProcessorListener* listener, int flow_id); |
| 356 TraceBasedDeliveryFilter(PacketProcessorListener* listener, | 356 TraceBasedDeliveryFilter(PacketProcessorListener* listener, |
| 357 const FlowIds& flow_ids); | 357 const FlowIds& flow_ids); |
| 358 TraceBasedDeliveryFilter(PacketProcessorListener* listener, | 358 TraceBasedDeliveryFilter(PacketProcessorListener* listener, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 372 Stats<double> GetBitrateStats() const; | 372 Stats<double> GetBitrateStats() const; |
| 373 | 373 |
| 374 private: | 374 private: |
| 375 void ProceedToNextSlot(); | 375 void ProceedToNextSlot(); |
| 376 | 376 |
| 377 typedef std::vector<int64_t> TimeList; | 377 typedef std::vector<int64_t> TimeList; |
| 378 int64_t current_offset_us_; | 378 int64_t current_offset_us_; |
| 379 TimeList delivery_times_us_; | 379 TimeList delivery_times_us_; |
| 380 TimeList::const_iterator next_delivery_it_; | 380 TimeList::const_iterator next_delivery_it_; |
| 381 int64_t local_time_us_; | 381 int64_t local_time_us_; |
| 382 rtc::scoped_ptr<RateCounter> rate_counter_; | 382 std::unique_ptr<RateCounter> rate_counter_; |
| 383 std::string name_; | 383 std::string name_; |
| 384 rtc::scoped_ptr<DelayCapHelper> delay_cap_helper_; | 384 std::unique_ptr<DelayCapHelper> delay_cap_helper_; |
| 385 Stats<double> packets_per_second_stats_; | 385 Stats<double> packets_per_second_stats_; |
| 386 Stats<double> kbps_stats_; | 386 Stats<double> kbps_stats_; |
| 387 | 387 |
| 388 RTC_DISALLOW_COPY_AND_ASSIGN(TraceBasedDeliveryFilter); | 388 RTC_DISALLOW_COPY_AND_ASSIGN(TraceBasedDeliveryFilter); |
| 389 }; | 389 }; |
| 390 | 390 |
| 391 class VideoSource { | 391 class VideoSource { |
| 392 public: | 392 public: |
| 393 VideoSource(int flow_id, | 393 VideoSource(int flow_id, |
| 394 float fps, | 394 float fps, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 uint32_t frame_counter_; | 462 uint32_t frame_counter_; |
| 463 int compensation_bytes_; | 463 int compensation_bytes_; |
| 464 int compensation_per_frame_; | 464 int compensation_per_frame_; |
| 465 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PeriodicKeyFrameSource); | 465 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PeriodicKeyFrameSource); |
| 466 }; | 466 }; |
| 467 } // namespace bwe | 467 } // namespace bwe |
| 468 } // namespace testing | 468 } // namespace testing |
| 469 } // namespace webrtc | 469 } // namespace webrtc |
| 470 | 470 |
| 471 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ | 471 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FRAMEWORK_H_ |
| OLD | NEW |