Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: webrtc/modules/audio_coding/acm2/rent_a_codec.h

Issue 1928293002: NetEq: Use a BuiltinAudioDecoderFactory to create decoders (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/base/array_view.h" 18 #include "webrtc/base/array_view.h"
19 #include "webrtc/base/constructormagic.h" 19 #include "webrtc/base/constructormagic.h"
20 #include "webrtc/base/optional.h" 20 #include "webrtc/base/optional.h"
21 #include "webrtc/base/scoped_ref_ptr.h" 21 #include "webrtc/base/scoped_ref_ptr.h"
22 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h" 22 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
23 #include "webrtc/modules/audio_coding/codecs/audio_format.h"
23 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" 24 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
24 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" 25 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
25 #include "webrtc/typedefs.h" 26 #include "webrtc/typedefs.h"
26 27
27 namespace webrtc { 28 namespace webrtc {
28 29
29 struct CodecInst; 30 struct CodecInst;
30 class LockedIsacBandwidthInfo; 31 class LockedIsacBandwidthInfo;
31 32
32 namespace acm2 { 33 namespace acm2 {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 kDecoderAVT, 129 kDecoderAVT,
129 kDecoderCNGnb, 130 kDecoderCNGnb,
130 kDecoderCNGwb, 131 kDecoderCNGwb,
131 kDecoderCNGswb32kHz, 132 kDecoderCNGswb32kHz,
132 kDecoderCNGswb48kHz, 133 kDecoderCNGswb48kHz,
133 kDecoderArbitrary, 134 kDecoderArbitrary,
134 kDecoderOpus, 135 kDecoderOpus,
135 kDecoderOpus_2ch, 136 kDecoderOpus_2ch,
136 }; 137 };
137 138
139 static rtc::Optional<SdpAudioFormat> NetEqDecoderToSdpAudioFormat(
140 NetEqDecoder nd);
141
138 static inline size_t NumberOfCodecs() { 142 static inline size_t NumberOfCodecs() {
139 return static_cast<size_t>(CodecId::kNumCodecs); 143 return static_cast<size_t>(CodecId::kNumCodecs);
140 } 144 }
141 145
142 static inline rtc::Optional<int> CodecIndexFromId(CodecId codec_id) { 146 static inline rtc::Optional<int> CodecIndexFromId(CodecId codec_id) {
143 const int i = static_cast<int>(codec_id); 147 const int i = static_cast<int>(codec_id);
144 return i >= 0 && i < static_cast<int>(NumberOfCodecs()) 148 return i >= 0 && i < static_cast<int>(NumberOfCodecs())
145 ? rtc::Optional<int>(i) 149 ? rtc::Optional<int>(i)
146 : rtc::Optional<int>(); 150 : rtc::Optional<int>();
147 } 151 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 std::unique_ptr<AudioEncoder> red_encoder_; 228 std::unique_ptr<AudioEncoder> red_encoder_;
225 rtc::scoped_refptr<LockedIsacBandwidthInfo> isac_bandwidth_info_; 229 rtc::scoped_refptr<LockedIsacBandwidthInfo> isac_bandwidth_info_;
226 230
227 RTC_DISALLOW_COPY_AND_ASSIGN(RentACodec); 231 RTC_DISALLOW_COPY_AND_ASSIGN(RentACodec);
228 }; 232 };
229 233
230 } // namespace acm2 234 } // namespace acm2
231 } // namespace webrtc 235 } // namespace webrtc
232 236
233 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ 237 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698