OLD | NEW |
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return rtc_make_scoped_ptr(new AudioEncoderMutablePcmU(speech_inst)); | 120 return rtc_make_scoped_ptr(new AudioEncoderMutablePcmU(speech_inst)); |
121 } else if (IsPcmA(speech_inst)) { | 121 } else if (IsPcmA(speech_inst)) { |
122 return rtc_make_scoped_ptr(new AudioEncoderMutablePcmA(speech_inst)); | 122 return rtc_make_scoped_ptr(new AudioEncoderMutablePcmA(speech_inst)); |
123 } else if (IsPcm16B(speech_inst)) { | 123 } else if (IsPcm16B(speech_inst)) { |
124 return rtc_make_scoped_ptr(new AudioEncoderMutablePcm16B(speech_inst)); | 124 return rtc_make_scoped_ptr(new AudioEncoderMutablePcm16B(speech_inst)); |
125 } else if (IsIlbc(speech_inst)) { | 125 } else if (IsIlbc(speech_inst)) { |
126 return rtc_make_scoped_ptr(new AudioEncoderMutableIlbc(speech_inst)); | 126 return rtc_make_scoped_ptr(new AudioEncoderMutableIlbc(speech_inst)); |
127 } else if (IsG722(speech_inst)) { | 127 } else if (IsG722(speech_inst)) { |
128 return rtc_make_scoped_ptr(new AudioEncoderMutableG722(speech_inst)); | 128 return rtc_make_scoped_ptr(new AudioEncoderMutableG722(speech_inst)); |
129 } else { | 129 } else { |
130 FATAL(); | 130 FATAL() << "Could not create encoder of type " << speech_inst.plname; |
131 return rtc::scoped_ptr<AudioEncoderMutable>(); | 131 return rtc::scoped_ptr<AudioEncoderMutable>(); |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 AudioEncoder* CreateRedEncoder(int red_payload_type, | 135 AudioEncoder* CreateRedEncoder(int red_payload_type, |
136 AudioEncoder* encoder, | 136 AudioEncoder* encoder, |
137 rtc::scoped_ptr<AudioEncoder>* red_encoder) { | 137 rtc::scoped_ptr<AudioEncoder>* red_encoder) { |
138 if (red_payload_type == -1) { | 138 if (red_payload_type == -1) { |
139 red_encoder->reset(); | 139 red_encoder->reset(); |
140 return encoder; | 140 return encoder; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 236 } |
237 | 237 |
238 const AudioEncoderMutable* CodecOwner::SpeechEncoder() const { | 238 const AudioEncoderMutable* CodecOwner::SpeechEncoder() const { |
239 DCHECK(!speech_encoder_ || !external_speech_encoder_); | 239 DCHECK(!speech_encoder_ || !external_speech_encoder_); |
240 return external_speech_encoder_ ? external_speech_encoder_ | 240 return external_speech_encoder_ ? external_speech_encoder_ |
241 : speech_encoder_.get(); | 241 : speech_encoder_.get(); |
242 } | 242 } |
243 | 243 |
244 } // namespace acm2 | 244 } // namespace acm2 |
245 } // namespace webrtc | 245 } // namespace webrtc |
OLD | NEW |