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 | 17 |
17 #include "webrtc/base/array_view.h" | 18 #include "webrtc/base/array_view.h" |
18 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/base/constructormagic.h" |
19 #include "webrtc/base/optional.h" | 20 #include "webrtc/base/optional.h" |
20 #include "webrtc/base/scoped_ptr.h" | |
21 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h" | 21 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h" |
22 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" | 22 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" |
23 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" | 23 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" |
24 #include "webrtc/typedefs.h" | 24 #include "webrtc/typedefs.h" |
25 | 25 |
26 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) | 26 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) |
27 #include "webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h" | 27 #include "webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h" |
28 #else | 28 #else |
29 // Dummy implementation, for when we don't have iSAC. | 29 // Dummy implementation, for when we don't have iSAC. |
30 namespace webrtc { | 30 namespace webrtc { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // encoder is live until the next successful call to this function, or until | 222 // encoder is live until the next successful call to this function, or until |
223 // the Rent-A-Codec is destroyed. | 223 // the Rent-A-Codec is destroyed. |
224 AudioEncoder* RentEncoderStack(StackParameters* param); | 224 AudioEncoder* RentEncoderStack(StackParameters* param); |
225 | 225 |
226 // Creates and returns an iSAC decoder, which will remain live until the | 226 // Creates and returns an iSAC decoder, which will remain live until the |
227 // Rent-A-Codec is destroyed. Subsequent calls will simply return the same | 227 // Rent-A-Codec is destroyed. Subsequent calls will simply return the same |
228 // object. | 228 // object. |
229 AudioDecoder* RentIsacDecoder(); | 229 AudioDecoder* RentIsacDecoder(); |
230 | 230 |
231 private: | 231 private: |
232 rtc::scoped_ptr<AudioEncoder> speech_encoder_; | 232 std::unique_ptr<AudioEncoder> speech_encoder_; |
233 rtc::scoped_ptr<AudioEncoder> cng_encoder_; | 233 std::unique_ptr<AudioEncoder> cng_encoder_; |
234 rtc::scoped_ptr<AudioEncoder> red_encoder_; | 234 std::unique_ptr<AudioEncoder> red_encoder_; |
235 rtc::scoped_ptr<AudioDecoder> isac_decoder_; | 235 std::unique_ptr<AudioDecoder> isac_decoder_; |
236 LockedIsacBandwidthInfo isac_bandwidth_info_; | 236 LockedIsacBandwidthInfo isac_bandwidth_info_; |
237 | 237 |
238 RTC_DISALLOW_COPY_AND_ASSIGN(RentACodec); | 238 RTC_DISALLOW_COPY_AND_ASSIGN(RentACodec); |
239 }; | 239 }; |
240 | 240 |
241 } // namespace acm2 | 241 } // namespace acm2 |
242 } // namespace webrtc | 242 } // namespace webrtc |
243 | 243 |
244 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ | 244 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ |
OLD | NEW |