Niels Möller | 213618e | 2018-07-24 09:29:58 +0200 | [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 | |
| 11 | #include "api/video/video_stream_encoder_create.h" |
| 12 | |
Karl Wiberg | c234203 | 2018-08-08 11:39:52 +0200 | [diff] [blame] | 13 | #include "absl/memory/memory.h" |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 14 | #include "video/overuse_frame_detector.h" |
Niels Möller | 213618e | 2018-07-24 09:29:58 +0200 | [diff] [blame] | 15 | #include "video/video_stream_encoder.h" |
| 16 | |
| 17 | namespace webrtc { |
Sebastian Jansson | 74682c1 | 2019-03-01 11:50:20 +0100 | [diff] [blame] | 18 | |
| 19 | std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder( |
Sebastian Jansson | 572c60f | 2019-03-04 18:30:41 +0100 | [diff] [blame] | 20 | Clock* clock, |
Sebastian Jansson | 74682c1 | 2019-03-01 11:50:20 +0100 | [diff] [blame] | 21 | TaskQueueFactory* task_queue_factory, |
| 22 | uint32_t number_of_cores, |
| 23 | VideoStreamEncoderObserver* encoder_stats_observer, |
| 24 | const VideoStreamEncoderSettings& settings) { |
Karl Wiberg | c234203 | 2018-08-08 11:39:52 +0200 | [diff] [blame] | 25 | return absl::make_unique<VideoStreamEncoder>( |
Sebastian Jansson | 572c60f | 2019-03-04 18:30:41 +0100 | [diff] [blame] | 26 | clock, number_of_cores, encoder_stats_observer, settings, |
Sebastian Jansson | 74682c1 | 2019-03-01 11:50:20 +0100 | [diff] [blame] | 27 | absl::make_unique<OveruseFrameDetector>(encoder_stats_observer), |
| 28 | task_queue_factory); |
Niels Möller | 213618e | 2018-07-24 09:29:58 +0200 | [diff] [blame] | 29 | } |
Sebastian Jansson | 74682c1 | 2019-03-01 11:50:20 +0100 | [diff] [blame] | 30 | |
Niels Möller | 213618e | 2018-07-24 09:29:58 +0200 | [diff] [blame] | 31 | } // namespace webrtc |