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 WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H | 11 #ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |
12 #define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H | 12 #define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/system_wrappers/include/atomic32.h" | 16 #include "webrtc/system_wrappers/include/atomic32.h" |
17 #include "webrtc/typedefs.h" | 17 #include "webrtc/typedefs.h" |
18 #include "webrtc/voice_engine/voe_base_impl.h" | 18 #include "webrtc/voice_engine/voe_base_impl.h" |
19 #include "webrtc/voice_engine/voe_audio_processing_impl.h" | 19 #include "webrtc/voice_engine/voe_audio_processing_impl.h" |
20 #include "webrtc/voice_engine/voe_codec_impl.h" | 20 #include "webrtc/voice_engine/voe_codec_impl.h" |
21 #include "webrtc/voice_engine/voe_file_impl.h" | 21 #include "webrtc/voice_engine/voe_file_impl.h" |
22 #include "webrtc/voice_engine/voe_hardware_impl.h" | 22 #include "webrtc/voice_engine/voe_hardware_impl.h" |
23 #include "webrtc/voice_engine/voe_neteq_stats_impl.h" | 23 #include "webrtc/voice_engine/voe_neteq_stats_impl.h" |
24 #include "webrtc/voice_engine/voe_network_impl.h" | 24 #include "webrtc/voice_engine/voe_network_impl.h" |
25 #include "webrtc/voice_engine/voe_rtp_rtcp_impl.h" | 25 #include "webrtc/voice_engine/voe_rtp_rtcp_impl.h" |
26 #include "webrtc/voice_engine/voe_video_sync_impl.h" | |
27 #include "webrtc/voice_engine/voe_volume_control_impl.h" | 26 #include "webrtc/voice_engine/voe_volume_control_impl.h" |
28 | 27 |
29 namespace webrtc { | 28 namespace webrtc { |
30 namespace voe { | 29 namespace voe { |
31 class ChannelProxy; | 30 class ChannelProxy; |
32 } // namespace voe | 31 } // namespace voe |
33 | 32 |
34 class VoiceEngineImpl : public voe::SharedData, // Must be the first base class | 33 class VoiceEngineImpl : public voe::SharedData, // Must be the first base class |
35 public VoiceEngine, | 34 public VoiceEngine, |
36 public VoEAudioProcessingImpl, | 35 public VoEAudioProcessingImpl, |
37 public VoECodecImpl, | 36 public VoECodecImpl, |
38 public VoEFileImpl, | 37 public VoEFileImpl, |
39 public VoEHardwareImpl, | 38 public VoEHardwareImpl, |
40 public VoENetEqStatsImpl, | 39 public VoENetEqStatsImpl, |
41 public VoENetworkImpl, | 40 public VoENetworkImpl, |
42 public VoERTP_RTCPImpl, | 41 public VoERTP_RTCPImpl, |
43 public VoEVideoSyncImpl, | |
44 public VoEVolumeControlImpl, | 42 public VoEVolumeControlImpl, |
45 public VoEBaseImpl { | 43 public VoEBaseImpl { |
46 public: | 44 public: |
47 VoiceEngineImpl() | 45 VoiceEngineImpl() |
48 : SharedData(), | 46 : SharedData(), |
49 VoEAudioProcessingImpl(this), | 47 VoEAudioProcessingImpl(this), |
50 VoECodecImpl(this), | 48 VoECodecImpl(this), |
51 VoEFileImpl(this), | 49 VoEFileImpl(this), |
52 VoEHardwareImpl(this), | 50 VoEHardwareImpl(this), |
53 VoENetEqStatsImpl(this), | 51 VoENetEqStatsImpl(this), |
54 VoENetworkImpl(this), | 52 VoENetworkImpl(this), |
55 VoERTP_RTCPImpl(this), | 53 VoERTP_RTCPImpl(this), |
56 VoEVideoSyncImpl(this), | |
57 VoEVolumeControlImpl(this), | 54 VoEVolumeControlImpl(this), |
58 VoEBaseImpl(this), | 55 VoEBaseImpl(this), |
59 _ref_count(0) {} | 56 _ref_count(0) {} |
60 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } | 57 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } |
61 | 58 |
62 int AddRef(); | 59 int AddRef(); |
63 | 60 |
64 // This implements the Release() method for all the inherited interfaces. | 61 // This implements the Release() method for all the inherited interfaces. |
65 int Release() override; | 62 int Release() override; |
66 | 63 |
67 // Backdoor to access a voe::Channel object without a channel ID. This is only | 64 // Backdoor to access a voe::Channel object without a channel ID. This is only |
68 // to be used while refactoring the VoE API! | 65 // to be used while refactoring the VoE API! |
69 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id); | 66 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id); |
70 | 67 |
71 // This is *protected* so that FakeVoiceEngine can inherit from the class and | 68 // This is *protected* so that FakeVoiceEngine can inherit from the class and |
72 // manipulate the reference count. See: fake_voice_engine.h. | 69 // manipulate the reference count. See: fake_voice_engine.h. |
73 protected: | 70 protected: |
74 Atomic32 _ref_count; | 71 Atomic32 _ref_count; |
75 }; | 72 }; |
76 | 73 |
77 } // namespace webrtc | 74 } // namespace webrtc |
78 | 75 |
79 #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H | 76 #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |
OLD | NEW |