blob: ddb198a96ee00d3a0127d8bcf1863c63a14ee4c9 [file] [log] [blame]
Henrik Boströmb0f2e0c2020-03-06 13:32:03 +01001/*
2 * Copyright 2020 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 CALL_ADAPTATION_ENCODER_SETTINGS_H_
12#define CALL_ADAPTATION_ENCODER_SETTINGS_H_
13
14#include "absl/types/optional.h"
15#include "api/video_codecs/video_codec.h"
16#include "api/video_codecs/video_encoder.h"
17#include "api/video_codecs/video_encoder_config.h"
18
19namespace webrtc {
20
21// Information about an encoder available when reconfiguring the encoder.
22class EncoderSettings {
23 public:
24 EncoderSettings(VideoEncoder::EncoderInfo encoder_info,
25 VideoEncoderConfig encoder_config,
26 VideoCodec video_codec);
Henrik Boström453953c2020-03-14 10:53:57 +010027 EncoderSettings(const EncoderSettings& other);
28 EncoderSettings& operator=(const EncoderSettings& other);
Henrik Boströmb0f2e0c2020-03-06 13:32:03 +010029
30 // Encoder capabilities, implementation info, etc.
31 const VideoEncoder::EncoderInfo& encoder_info() const;
32 // Configuration parameters, ultimately coming from the API and negotiation.
33 const VideoEncoderConfig& encoder_config() const;
34 // Lower level config, heavily based on the VideoEncoderConfig.
35 const VideoCodec& video_codec() const;
36
37 private:
38 VideoEncoder::EncoderInfo encoder_info_;
39 VideoEncoderConfig encoder_config_;
40 VideoCodec video_codec_;
41};
42
43VideoCodecType GetVideoCodecTypeOrGeneric(
44 const absl::optional<EncoderSettings>& settings);
45
46} // namespace webrtc
47
48#endif // CALL_ADAPTATION_ENCODER_SETTINGS_H_