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