Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Jonas Olsson | a4d8737 | 2019-07-05 17:08:33 | [diff] [blame] | 11 | #include "api/test/create_video_quality_test_fixture.h" |
| 12 | |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 13 | #include <memory> |
| 14 | #include <utility> |
| 15 | |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 16 | #include "video/video_quality_test.h" |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | std::unique_ptr<VideoQualityTestFixtureInterface> |
| 21 | CreateVideoQualityTestFixture() { |
| 22 | // By default, we don't override the FEC module, so pass an empty factory. |
Mirko Bonadei | 317a1f0 | 2019-09-17 15:06:18 | [diff] [blame] | 23 | return std::make_unique<VideoQualityTest>(nullptr); |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 24 | } |
| 25 | |
Jonas Olsson | a4d8737 | 2019-07-05 17:08:33 | [diff] [blame] | 26 | std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture( |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 27 | std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory) { |
Mirko Bonadei | 317a1f0 | 2019-09-17 15:06:18 | [diff] [blame] | 28 | auto components = |
| 29 | std::make_unique<VideoQualityTestFixtureInterface::InjectionComponents>(); |
Artem Titov | e269cb4 | 2018-08-29 07:59:23 | [diff] [blame] | 30 | components->fec_controller_factory = std::move(fec_controller_factory); |
Mirko Bonadei | 317a1f0 | 2019-09-17 15:06:18 | [diff] [blame] | 31 | return std::make_unique<VideoQualityTest>(std::move(components)); |
Artem Titov | e269cb4 | 2018-08-29 07:59:23 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture( |
| 35 | std::unique_ptr<VideoQualityTestFixtureInterface::InjectionComponents> |
| 36 | components) { |
Mirko Bonadei | 317a1f0 | 2019-09-17 15:06:18 | [diff] [blame] | 37 | return std::make_unique<VideoQualityTest>(std::move(components)); |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | } // namespace webrtc |