blob: 9cfd056409e2b5671c9dd8c695d1cc587d34c50d [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);
27
28 // Encoder capabilities, implementation info, etc.
29 const VideoEncoder::EncoderInfo& encoder_info() const;
30 // Configuration parameters, ultimately coming from the API and negotiation.
31 const VideoEncoderConfig& encoder_config() const;
32 // Lower level config, heavily based on the VideoEncoderConfig.
33 const VideoCodec& video_codec() const;
34
35 private:
36 VideoEncoder::EncoderInfo encoder_info_;
37 VideoEncoderConfig encoder_config_;
38 VideoCodec video_codec_;
39};
40
41VideoCodecType GetVideoCodecTypeOrGeneric(
42 const absl::optional<EncoderSettings>& settings);
43
44} // namespace webrtc
45
46#endif // CALL_ADAPTATION_ENCODER_SETTINGS_H_