| 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 #ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ |
| 13 | 13 |
| 14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 #include <map> | 15 #include <map> |
| 16 #include <memory> | 16 #include <memory> |
| 17 | 17 |
| 18 #include "webrtc/api/audio_codecs/audio_decoder.h" | 18 #include "webrtc/api/audio_codecs/audio_decoder.h" |
| 19 #include "webrtc/api/audio_codecs/audio_format.h" | |
| 20 #include "webrtc/base/array_view.h" | 19 #include "webrtc/base/array_view.h" |
| 21 #include "webrtc/base/constructormagic.h" | 20 #include "webrtc/base/constructormagic.h" |
| 22 #include "webrtc/base/optional.h" | 21 #include "webrtc/base/optional.h" |
| 23 #include "webrtc/base/scoped_ref_ptr.h" | 22 #include "webrtc/base/scoped_ref_ptr.h" |
| 24 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" | 23 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" |
| 25 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" | 24 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" |
| 25 #include "webrtc/modules/audio_coding/neteq/neteq_decoder_enum.h" |
| 26 #include "webrtc/typedefs.h" | 26 #include "webrtc/typedefs.h" |
| 27 | 27 |
| 28 namespace webrtc { | 28 namespace webrtc { |
| 29 | 29 |
| 30 struct CodecInst; | 30 struct CodecInst; |
| 31 class LockedIsacBandwidthInfo; | 31 class LockedIsacBandwidthInfo; |
| 32 | 32 |
| 33 namespace acm2 { | 33 namespace acm2 { |
| 34 | 34 |
| 35 class RentACodec { | 35 class RentACodec { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 #ifndef WEBRTC_CODEC_RED | 102 #ifndef WEBRTC_CODEC_RED |
| 103 kRED = -1, | 103 kRED = -1, |
| 104 #endif | 104 #endif |
| 105 #ifndef ENABLE_48000_HZ | 105 #ifndef ENABLE_48000_HZ |
| 106 kCNFB = -1, | 106 kCNFB = -1, |
| 107 #endif | 107 #endif |
| 108 | 108 |
| 109 kNone = -1 | 109 kNone = -1 |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 enum class NetEqDecoder { | |
| 113 kDecoderPCMu, | |
| 114 kDecoderPCMa, | |
| 115 kDecoderPCMu_2ch, | |
| 116 kDecoderPCMa_2ch, | |
| 117 kDecoderILBC, | |
| 118 kDecoderISAC, | |
| 119 kDecoderISACswb, | |
| 120 kDecoderPCM16B, | |
| 121 kDecoderPCM16Bwb, | |
| 122 kDecoderPCM16Bswb32kHz, | |
| 123 kDecoderPCM16Bswb48kHz, | |
| 124 kDecoderPCM16B_2ch, | |
| 125 kDecoderPCM16Bwb_2ch, | |
| 126 kDecoderPCM16Bswb32kHz_2ch, | |
| 127 kDecoderPCM16Bswb48kHz_2ch, | |
| 128 kDecoderPCM16B_5ch, | |
| 129 kDecoderG722, | |
| 130 kDecoderG722_2ch, | |
| 131 kDecoderRED, | |
| 132 kDecoderAVT, | |
| 133 kDecoderAVT16kHz, | |
| 134 kDecoderAVT32kHz, | |
| 135 kDecoderAVT48kHz, | |
| 136 kDecoderCNGnb, | |
| 137 kDecoderCNGwb, | |
| 138 kDecoderCNGswb32kHz, | |
| 139 kDecoderCNGswb48kHz, | |
| 140 kDecoderArbitrary, | |
| 141 kDecoderOpus, | |
| 142 kDecoderOpus_2ch, | |
| 143 }; | |
| 144 | |
| 145 static rtc::Optional<SdpAudioFormat> NetEqDecoderToSdpAudioFormat( | |
| 146 NetEqDecoder nd); | |
| 147 | |
| 148 static inline size_t NumberOfCodecs() { | 112 static inline size_t NumberOfCodecs() { |
| 149 return static_cast<size_t>(CodecId::kNumCodecs); | 113 return static_cast<size_t>(CodecId::kNumCodecs); |
| 150 } | 114 } |
| 151 | 115 |
| 152 static inline rtc::Optional<int> CodecIndexFromId(CodecId codec_id) { | 116 static inline rtc::Optional<int> CodecIndexFromId(CodecId codec_id) { |
| 153 const int i = static_cast<int>(codec_id); | 117 const int i = static_cast<int>(codec_id); |
| 154 return i >= 0 && i < static_cast<int>(NumberOfCodecs()) | 118 return i >= 0 && i < static_cast<int>(NumberOfCodecs()) |
| 155 ? rtc::Optional<int>(i) | 119 ? rtc::Optional<int>(i) |
| 156 : rtc::Optional<int>(); | 120 : rtc::Optional<int>(); |
| 157 } | 121 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 std::unique_ptr<AudioEncoder> red_encoder_; | 198 std::unique_ptr<AudioEncoder> red_encoder_; |
| 235 rtc::scoped_refptr<LockedIsacBandwidthInfo> isac_bandwidth_info_; | 199 rtc::scoped_refptr<LockedIsacBandwidthInfo> isac_bandwidth_info_; |
| 236 | 200 |
| 237 RTC_DISALLOW_COPY_AND_ASSIGN(RentACodec); | 201 RTC_DISALLOW_COPY_AND_ASSIGN(RentACodec); |
| 238 }; | 202 }; |
| 239 | 203 |
| 240 } // namespace acm2 | 204 } // namespace acm2 |
| 241 } // namespace webrtc | 205 } // namespace webrtc |
| 242 | 206 |
| 243 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ | 207 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ |
| OLD | NEW |