OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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/codecs/builtin_audio_encoder_factory.h" | 11 #include "webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory_inter
nal.h" |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
18 #include "webrtc/base/optional.h" | 18 #include "webrtc/base/optional.h" |
19 #include "webrtc/common_types.h" | 19 #include "webrtc/common_types.h" |
20 #include "webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h" | 20 #include "webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h" |
21 #ifdef WEBRTC_CODEC_G722 | 21 #ifdef WEBRTC_CODEC_G722 |
22 #include "webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h" | 22 #include "webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h" |
23 #endif | 23 #endif |
24 #ifdef WEBRTC_CODEC_ILBC | 24 #ifdef WEBRTC_CODEC_ILBC |
25 #include "webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h" | 25 #include "webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h" |
26 #endif | 26 #endif |
27 #ifdef WEBRTC_CODEC_ISACFX | 27 #ifdef WEBRTC_CODEC_ISACFX |
28 #include "webrtc/modules/audio_coding/codecs/isac/fix/include/audio_encoder_isac
fix.h" | 28 #include "webrtc/modules/audio_coding/codecs/isac/fix/include/audio_encoder_isac
fix.h" // nogncheck |
29 #endif | 29 #endif |
30 #ifdef WEBRTC_CODEC_ISAC | 30 #ifdef WEBRTC_CODEC_ISAC |
31 #include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isa
c.h" | 31 #include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isa
c.h" // nogncheck |
32 #endif | 32 #endif |
33 #ifdef WEBRTC_CODEC_OPUS | 33 #ifdef WEBRTC_CODEC_OPUS |
34 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" | 34 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" |
35 #endif | 35 #endif |
36 #include "webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h" | 36 #include "webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h" |
37 | 37 |
38 namespace webrtc { | 38 namespace webrtc { |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 const SdpAudioFormat& format) override { | 128 const SdpAudioFormat& format) override { |
129 for (const auto& ef : encoder_factories) { | 129 for (const auto& ef : encoder_factories) { |
130 if (STR_CASE_CMP(format.name.c_str(), ef.name) == 0) { | 130 if (STR_CASE_CMP(format.name.c_str(), ef.name) == 0) { |
131 return ef.MakeAudioEncoder(payload_type, format); | 131 return ef.MakeAudioEncoder(payload_type, format); |
132 } | 132 } |
133 } | 133 } |
134 return nullptr; | 134 return nullptr; |
135 } | 135 } |
136 }; | 136 }; |
137 | 137 |
138 rtc::scoped_refptr<AudioEncoderFactory> CreateBuiltinAudioEncoderFactory() { | 138 rtc::scoped_refptr<AudioEncoderFactory> |
| 139 CreateBuiltinAudioEncoderFactoryInternal() { |
139 return rtc::scoped_refptr<AudioEncoderFactory>( | 140 return rtc::scoped_refptr<AudioEncoderFactory>( |
140 new rtc::RefCountedObject<BuiltinAudioEncoderFactory>()); | 141 new rtc::RefCountedObject<BuiltinAudioEncoderFactory>()); |
141 } | 142 } |
142 | 143 |
143 } // namespace webrtc | 144 } // namespace webrtc |
OLD | NEW |