| 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 "video/config/video_encoder_config.h" |
| 18 |
| 19 | namespace webrtc { |
| 20 |
| 21 | // Information about an encoder available when reconfiguring the encoder. |
| 22 | class EncoderSettings { |
| 23 | public: |
| 24 | EncoderSettings(VideoEncoder::EncoderInfo encoder_info, |
| 25 | VideoEncoderConfig encoder_config, |
| 26 | VideoCodec video_codec); |
| 27 | EncoderSettings(const EncoderSettings& other); |
| 28 | EncoderSettings& operator=(const EncoderSettings& other); |
| 29 |
| 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 |
| 43 | VideoCodecType GetVideoCodecTypeOrGeneric( |
| 44 | const absl::optional<EncoderSettings>& settings); |
| 45 |
| 46 | } // namespace webrtc |
| 47 |
| 48 | #endif // CALL_ADAPTATION_ENCODER_SETTINGS_H_ |
| 49 |