Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc

Issue 2697453004: WebRtcVoiceEngineTest: Changed a static_cast to a checked_cast. (Closed)
Patch Set: Rebased. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698