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
13 #include <memory>
14
15 #include "video/adaptation/overuse_frame_detector.h"
16 #include "video/video_stream_encoder.h"
17
18 namespace webrtc {
19
CreateVideoStreamEncoder(Clock * clock,TaskQueueFactory * task_queue_factory,uint32_t number_of_cores,VideoStreamEncoderObserver * encoder_stats_observer,const VideoStreamEncoderSettings & settings)20 std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder(
21 Clock* clock,
22 TaskQueueFactory* task_queue_factory,
23 uint32_t number_of_cores,
24 VideoStreamEncoderObserver* encoder_stats_observer,
25 const VideoStreamEncoderSettings& settings) {
26 return std::make_unique<VideoStreamEncoder>(
27 clock, number_of_cores, encoder_stats_observer, settings,
28 std::make_unique<OveruseFrameDetector>(encoder_stats_observer),
29 task_queue_factory);
30 }
31
32 } // namespace webrtc
33