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