blob: ee634355da360dc6137ea14a121964819ad451a6 [file] [log] [blame]
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001/*
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 Olssona4d87372019-07-05 19:08:33 +020011#include "api/test/create_video_quality_test_fixture.h"
12
Patrik Höglundb6b29e02018-06-21 16:58:01 +020013#include <memory>
14#include <utility>
15
Karl Wiberg918f50c2018-07-05 11:40:33 +020016#include "absl/memory/memory.h"
Patrik Höglundb6b29e02018-06-21 16:58:01 +020017#include "video/video_quality_test.h"
Patrik Höglundb6b29e02018-06-21 16:58:01 +020018
19namespace webrtc {
20
21std::unique_ptr<VideoQualityTestFixtureInterface>
22CreateVideoQualityTestFixture() {
23 // By default, we don't override the FEC module, so pass an empty factory.
Karl Wiberg918f50c2018-07-05 11:40:33 +020024 return absl::make_unique<VideoQualityTest>(nullptr);
Patrik Höglundb6b29e02018-06-21 16:58:01 +020025}
26
Jonas Olssona4d87372019-07-05 19:08:33 +020027std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture(
Patrik Höglundb6b29e02018-06-21 16:58:01 +020028 std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory) {
Artem Titove269cb42018-08-29 09:59:23 +020029 auto components = absl::make_unique<
30 VideoQualityTestFixtureInterface::InjectionComponents>();
31 components->fec_controller_factory = std::move(fec_controller_factory);
32 return absl::make_unique<VideoQualityTest>(std::move(components));
33}
34
35std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture(
36 std::unique_ptr<VideoQualityTestFixtureInterface::InjectionComponents>
37 components) {
38 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020039}
40
41} // namespace webrtc