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_MAIN_ACM2_CODEC_MANAGER_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_ |
13 | 13 |
14 #include "webrtc/base/constructormagic.h" | 14 #include "webrtc/base/constructormagic.h" |
15 #include "webrtc/base/maybe.h" | 15 #include "webrtc/base/optional.h" |
16 #include "webrtc/base/scoped_ptr.h" | 16 #include "webrtc/base/scoped_ptr.h" |
17 #include "webrtc/base/thread_checker.h" | 17 #include "webrtc/base/thread_checker.h" |
18 #include "webrtc/modules/audio_coding/main/acm2/codec_owner.h" | 18 #include "webrtc/modules/audio_coding/main/acm2/codec_owner.h" |
19 #include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h" | 19 #include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h" |
20 #include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.
h" | 20 #include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.
h" |
21 #include "webrtc/common_types.h" | 21 #include "webrtc/common_types.h" |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 | 24 |
25 class AudioDecoder; | 25 class AudioDecoder; |
26 class AudioEncoder; | 26 class AudioEncoder; |
27 | 27 |
28 namespace acm2 { | 28 namespace acm2 { |
29 | 29 |
30 class CodecManager final { | 30 class CodecManager final { |
31 public: | 31 public: |
32 CodecManager(); | 32 CodecManager(); |
33 ~CodecManager(); | 33 ~CodecManager(); |
34 | 34 |
35 int RegisterEncoder(const CodecInst& send_codec); | 35 int RegisterEncoder(const CodecInst& send_codec); |
36 | 36 |
37 void RegisterEncoder(AudioEncoder* external_speech_encoder); | 37 void RegisterEncoder(AudioEncoder* external_speech_encoder); |
38 | 38 |
39 rtc::Maybe<CodecInst> GetCodecInst() const; | 39 rtc::Optional<CodecInst> GetCodecInst() const; |
40 | 40 |
41 bool SetCopyRed(bool enable); | 41 bool SetCopyRed(bool enable); |
42 | 42 |
43 int SetVAD(bool enable, ACMVADMode mode); | 43 int SetVAD(bool enable, ACMVADMode mode); |
44 | 44 |
45 void VAD(bool* dtx_enabled, bool* vad_enabled, ACMVADMode* mode) const; | 45 void VAD(bool* dtx_enabled, bool* vad_enabled, ACMVADMode* mode) const; |
46 | 46 |
47 int SetCodecFEC(bool enable_codec_fec); | 47 int SetCodecFEC(bool enable_codec_fec); |
48 | 48 |
49 // Returns a pointer to AudioDecoder of the given codec. For iSAC, encoding | 49 // Returns a pointer to AudioDecoder of the given codec. For iSAC, encoding |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 CodecOwner codec_owner_; | 81 CodecOwner codec_owner_; |
82 RentACodec rent_a_codec_; | 82 RentACodec rent_a_codec_; |
83 bool encoder_is_opus_; | 83 bool encoder_is_opus_; |
84 | 84 |
85 RTC_DISALLOW_COPY_AND_ASSIGN(CodecManager); | 85 RTC_DISALLOW_COPY_AND_ASSIGN(CodecManager); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace acm2 | 88 } // namespace acm2 |
89 } // namespace webrtc | 89 } // namespace webrtc |
90 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_ | 90 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_ |
OLD | NEW |