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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/codec_manager.h

Issue 1406123011: Let AudioCodingModule::SendCodec return Maybe<CodecInst> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fix Created 5 years, 1 month 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_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/scoped_ptr.h" 16 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/base/thread_checker.h" 17 #include "webrtc/base/thread_checker.h"
17 #include "webrtc/modules/audio_coding/main/acm2/codec_owner.h" 18 #include "webrtc/modules/audio_coding/main/acm2/codec_owner.h"
18 #include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs. h" 19 #include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs. h"
19 #include "webrtc/common_types.h" 20 #include "webrtc/common_types.h"
20 21
21 namespace webrtc { 22 namespace webrtc {
22 23
23 class AudioDecoder; 24 class AudioDecoder;
24 class AudioEncoder; 25 class AudioEncoder;
25 26
26 namespace acm2 { 27 namespace acm2 {
27 28
28 class CodecManager final { 29 class CodecManager final {
29 public: 30 public:
30 CodecManager(); 31 CodecManager();
31 ~CodecManager(); 32 ~CodecManager();
32 33
33 int RegisterEncoder(const CodecInst& send_codec); 34 int RegisterEncoder(const CodecInst& send_codec);
34 35
35 void RegisterEncoder(AudioEncoder* external_speech_encoder); 36 void RegisterEncoder(AudioEncoder* external_speech_encoder);
36 37
37 int GetCodecInst(CodecInst* current_codec) const; 38 rtc::Maybe<CodecInst> GetCodecInst() const;
38 39
39 bool SetCopyRed(bool enable); 40 bool SetCopyRed(bool enable);
40 41
41 int SetVAD(bool enable, ACMVADMode mode); 42 int SetVAD(bool enable, ACMVADMode mode);
42 43
43 void VAD(bool* dtx_enabled, bool* vad_enabled, ACMVADMode* mode) const; 44 void VAD(bool* dtx_enabled, bool* vad_enabled, ACMVADMode* mode) const;
44 45
45 int SetCodecFEC(bool enable_codec_fec); 46 int SetCodecFEC(bool enable_codec_fec);
46 47
47 // Returns a pointer to AudioDecoder of the given codec. For iSAC, encoding 48 // Returns a pointer to AudioDecoder of the given codec. For iSAC, encoding
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool codec_fec_enabled_; 82 bool codec_fec_enabled_;
82 CodecOwner codec_owner_; 83 CodecOwner codec_owner_;
83 bool encoder_is_opus_; 84 bool encoder_is_opus_;
84 85
85 RTC_DISALLOW_COPY_AND_ASSIGN(CodecManager); 86 RTC_DISALLOW_COPY_AND_ASSIGN(CodecManager);
86 }; 87 };
87 88
88 } // namespace acm2 89 } // namespace acm2
89 } // namespace webrtc 90 } // namespace webrtc
90 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_ 91 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698