| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #ifndef VIDEO_VIDEO_QUALITY_TEST_H_ | 10 #ifndef VIDEO_VIDEO_QUALITY_TEST_H_ |
| 11 #define VIDEO_VIDEO_QUALITY_TEST_H_ | 11 #define VIDEO_VIDEO_QUALITY_TEST_H_ |
| 12 | 12 |
| 13 #include <map> | 13 #include <map> |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "media/engine/simulcast_encoder_adapter.h" | 18 #include "media/engine/simulcast_encoder_adapter.h" |
| 19 #include "media/engine/webrtcvideoencoderfactory.h" |
| 19 #include "test/call_test.h" | 20 #include "test/call_test.h" |
| 20 #include "test/frame_generator.h" | 21 #include "test/frame_generator.h" |
| 21 #include "test/testsupport/trace_to_stderr.h" | 22 #include "test/testsupport/trace_to_stderr.h" |
| 22 | 23 |
| 23 namespace webrtc { | 24 namespace webrtc { |
| 24 | 25 |
| 25 class VideoQualityTest : public test::CallTest { | 26 class VideoQualityTest : public test::CallTest { |
| 26 public: | 27 public: |
| 27 // Parameters are grouped into smaller structs to make it easier to set | 28 // Parameters are grouped into smaller structs to make it easier to set |
| 28 // the desired elements and skip unused, using aggregate initialization. | 29 // the desired elements and skip unused, using aggregate initialization. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 39 struct Video { | 40 struct Video { |
| 40 bool enabled; | 41 bool enabled; |
| 41 size_t width; | 42 size_t width; |
| 42 size_t height; | 43 size_t height; |
| 43 int32_t fps; | 44 int32_t fps; |
| 44 int min_bitrate_bps; | 45 int min_bitrate_bps; |
| 45 int target_bitrate_bps; | 46 int target_bitrate_bps; |
| 46 int max_bitrate_bps; | 47 int max_bitrate_bps; |
| 47 bool suspend_below_min_bitrate; | 48 bool suspend_below_min_bitrate; |
| 48 std::string codec; | 49 std::string codec; |
| 50 bool hw_encoder; |
| 51 bool sw_fallback_encoder; |
| 49 int num_temporal_layers; | 52 int num_temporal_layers; |
| 50 int selected_tl; | 53 int selected_tl; |
| 51 int min_transmit_bps; | 54 int min_transmit_bps; |
| 52 bool ulpfec; | 55 bool ulpfec; |
| 53 bool flexfec; | 56 bool flexfec; |
| 54 std::string clip_name; // "Generator" to generate frames instead. | 57 std::string clip_name; // "Generator" to generate frames instead. |
| 55 size_t capture_device_index; | 58 size_t capture_device_index; |
| 56 } video; | 59 } video; |
| 57 struct Audio { | 60 struct Audio { |
| 58 bool enabled; | 61 bool enabled; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 AudioReceiveStream** audio_receive_stream); | 138 AudioReceiveStream** audio_receive_stream); |
| 136 | 139 |
| 137 void StartEncodedFrameLogs(VideoSendStream* stream); | 140 void StartEncodedFrameLogs(VideoSendStream* stream); |
| 138 void StartEncodedFrameLogs(VideoReceiveStream* stream); | 141 void StartEncodedFrameLogs(VideoReceiveStream* stream); |
| 139 | 142 |
| 140 // We need a more general capturer than the FrameGeneratorCapturer. | 143 // We need a more general capturer than the FrameGeneratorCapturer. |
| 141 std::unique_ptr<test::VideoCapturer> video_capturer_; | 144 std::unique_ptr<test::VideoCapturer> video_capturer_; |
| 142 std::vector<std::unique_ptr<test::VideoCapturer>> thumbnail_capturers_; | 145 std::vector<std::unique_ptr<test::VideoCapturer>> thumbnail_capturers_; |
| 143 std::unique_ptr<test::TraceToStderr> trace_to_stderr_; | 146 std::unique_ptr<test::TraceToStderr> trace_to_stderr_; |
| 144 std::unique_ptr<test::FrameGenerator> frame_generator_; | 147 std::unique_ptr<test::FrameGenerator> frame_generator_; |
| 148 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; |
| 145 std::unique_ptr<VideoEncoder> video_encoder_; | 149 std::unique_ptr<VideoEncoder> video_encoder_; |
| 146 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> vp8_encoder_factory_; | |
| 147 | 150 |
| 148 std::vector<std::unique_ptr<VideoEncoder>> thumbnail_encoders_; | 151 std::vector<std::unique_ptr<VideoEncoder>> thumbnail_encoders_; |
| 149 std::vector<VideoSendStream::Config> thumbnail_send_configs_; | 152 std::vector<VideoSendStream::Config> thumbnail_send_configs_; |
| 150 std::vector<VideoEncoderConfig> thumbnail_encoder_configs_; | 153 std::vector<VideoEncoderConfig> thumbnail_encoder_configs_; |
| 151 std::vector<VideoSendStream*> thumbnail_send_streams_; | 154 std::vector<VideoSendStream*> thumbnail_send_streams_; |
| 152 std::vector<VideoReceiveStream::Config> thumbnail_receive_configs_; | 155 std::vector<VideoReceiveStream::Config> thumbnail_receive_configs_; |
| 153 std::vector<VideoReceiveStream*> thumbnail_receive_streams_; | 156 std::vector<VideoReceiveStream*> thumbnail_receive_streams_; |
| 154 | 157 |
| 155 Clock* const clock_; | 158 Clock* const clock_; |
| 156 | 159 |
| 157 int receive_logs_; | 160 int receive_logs_; |
| 158 int send_logs_; | 161 int send_logs_; |
| 159 | 162 |
| 160 VideoSendStream::DegradationPreference degradation_preference_ = | 163 VideoSendStream::DegradationPreference degradation_preference_ = |
| 161 VideoSendStream::DegradationPreference::kMaintainFramerate; | 164 VideoSendStream::DegradationPreference::kMaintainFramerate; |
| 162 Params params_; | 165 Params params_; |
| 163 }; | 166 }; |
| 164 | 167 |
| 165 } // namespace webrtc | 168 } // namespace webrtc |
| 166 | 169 |
| 167 #endif // VIDEO_VIDEO_QUALITY_TEST_H_ | 170 #endif // VIDEO_VIDEO_QUALITY_TEST_H_ |
| OLD | NEW |