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