diff options
Diffstat (limited to 'third_party/libwebrtc/api/audio_codecs')
-rw-r--r-- | third_party/libwebrtc/api/audio_codecs/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/libwebrtc/api/audio_codecs/audio_encoder.h | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/third_party/libwebrtc/api/audio_codecs/BUILD.gn b/third_party/libwebrtc/api/audio_codecs/BUILD.gn index 2719942488..fc02b2d834 100644 --- a/third_party/libwebrtc/api/audio_codecs/BUILD.gn +++ b/third_party/libwebrtc/api/audio_codecs/BUILD.gn @@ -42,6 +42,7 @@ rtc_library("audio_codecs_api") { "../../rtc_base:refcount", "../../rtc_base:sanitizer", "../../rtc_base/system:rtc_export", + "../units:data_rate", "../units:time_delta", ] absl_deps = [ diff --git a/third_party/libwebrtc/api/audio_codecs/audio_encoder.h b/third_party/libwebrtc/api/audio_codecs/audio_encoder.h index 7f5a34214f..7b5ee7a866 100644 --- a/third_party/libwebrtc/api/audio_codecs/audio_encoder.h +++ b/third_party/libwebrtc/api/audio_codecs/audio_encoder.h @@ -20,6 +20,7 @@ #include "absl/types/optional.h" #include "api/array_view.h" #include "api/call/bitrate_allocation.h" +#include "api/units/data_rate.h" #include "api/units/time_delta.h" #include "rtc_base/buffer.h" @@ -240,12 +241,20 @@ class AudioEncoder { // Get statistics related to audio network adaptation. virtual ANAStats GetANAStats() const; - // The range of frame lengths that are supported or nullopt if there's no sch - // information. This is used to calculated the full bitrate range, including - // overhead. + // The range of frame lengths that are supported or nullopt if there's no such + // information. This is used together with the bitrate range to calculate the + // full bitrate range, including overhead. virtual absl::optional<std::pair<TimeDelta, TimeDelta>> GetFrameLengthRange() const = 0; + // The range of payload bitrates that are supported. This is used together + // with the frame length range to calculate the full bitrate range, including + // overhead. + virtual absl::optional<std::pair<DataRate, DataRate>> GetBitrateRange() + const { + return absl::nullopt; + } + // The maximum number of audio channels supported by WebRTC encoders. static constexpr int kMaxNumberOfChannels = 24; |