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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 bool IsPcmU(const CodecInst& codec) { | 45 bool IsPcmU(const CodecInst& codec) { |
46 return !STR_CASE_CMP(codec.plname, "pcmu"); | 46 return !STR_CASE_CMP(codec.plname, "pcmu"); |
47 } | 47 } |
48 | 48 |
49 bool IsPcmA(const CodecInst& codec) { | 49 bool IsPcmA(const CodecInst& codec) { |
50 return !STR_CASE_CMP(codec.plname, "pcma"); | 50 return !STR_CASE_CMP(codec.plname, "pcma"); |
51 } | 51 } |
52 | 52 |
53 bool IsPcm16B(const CodecInst& codec) { | 53 bool IsPcm16B(const CodecInst& codec) { |
54 return | 54 return !STR_CASE_CMP(codec.plname, "l16"); |
55 #ifdef WEBRTC_CODEC_PCM16 | |
56 !STR_CASE_CMP(codec.plname, "l16") || | |
57 #endif | |
58 false; | |
59 } | 55 } |
60 | 56 |
61 bool IsIlbc(const CodecInst& codec) { | 57 bool IsIlbc(const CodecInst& codec) { |
62 return | 58 return |
63 #ifdef WEBRTC_CODEC_ILBC | 59 #ifdef WEBRTC_CODEC_ILBC |
64 !STR_CASE_CMP(codec.plname, "ilbc") || | 60 !STR_CASE_CMP(codec.plname, "ilbc") || |
65 #endif | 61 #endif |
66 false; | 62 false; |
67 } | 63 } |
68 | 64 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 230 } |
235 | 231 |
236 const AudioEncoder* CodecOwner::SpeechEncoder() const { | 232 const AudioEncoder* CodecOwner::SpeechEncoder() const { |
237 DCHECK(!speech_encoder_ || !external_speech_encoder_); | 233 DCHECK(!speech_encoder_ || !external_speech_encoder_); |
238 return external_speech_encoder_ ? external_speech_encoder_ | 234 return external_speech_encoder_ ? external_speech_encoder_ |
239 : speech_encoder_.get(); | 235 : speech_encoder_.get(); |
240 } | 236 } |
241 | 237 |
242 } // namespace acm2 | 238 } // namespace acm2 |
243 } // namespace webrtc | 239 } // namespace webrtc |
OLD | NEW |