| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } else { | 168 } else { |
| 169 return false; | 169 return false; |
| 170 } | 170 } |
| 171 }}, | 171 }}, |
| 172 #endif | 172 #endif |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 class BuiltinAudioDecoderFactory : public AudioDecoderFactory { | 175 class BuiltinAudioDecoderFactory : public AudioDecoderFactory { |
| 176 public: | 176 public: |
| 177 std::vector<AudioCodecSpec> GetSupportedDecoders() override { | 177 std::vector<AudioCodecSpec> GetSupportedDecoders() override { |
| 178 // Although this looks a bit strange, it means specs need only be initalized | 178 // Although this looks a bit strange, it means specs need only be |
| 179 // once, and that that initialization is thread-safe. | 179 // initialized once, and that that initialization is thread-safe. |
| 180 static std::vector<AudioCodecSpec> specs = [] { | 180 static std::vector<AudioCodecSpec> specs = [] { |
| 181 std::vector<AudioCodecSpec> specs; | 181 std::vector<AudioCodecSpec> specs; |
| 182 #ifdef WEBRTC_CODEC_OPUS | 182 #ifdef WEBRTC_CODEC_OPUS |
| 183 // clang-format off | 183 // clang-format off |
| 184 AudioCodecSpec opus({"opus", 48000, 2, { | 184 AudioCodecSpec opus({"opus", 48000, 2, { |
| 185 {"minptime", "10"}, | 185 {"minptime", "10"}, |
| 186 {"useinbandfec", "1"} | 186 {"useinbandfec", "1"} |
| 187 }}); | 187 }}); |
| 188 // clang-format on | 188 // clang-format on |
| 189 opus.allow_comfort_noise = false; | 189 opus.allow_comfort_noise = false; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 } // namespace | 242 } // namespace |
| 243 | 243 |
| 244 rtc::scoped_refptr<AudioDecoderFactory> | 244 rtc::scoped_refptr<AudioDecoderFactory> |
| 245 CreateBuiltinAudioDecoderFactoryInternal() { | 245 CreateBuiltinAudioDecoderFactoryInternal() { |
| 246 return rtc::scoped_refptr<AudioDecoderFactory>( | 246 return rtc::scoped_refptr<AudioDecoderFactory>( |
| 247 new rtc::RefCountedObject<BuiltinAudioDecoderFactory>); | 247 new rtc::RefCountedObject<BuiltinAudioDecoderFactory>); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace webrtc | 250 } // namespace webrtc |
| OLD | NEW |