andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |
| 12 | #define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |
| 13 | |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 14 | #include "webrtc/engine_configurations.h" |
| 15 | #include "webrtc/system_wrappers/interface/atomic32.h" |
| 16 | #include "webrtc/voice_engine/voe_base_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 17 | |
| 18 | #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 19 | #include "webrtc/voice_engine/voe_audio_processing_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 20 | #endif |
| 21 | #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 22 | #include "webrtc/voice_engine/voe_call_report_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 23 | #endif |
| 24 | #ifdef WEBRTC_VOICE_ENGINE_CODEC_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 25 | #include "webrtc/voice_engine/voe_codec_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 26 | #endif |
| 27 | #ifdef WEBRTC_VOICE_ENGINE_DTMF_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 28 | #include "webrtc/voice_engine/voe_dtmf_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 29 | #endif |
| 30 | #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 31 | #include "webrtc/voice_engine/voe_encryption_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 32 | #endif |
| 33 | #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 34 | #include "webrtc/voice_engine/voe_external_media_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 35 | #endif |
| 36 | #ifdef WEBRTC_VOICE_ENGINE_FILE_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 37 | #include "webrtc/voice_engine/voe_file_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 38 | #endif |
| 39 | #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 40 | #include "webrtc/voice_engine/voe_hardware_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 41 | #endif |
| 42 | #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 43 | #include "webrtc/voice_engine/voe_neteq_stats_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 44 | #endif |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 45 | #include "webrtc/voice_engine/voe_network_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 46 | #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 47 | #include "webrtc/voice_engine/voe_rtp_rtcp_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 48 | #endif |
| 49 | #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 50 | #include "webrtc/voice_engine/voe_video_sync_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 51 | #endif |
| 52 | #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
pbos@webrtc.org | be72fe4 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 53 | #include "webrtc/voice_engine/voe_volume_control_impl.h" |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 54 | #endif |
| 55 | |
| 56 | namespace webrtc |
| 57 | { |
| 58 | |
| 59 | class VoiceEngineImpl : public voe::SharedData, // Must be the first base class |
tommi@webrtc.org | a974cea | 2013-02-15 15:07:32 +0000 | [diff] [blame] | 60 | public VoiceEngine, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 61 | #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
| 62 | public VoEAudioProcessingImpl, |
| 63 | #endif |
| 64 | #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API |
| 65 | public VoECallReportImpl, |
| 66 | #endif |
| 67 | #ifdef WEBRTC_VOICE_ENGINE_CODEC_API |
| 68 | public VoECodecImpl, |
| 69 | #endif |
| 70 | #ifdef WEBRTC_VOICE_ENGINE_DTMF_API |
| 71 | public VoEDtmfImpl, |
| 72 | #endif |
| 73 | #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API |
| 74 | public VoEEncryptionImpl, |
| 75 | #endif |
| 76 | #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API |
| 77 | public VoEExternalMediaImpl, |
| 78 | #endif |
| 79 | #ifdef WEBRTC_VOICE_ENGINE_FILE_API |
| 80 | public VoEFileImpl, |
| 81 | #endif |
| 82 | #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API |
| 83 | public VoEHardwareImpl, |
| 84 | #endif |
| 85 | #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
| 86 | public VoENetEqStatsImpl, |
| 87 | #endif |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 88 | public VoENetworkImpl, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 89 | #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
| 90 | public VoERTP_RTCPImpl, |
| 91 | #endif |
| 92 | #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
| 93 | public VoEVideoSyncImpl, |
| 94 | #endif |
| 95 | #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
| 96 | public VoEVolumeControlImpl, |
| 97 | #endif |
| 98 | public VoEBaseImpl |
| 99 | { |
| 100 | public: |
minyue@webrtc.org | 1963a68 | 2013-09-12 17:03:00 +0000 | [diff] [blame^] | 101 | VoiceEngineImpl(const Config* config, bool owns_config) : |
| 102 | SharedData(*config), |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 103 | #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
| 104 | VoEAudioProcessingImpl(this), |
| 105 | #endif |
| 106 | #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API |
| 107 | VoECallReportImpl(this), |
| 108 | #endif |
| 109 | #ifdef WEBRTC_VOICE_ENGINE_CODEC_API |
| 110 | VoECodecImpl(this), |
| 111 | #endif |
| 112 | #ifdef WEBRTC_VOICE_ENGINE_DTMF_API |
| 113 | VoEDtmfImpl(this), |
| 114 | #endif |
| 115 | #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API |
| 116 | VoEEncryptionImpl(this), |
| 117 | #endif |
| 118 | #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API |
| 119 | VoEExternalMediaImpl(this), |
| 120 | #endif |
| 121 | #ifdef WEBRTC_VOICE_ENGINE_FILE_API |
| 122 | VoEFileImpl(this), |
| 123 | #endif |
| 124 | #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API |
| 125 | VoEHardwareImpl(this), |
| 126 | #endif |
| 127 | #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
| 128 | VoENetEqStatsImpl(this), |
| 129 | #endif |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 130 | VoENetworkImpl(this), |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 131 | #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
| 132 | VoERTP_RTCPImpl(this), |
| 133 | #endif |
| 134 | #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
| 135 | VoEVideoSyncImpl(this), |
| 136 | #endif |
| 137 | #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
| 138 | VoEVolumeControlImpl(this), |
| 139 | #endif |
| 140 | VoEBaseImpl(this), |
minyue@webrtc.org | 1963a68 | 2013-09-12 17:03:00 +0000 | [diff] [blame^] | 141 | _ref_count(0), |
| 142 | own_config_(owns_config ? config : NULL) |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 143 | { |
| 144 | } |
| 145 | virtual ~VoiceEngineImpl() |
| 146 | { |
| 147 | assert(_ref_count.Value() == 0); |
| 148 | } |
| 149 | |
| 150 | int AddRef(); |
| 151 | |
| 152 | // This implements the Release() method for all the inherited interfaces. |
| 153 | virtual int Release(); |
| 154 | |
| 155 | private: |
| 156 | Atomic32 _ref_count; |
minyue@webrtc.org | 1963a68 | 2013-09-12 17:03:00 +0000 | [diff] [blame^] | 157 | scoped_ptr<const Config> own_config_; |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 158 | }; |
| 159 | |
pbos@webrtc.org | 5ab7b93 | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 160 | } // namespace webrtc |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 161 | |
| 162 | #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |