Chromium Code Reviews

Side by Side Diff: voice_engine/voice_engine_impl.h

Issue 3016543002: Remove VoENetwork (Closed)
Patch Set: rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« voice_engine/channel.h ('K') | « voice_engine/voice_engine_fixture.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 VOICE_ENGINE_VOICE_ENGINE_IMPL_H_ 11 #ifndef VOICE_ENGINE_VOICE_ENGINE_IMPL_H_
12 #define VOICE_ENGINE_VOICE_ENGINE_IMPL_H_ 12 #define VOICE_ENGINE_VOICE_ENGINE_IMPL_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "system_wrappers/include/atomic32.h" 16 #include "system_wrappers/include/atomic32.h"
17 #include "typedefs.h" // NOLINT(build/include) 17 #include "typedefs.h" // NOLINT(build/include)
18 #include "voice_engine/voe_base_impl.h" 18 #include "voice_engine/voe_base_impl.h"
19 #include "voice_engine/voe_network_impl.h"
20 19
21 namespace webrtc { 20 namespace webrtc {
22 namespace voe { 21 namespace voe {
23 class ChannelProxy; 22 class ChannelProxy;
24 } // namespace voe 23 } // namespace voe
25 24
26 class VoiceEngineImpl : public voe::SharedData, // Must be the first base class 25 class VoiceEngineImpl : public voe::SharedData, // Must be the first base class
27 public VoiceEngine, 26 public VoiceEngine,
28 public VoENetworkImpl,
29 public VoEBaseImpl { 27 public VoEBaseImpl {
30 public: 28 public:
31 VoiceEngineImpl() 29 VoiceEngineImpl()
32 : SharedData(), 30 : SharedData(),
33 VoENetworkImpl(this),
34 VoEBaseImpl(this), 31 VoEBaseImpl(this),
35 _ref_count(0) {} 32 _ref_count(0) {}
36 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } 33 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); }
37 34
38 int AddRef(); 35 int AddRef();
39 36
40 // This implements the Release() method for all the inherited interfaces. 37 // This implements the Release() method for all the inherited interfaces.
41 int Release() override; 38 int Release() override;
42 39
43 // Backdoor to access a voe::Channel object without a channel ID. This is only 40 // Backdoor to access a voe::Channel object without a channel ID. This is only
44 // to be used while refactoring the VoE API! 41 // to be used while refactoring the VoE API!
45 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id); 42 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id);
46 43
47 // This is *protected* so that FakeVoiceEngine can inherit from the class and 44 // This is *protected* so that FakeVoiceEngine can inherit from the class and
48 // manipulate the reference count. See: fake_voice_engine.h. 45 // manipulate the reference count. See: fake_voice_engine.h.
49 protected: 46 protected:
50 Atomic32 _ref_count; 47 Atomic32 _ref_count;
51 }; 48 };
52 49
53 } // namespace webrtc 50 } // namespace webrtc
54 51
55 #endif // VOICE_ENGINE_VOICE_ENGINE_IMPL_H_ 52 #endif // VOICE_ENGINE_VOICE_ENGINE_IMPL_H_
OLDNEW
« voice_engine/channel.h ('K') | « voice_engine/voice_engine_fixture.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine