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

Side by Side Diff: webrtc/modules/audio_coding/acm2/rent_a_codec.cc

Issue 2934833002: G722 implementation of the AudioEncoderFactoryTemplate API (Closed)
Patch Set: rebase Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (STR_CASE_CMP(speech_inst.plname, "pcma") == 0) 170 if (STR_CASE_CMP(speech_inst.plname, "pcma") == 0)
171 return std::unique_ptr<AudioEncoder>(new AudioEncoderPcmA(speech_inst)); 171 return std::unique_ptr<AudioEncoder>(new AudioEncoderPcmA(speech_inst));
172 if (STR_CASE_CMP(speech_inst.plname, "l16") == 0) 172 if (STR_CASE_CMP(speech_inst.plname, "l16") == 0)
173 return std::unique_ptr<AudioEncoder>(new AudioEncoderPcm16B(speech_inst)); 173 return std::unique_ptr<AudioEncoder>(new AudioEncoderPcm16B(speech_inst));
174 #ifdef WEBRTC_CODEC_ILBC 174 #ifdef WEBRTC_CODEC_ILBC
175 if (STR_CASE_CMP(speech_inst.plname, "ilbc") == 0) 175 if (STR_CASE_CMP(speech_inst.plname, "ilbc") == 0)
176 return std::unique_ptr<AudioEncoder>(new AudioEncoderIlbc(speech_inst)); 176 return std::unique_ptr<AudioEncoder>(new AudioEncoderIlbc(speech_inst));
177 #endif 177 #endif
178 #ifdef WEBRTC_CODEC_G722 178 #ifdef WEBRTC_CODEC_G722
179 if (STR_CASE_CMP(speech_inst.plname, "g722") == 0) 179 if (STR_CASE_CMP(speech_inst.plname, "g722") == 0)
180 return std::unique_ptr<AudioEncoder>(new AudioEncoderG722(speech_inst)); 180 return std::unique_ptr<AudioEncoder>(new AudioEncoderG722Impl(speech_inst));
181 #endif 181 #endif
182 LOG_F(LS_ERROR) << "Could not create encoder of type " << speech_inst.plname; 182 LOG_F(LS_ERROR) << "Could not create encoder of type " << speech_inst.plname;
183 return std::unique_ptr<AudioEncoder>(); 183 return std::unique_ptr<AudioEncoder>();
184 } 184 }
185 185
186 std::unique_ptr<AudioEncoder> CreateRedEncoder( 186 std::unique_ptr<AudioEncoder> CreateRedEncoder(
187 std::unique_ptr<AudioEncoder> encoder, 187 std::unique_ptr<AudioEncoder> encoder,
188 int red_payload_type) { 188 int red_payload_type) {
189 #ifdef WEBRTC_CODEC_RED 189 #ifdef WEBRTC_CODEC_RED
190 AudioEncoderCopyRed::Config config; 190 AudioEncoderCopyRed::Config config;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 return encoder_stack; 306 return encoder_stack;
307 } 307 }
308 308
309 std::unique_ptr<AudioDecoder> RentACodec::RentIsacDecoder(int sample_rate_hz) { 309 std::unique_ptr<AudioDecoder> RentACodec::RentIsacDecoder(int sample_rate_hz) {
310 return CreateIsacDecoder(sample_rate_hz, isac_bandwidth_info_); 310 return CreateIsacDecoder(sample_rate_hz, isac_bandwidth_info_);
311 } 311 }
312 312
313 } // namespace acm2 313 } // namespace acm2
314 } // namespace webrtc 314 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698