blob: fa93ab82e9c414cf82d22acd3f45e33423c60c74 [file] [log] [blame]
Anders Carlssondd3e0ab2018-06-12 09:15:561/*
2 * Copyright (c) 2016 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_CODECS_VIDEO_ENCODER_SOFTWARE_FALLBACK_WRAPPER_H_
12#define API_VIDEO_CODECS_VIDEO_ENCODER_SOFTWARE_FALLBACK_WRAPPER_H_
13
14#include <memory>
15
16#include "api/video_codecs/video_encoder.h"
Mirko Bonadei66e76792019-04-02 09:33:5917#include "rtc_base/system/rtc_export.h"
Anders Carlssondd3e0ab2018-06-12 09:15:5618
19namespace webrtc {
20
21// Used to wrap external VideoEncoders to provide a fallback option on
22// software encoding when a hardware encoder fails to encode a stream due to
23// hardware restrictions, such as max resolution.
Mirko Bonadei66e76792019-04-02 09:33:5924RTC_EXPORT std::unique_ptr<VideoEncoder>
25CreateVideoEncoderSoftwareFallbackWrapper(
Anders Carlssondd3e0ab2018-06-12 09:15:5626 std::unique_ptr<VideoEncoder> sw_fallback_encoder,
27 std::unique_ptr<VideoEncoder> hw_encoder);
28
29} // namespace webrtc
30
31#endif // API_VIDEO_CODECS_VIDEO_ENCODER_SOFTWARE_FALLBACK_WRAPPER_H_