OLD | NEW |
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_codec_impl.h" | 19 #include "voice_engine/voe_codec_impl.h" |
20 #include "voice_engine/voe_file_impl.h" | |
21 #include "voice_engine/voe_network_impl.h" | 20 #include "voice_engine/voe_network_impl.h" |
22 #include "voice_engine/voe_rtp_rtcp_impl.h" | 21 #include "voice_engine/voe_rtp_rtcp_impl.h" |
23 | 22 |
24 namespace webrtc { | 23 namespace webrtc { |
25 namespace voe { | 24 namespace voe { |
26 class ChannelProxy; | 25 class ChannelProxy; |
27 } // namespace voe | 26 } // namespace voe |
28 | 27 |
29 class VoiceEngineImpl : public voe::SharedData, // Must be the first base class | 28 class VoiceEngineImpl : public voe::SharedData, // Must be the first base class |
30 public VoiceEngine, | 29 public VoiceEngine, |
31 public VoECodecImpl, | 30 public VoECodecImpl, |
32 public VoEFileImpl, | |
33 public VoENetworkImpl, | 31 public VoENetworkImpl, |
34 public VoERTP_RTCPImpl, | 32 public VoERTP_RTCPImpl, |
35 public VoEBaseImpl { | 33 public VoEBaseImpl { |
36 public: | 34 public: |
37 VoiceEngineImpl() | 35 VoiceEngineImpl() |
38 : SharedData(), | 36 : SharedData(), |
39 VoECodecImpl(this), | 37 VoECodecImpl(this), |
40 VoEFileImpl(this), | |
41 VoENetworkImpl(this), | 38 VoENetworkImpl(this), |
42 VoERTP_RTCPImpl(this), | 39 VoERTP_RTCPImpl(this), |
43 VoEBaseImpl(this), | 40 VoEBaseImpl(this), |
44 _ref_count(0) {} | 41 _ref_count(0) {} |
45 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } | 42 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } |
46 | 43 |
47 int AddRef(); | 44 int AddRef(); |
48 | 45 |
49 // This implements the Release() method for all the inherited interfaces. | 46 // This implements the Release() method for all the inherited interfaces. |
50 int Release() override; | 47 int Release() override; |
51 | 48 |
52 // Backdoor to access a voe::Channel object without a channel ID. This is only | 49 // Backdoor to access a voe::Channel object without a channel ID. This is only |
53 // to be used while refactoring the VoE API! | 50 // to be used while refactoring the VoE API! |
54 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id); | 51 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id); |
55 | 52 |
56 // This is *protected* so that FakeVoiceEngine can inherit from the class and | 53 // This is *protected* so that FakeVoiceEngine can inherit from the class and |
57 // manipulate the reference count. See: fake_voice_engine.h. | 54 // manipulate the reference count. See: fake_voice_engine.h. |
58 protected: | 55 protected: |
59 Atomic32 _ref_count; | 56 Atomic32 _ref_count; |
60 }; | 57 }; |
61 | 58 |
62 } // namespace webrtc | 59 } // namespace webrtc |
63 | 60 |
64 #endif // VOICE_ENGINE_VOICE_ENGINE_IMPL_H_ | 61 #endif // VOICE_ENGINE_VOICE_ENGINE_IMPL_H_ |
OLD | NEW |