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 |
11 #include "webrtc/modules/audio_coding/main/acm2/codec_owner.h" | 11 #include "webrtc/modules/audio_coding/main/acm2/codec_owner.h" |
12 | 12 |
13 #include "webrtc/base/checks.h" | 13 #include "webrtc/base/checks.h" |
14 #include "webrtc/engine_configurations.h" | 14 #include "webrtc/engine_configurations.h" |
15 #include "webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h" | 15 #include "webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h" |
16 #include "webrtc/modules/audio_coding/codecs/g711/include/audio_encoder_pcm.h" | 16 #include "webrtc/modules/audio_coding/codecs/g711/include/audio_encoder_pcm.h" |
| 17 #ifdef WEBRTC_CODEC_G722 |
17 #include "webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h" | 18 #include "webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h" |
| 19 #endif |
| 20 #ifdef WEBRTC_CODEC_ILBC |
18 #include "webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h
" | 21 #include "webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h
" |
| 22 #endif |
| 23 #ifdef WEBRTC_CODEC_ISACFX |
19 #include "webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_decoder_is
acfix.h" | 24 #include "webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_decoder_is
acfix.h" |
20 #include "webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_is
acfix.h" | 25 #include "webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_is
acfix.h" |
| 26 #endif |
| 27 #ifdef WEBRTC_CODEC_ISAC |
21 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_decoder_i
sac.h" | 28 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_decoder_i
sac.h" |
22 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_i
sac.h" | 29 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_i
sac.h" |
| 30 #endif |
| 31 #ifdef WEBRTC_CODEC_OPUS |
23 #include "webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
" | 32 #include "webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
" |
| 33 #endif |
24 #include "webrtc/modules/audio_coding/codecs/pcm16b/include/audio_encoder_pcm16b
.h" | 34 #include "webrtc/modules/audio_coding/codecs/pcm16b/include/audio_encoder_pcm16b
.h" |
| 35 #ifdef WEBRTC_CODEC_RED |
25 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h" | 36 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h" |
| 37 #endif |
26 | 38 |
27 namespace webrtc { | 39 namespace webrtc { |
28 namespace acm2 { | 40 namespace acm2 { |
29 | 41 |
30 namespace { | 42 namespace { |
31 bool IsIsac(const CodecInst& codec) { | 43 bool IsIsac(const CodecInst& codec) { |
32 return | 44 return |
33 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) | 45 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) |
34 !STR_CASE_CMP(codec.plname, "isac") || | 46 !STR_CASE_CMP(codec.plname, "isac") || |
35 #endif | 47 #endif |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 247 } |
236 | 248 |
237 const AudioEncoder* CodecOwner::SpeechEncoder() const { | 249 const AudioEncoder* CodecOwner::SpeechEncoder() const { |
238 RTC_DCHECK(!speech_encoder_ || !external_speech_encoder_); | 250 RTC_DCHECK(!speech_encoder_ || !external_speech_encoder_); |
239 return external_speech_encoder_ ? external_speech_encoder_ | 251 return external_speech_encoder_ ? external_speech_encoder_ |
240 : speech_encoder_.get(); | 252 : speech_encoder_.get(); |
241 } | 253 } |
242 | 254 |
243 } // namespace acm2 | 255 } // namespace acm2 |
244 } // namespace webrtc | 256 } // namespace webrtc |
OLD | NEW |