blob: 911727327cf76ac1f0ab80cb364cc61de102f3ac [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#ifndef API_VIDEO_VIDEO_STREAM_ENCODER_CREATE_H_
12#define API_VIDEO_VIDEO_STREAM_ENCODER_CREATE_H_
13
14#include <map>
15#include <memory>
16#include <utility>
17
18#include "api/video/video_stream_encoder_interface.h"
19#include "api/video/video_stream_encoder_observer.h"
20#include "api/video/video_stream_encoder_settings.h"
21
22namespace webrtc {
23
24std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder(
25 uint32_t number_of_cores,
26 VideoStreamEncoderObserver* encoder_stats_observer,
27 const VideoStreamEncoderSettings& settings,
28 // Deprecated, used for tests only.
29 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback);
30
31inline std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder(
32 uint32_t number_of_cores,
33 VideoStreamEncoderObserver* encoder_stats_observer,
34 const VideoStreamEncoderSettings& settings) {
35 return CreateVideoStreamEncoder(number_of_cores, encoder_stats_observer,
36 settings, nullptr);
37}
38
39} // namespace webrtc
40
41#endif // API_VIDEO_VIDEO_STREAM_ENCODER_CREATE_H_