Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 | 64 |
| 65 webrtc::RtcEventLogNullImpl event_log_; | 65 webrtc::RtcEventLogNullImpl event_log_; |
| 66 rtc::Event stop_event_; | 66 rtc::Event stop_event_; |
| 67 Clock* const clock_; | 67 Clock* const clock_; |
| 68 FakeNetworkPipe::Config forward_transport_config_; | 68 FakeNetworkPipe::Config forward_transport_config_; |
| 69 const size_t num_video_streams_; | 69 const size_t num_video_streams_; |
| 70 const size_t num_audio_streams_; | 70 const size_t num_audio_streams_; |
| 71 const size_t num_flexfec_streams_; | 71 const size_t num_flexfec_streams_; |
| 72 const bool rtx_; | 72 const bool rtx_; |
| 73 const bool red_; | 73 const bool red_; |
| 74 const bool report_perf_stats_; | |
|
philipel
2017/03/09 13:59:56
After some offline discussion we concluded that so
stefan-webrtc
2017/03/09 14:03:57
Done.
| |
| 74 Call* sender_call_; | 75 Call* sender_call_; |
| 75 VideoSendStream* send_stream_; | 76 VideoSendStream* send_stream_; |
| 76 test::PacketTransport* send_transport_; | 77 test::PacketTransport* send_transport_; |
| 77 | 78 |
| 78 private: | 79 private: |
| 79 typedef std::map<uint32_t, uint32_t> SsrcMap; | 80 typedef std::map<uint32_t, uint32_t> SsrcMap; |
| 80 class VideoStreamFactory; | 81 class VideoStreamFactory; |
| 81 | 82 |
| 82 Call::Config GetSenderCallConfig() override; | 83 Call::Config GetSenderCallConfig() override; |
| 83 void OnVideoStreamsCreated( | 84 void OnVideoStreamsCreated( |
| 84 VideoSendStream* send_stream, | 85 VideoSendStream* send_stream, |
| 85 const std::vector<VideoReceiveStream*>& receive_streams) override; | 86 const std::vector<VideoReceiveStream*>& receive_streams) override; |
| 86 test::PacketTransport* CreateSendTransport(Call* sender_call) override; | 87 test::PacketTransport* CreateSendTransport(Call* sender_call) override; |
| 87 void ModifyVideoConfigs( | 88 void ModifyVideoConfigs( |
| 88 VideoSendStream::Config* send_config, | 89 VideoSendStream::Config* send_config, |
| 89 std::vector<VideoReceiveStream::Config>* receive_configs, | 90 std::vector<VideoReceiveStream::Config>* receive_configs, |
| 90 VideoEncoderConfig* encoder_config) override; | 91 VideoEncoderConfig* encoder_config) override; |
| 91 void ModifyAudioConfigs( | 92 void ModifyAudioConfigs( |
| 92 AudioSendStream::Config* send_config, | 93 AudioSendStream::Config* send_config, |
| 93 std::vector<AudioReceiveStream::Config>* receive_configs) override; | 94 std::vector<AudioReceiveStream::Config>* receive_configs) override; |
| 94 void ModifyFlexfecConfigs( | 95 void ModifyFlexfecConfigs( |
| 95 std::vector<FlexfecReceiveStream::Config>* receive_configs) override; | 96 std::vector<FlexfecReceiveStream::Config>* receive_configs) override; |
| 96 void OnCallsCreated(Call* sender_call, Call* receiver_call) override; | 97 void OnCallsCreated(Call* sender_call, Call* receiver_call) override; |
| 97 | 98 |
| 98 static void BitrateStatsPollingThread(void* obj); | 99 static void BitrateStatsPollingThread(void* obj); |
| 99 | 100 |
| 100 const int start_bitrate_bps_; | 101 const int start_bitrate_bps_; |
| 101 const int64_t min_run_time_ms_; | 102 const int64_t min_run_time_ms_; |
| 102 const bool report_perf_stats_; | |
| 103 int expected_bitrate_bps_; | 103 int expected_bitrate_bps_; |
| 104 int64_t test_start_ms_; | 104 int64_t test_start_ms_; |
| 105 int64_t ramp_up_finished_ms_; | 105 int64_t ramp_up_finished_ms_; |
| 106 | 106 |
| 107 const std::string extension_type_; | 107 const std::string extension_type_; |
| 108 std::vector<uint32_t> video_ssrcs_; | 108 std::vector<uint32_t> video_ssrcs_; |
| 109 std::vector<uint32_t> video_rtx_ssrcs_; | 109 std::vector<uint32_t> video_rtx_ssrcs_; |
| 110 std::vector<uint32_t> audio_ssrcs_; | 110 std::vector<uint32_t> audio_ssrcs_; |
| 111 | 111 |
| 112 rtc::PlatformThread poller_thread_; | 112 rtc::PlatformThread poller_thread_; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 class RampUpDownUpTester : public RampUpTester { | 115 class RampUpDownUpTester : public RampUpTester { |
| 116 public: | 116 public: |
| 117 RampUpDownUpTester(size_t num_video_streams, | 117 RampUpDownUpTester(size_t num_video_streams, |
| 118 size_t num_audio_streams, | 118 size_t num_audio_streams, |
| 119 size_t num_flexfec_streams, | 119 size_t num_flexfec_streams, |
| 120 unsigned int start_bitrate_bps, | 120 unsigned int start_bitrate_bps, |
| 121 const std::string& extension_type, | 121 const std::string& extension_type, |
| 122 bool rtx, | 122 bool rtx, |
| 123 bool red, | 123 bool red, |
| 124 const std::vector<int>& loss_rates); | 124 const std::vector<int>& loss_rates, |
| 125 bool report_perf_stats); | |
| 125 ~RampUpDownUpTester() override; | 126 ~RampUpDownUpTester() override; |
| 126 | 127 |
| 127 protected: | 128 protected: |
| 128 void PollStats() override; | 129 void PollStats() override; |
| 129 | 130 |
| 130 private: | 131 private: |
| 131 enum TestStates { | 132 enum TestStates { |
| 132 kFirstRampup = 0, | 133 kFirstRampup = 0, |
| 133 kLowRate, | 134 kLowRate, |
| 134 kSecondRampup, | 135 kSecondRampup, |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 148 const std::vector<int> link_rates_; | 149 const std::vector<int> link_rates_; |
| 149 TestStates test_state_; | 150 TestStates test_state_; |
| 150 TestStates next_state_; | 151 TestStates next_state_; |
| 151 int64_t state_start_ms_; | 152 int64_t state_start_ms_; |
| 152 int64_t interval_start_ms_; | 153 int64_t interval_start_ms_; |
| 153 int sent_bytes_; | 154 int sent_bytes_; |
| 154 std::vector<int> loss_rates_; | 155 std::vector<int> loss_rates_; |
| 155 }; | 156 }; |
| 156 } // namespace webrtc | 157 } // namespace webrtc |
| 157 #endif // WEBRTC_CALL_RAMPUP_TESTS_H_ | 158 #endif // WEBRTC_CALL_RAMPUP_TESTS_H_ |
| OLD | NEW |