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