2018-07-24 09:29:58 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "api/video/video_stream_encoder_create.h"
|
|
|
|
|
|
2019-09-17 17:06:18 +02:00
|
|
|
#include <memory>
|
|
|
|
|
|
2020-03-10 19:08:05 +01:00
|
|
|
#include "video/adaptation/overuse_frame_detector.h"
|
2018-07-24 09:29:58 +02:00
|
|
|
#include "video/video_stream_encoder.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
2019-03-01 11:50:20 +01:00
|
|
|
|
|
|
|
|
std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder(
|
2019-03-04 18:30:41 +01:00
|
|
|
Clock* clock,
|
2019-03-01 11:50:20 +01:00
|
|
|
TaskQueueFactory* task_queue_factory,
|
|
|
|
|
uint32_t number_of_cores,
|
|
|
|
|
VideoStreamEncoderObserver* encoder_stats_observer,
|
|
|
|
|
const VideoStreamEncoderSettings& settings) {
|
2019-09-17 17:06:18 +02:00
|
|
|
return std::make_unique<VideoStreamEncoder>(
|
2019-03-04 18:30:41 +01:00
|
|
|
clock, number_of_cores, encoder_stats_observer, settings,
|
2019-09-17 17:06:18 +02:00
|
|
|
std::make_unique<OveruseFrameDetector>(encoder_stats_observer),
|
2019-03-01 11:50:20 +01:00
|
|
|
task_queue_factory);
|
2018-07-24 09:29:58 +02:00
|
|
|
}
|
2019-03-01 11:50:20 +01:00
|
|
|
|
2018-07-24 09:29:58 +02:00
|
|
|
} // namespace webrtc
|