Chromium Code Reviews| Index: webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc |
| diff --git a/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc b/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc |
| index 8ec08e4251b5b10943302666d828463b655550e9..45e26277e31b2bf6c17aefd1130ec3e13082485c 100644 |
| --- a/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc |
| +++ b/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc |
| @@ -180,32 +180,39 @@ class BuiltinAudioDecoderFactory : public AudioDecoderFactory { |
| static std::vector<AudioCodecSpec> specs = [] { |
| std::vector<AudioCodecSpec> specs; |
| #ifdef WEBRTC_CODEC_OPUS |
| + AudioCodecInfo opus_info{48000, 1, 64000, 6000, 510000}; |
| + opus_info.allow_comfort_noise = false; |
| + opus_info.supports_network_adaption = true; |
| // clang-format off |
| - AudioCodecSpec opus({"opus", 48000, 2, { |
| - {"minptime", "10"}, |
| - {"useinbandfec", "1"} |
| - }}); |
| + SdpAudioFormat opus_format({"opus", 48000, 2, { |
| + {"minptime", "10"}, |
| + {"useinbandfec", "1"} |
| + }}); |
| // clang-format on |
| - opus.allow_comfort_noise = false; |
| - opus.supports_network_adaption = true; |
| - specs.push_back(opus); |
| + specs.push_back({opus_format, opus_info}); |
|
kwiberg-webrtc
2017/03/24 12:43:25
std::move(opus_format)? Or make opus_format const?
ossu
2017/04/05 14:41:51
Acknowledged.
|
| #endif |
| #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) |
| - specs.push_back(AudioCodecSpec({"isac", 16000, 1})); |
| + specs.push_back(AudioCodecSpec{{"isac", 16000, 1}, |
| + {16000, 1, 32000, 10000, 56000}}); |
| #endif |
| #if (defined(WEBRTC_CODEC_ISAC)) |
| - specs.push_back(AudioCodecSpec({"isac", 32000, 1})); |
| + specs.push_back(AudioCodecSpec{{"isac", 32000, 1}, |
| + {32000, 1, 56000, 10000, 56000}}); |
| #endif |
| #ifdef WEBRTC_CODEC_G722 |
| - specs.push_back(AudioCodecSpec({"G722", 8000, 1})); |
| + specs.push_back(AudioCodecSpec{{"G722", 8000, 1}, |
| + {16000, 1, 64000}}); |
| #endif |
| #ifdef WEBRTC_CODEC_ILBC |
| - specs.push_back(AudioCodecSpec({"iLBC", 8000, 1})); |
| + specs.push_back(AudioCodecSpec{{"iLBC", 8000, 1}, |
| + {8000, 1, 13300}}); |
| #endif |
| - specs.push_back(AudioCodecSpec({"PCMU", 8000, 1})); |
| - specs.push_back(AudioCodecSpec({"PCMA", 8000, 1})); |
| + specs.push_back(AudioCodecSpec{{"PCMU", 8000, 1}, |
| + {8000, 1, 64000}}); |
| + specs.push_back(AudioCodecSpec{{"PCMA", 8000, 1}, |
| + {8000, 1, 64000}}); |
| return specs; |
| - }(); |
| + }(); |
| return specs; |
| } |