AudioDecoderOpus: Add support for 16 kHz output sample rate

In addition to the 48 kHz that we've always used.

Bug: webrtc:10631
Change-Id: If73bf7ff9c1c0d22e0d1caa245128612850f8e41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138268
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28104}
This commit is contained in:
Karl Wiberg
2019-05-29 13:46:09 +02:00
committed by Commit Bot
parent ed69d41b62
commit 7eb0a5e210
5 changed files with 66 additions and 60 deletions

View File

@ -26,7 +26,9 @@ namespace webrtc {
// CreateAudioDecoderFactory<...>().
struct RTC_EXPORT AudioDecoderOpus {
struct Config {
int num_channels;
bool IsOk() const; // Checks if the values are currently OK.
int sample_rate_hz = 48000;
int num_channels = 1;
};
static absl::optional<Config> SdpToConfig(const SdpAudioFormat& audio_format);
static void AppendSupportedDecoders(std::vector<AudioCodecSpec>* specs);