blob: b36c9168418ae7b8572af08f70882621cdca927a [file] [log] [blame]
Niels Möller213618e2018-07-24 09:29:58 +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
11#include "api/video/video_stream_encoder_create.h"
12
Karl Wibergc2342032018-08-08 11:39:52 +020013#include "absl/memory/memory.h"
Yves Gerey3e707812018-11-28 16:47:49 +010014#include "video/overuse_frame_detector.h"
Niels Möller213618e2018-07-24 09:29:58 +020015#include "video/video_stream_encoder.h"
16
17namespace webrtc {
18std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder(
19 uint32_t number_of_cores,
20 VideoStreamEncoderObserver* encoder_stats_observer,
21 const VideoStreamEncoderSettings& settings,
22 // Deprecated, used for tests only.
23 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback) {
Karl Wibergc2342032018-08-08 11:39:52 +020024 return absl::make_unique<VideoStreamEncoder>(
Niels Möller213618e2018-07-24 09:29:58 +020025 number_of_cores, encoder_stats_observer, settings, pre_encode_callback,
Karl Wibergc2342032018-08-08 11:39:52 +020026 absl::make_unique<OveruseFrameDetector>(encoder_stats_observer));
Niels Möller213618e2018-07-24 09:29:58 +020027}
28} // namespace webrtc