niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | |
tommi@webrtc.org | a990e12 | 2012-04-26 15:28:22 +0000 | [diff] [blame] | 14 | #include "atomic32.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 15 | #include "engine_configurations.h" |
| 16 | #include "voe_base_impl.h" |
| 17 | |
| 18 | #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
| 19 | #include "voe_audio_processing_impl.h" |
| 20 | #endif |
| 21 | #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API |
| 22 | #include "voe_call_report_impl.h" |
| 23 | #endif |
| 24 | #ifdef WEBRTC_VOICE_ENGINE_CODEC_API |
| 25 | #include "voe_codec_impl.h" |
| 26 | #endif |
| 27 | #ifdef WEBRTC_VOICE_ENGINE_DTMF_API |
| 28 | #include "voe_dtmf_impl.h" |
| 29 | #endif |
| 30 | #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API |
| 31 | #include "voe_encryption_impl.h" |
| 32 | #endif |
| 33 | #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API |
| 34 | #include "voe_external_media_impl.h" |
| 35 | #endif |
| 36 | #ifdef WEBRTC_VOICE_ENGINE_FILE_API |
| 37 | #include "voe_file_impl.h" |
| 38 | #endif |
| 39 | #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API |
| 40 | #include "voe_hardware_impl.h" |
| 41 | #endif |
| 42 | #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
| 43 | #include "voe_neteq_stats_impl.h" |
| 44 | #endif |
| 45 | #ifdef WEBRTC_VOICE_ENGINE_NETWORK_API |
| 46 | #include "voe_network_impl.h" |
| 47 | #endif |
| 48 | #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
| 49 | #include "voe_rtp_rtcp_impl.h" |
| 50 | #endif |
| 51 | #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
| 52 | #include "voe_video_sync_impl.h" |
| 53 | #endif |
| 54 | #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
| 55 | #include "voe_volume_control_impl.h" |
| 56 | #endif |
| 57 | |
| 58 | namespace webrtc |
| 59 | { |
| 60 | |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 61 | class VoiceEngineImpl : public voe::SharedData, // Must be the first base class |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 62 | #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 63 | public VoEAudioProcessingImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 64 | #endif |
| 65 | #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 66 | public VoECallReportImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 67 | #endif |
| 68 | #ifdef WEBRTC_VOICE_ENGINE_CODEC_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 69 | public VoECodecImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 70 | #endif |
| 71 | #ifdef WEBRTC_VOICE_ENGINE_DTMF_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 72 | public VoEDtmfImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 73 | #endif |
| 74 | #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 75 | public VoEEncryptionImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 76 | #endif |
| 77 | #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 78 | public VoEExternalMediaImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 79 | #endif |
| 80 | #ifdef WEBRTC_VOICE_ENGINE_FILE_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 81 | public VoEFileImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 82 | #endif |
| 83 | #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 84 | public VoEHardwareImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 85 | #endif |
| 86 | #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 87 | public VoENetEqStatsImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 88 | #endif |
| 89 | #ifdef WEBRTC_VOICE_ENGINE_NETWORK_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 90 | public VoENetworkImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 91 | #endif |
| 92 | #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 93 | public VoERTP_RTCPImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 94 | #endif |
| 95 | #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 96 | public VoEVideoSyncImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 97 | #endif |
| 98 | #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 99 | public VoEVolumeControlImpl, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 100 | #endif |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 101 | public VoEBaseImpl |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 102 | { |
| 103 | public: |
tommi@webrtc.org | 9ff87db | 2012-01-19 15:05:36 +0000 | [diff] [blame] | 104 | VoiceEngineImpl() : |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 105 | #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
| 106 | VoEAudioProcessingImpl(this), |
tommi@webrtc.org | 9ff87db | 2012-01-19 15:05:36 +0000 | [diff] [blame] | 107 | #endif |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 108 | #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API |
| 109 | VoECallReportImpl(this), |
| 110 | #endif |
| 111 | #ifdef WEBRTC_VOICE_ENGINE_CODEC_API |
| 112 | VoECodecImpl(this), |
| 113 | #endif |
| 114 | #ifdef WEBRTC_VOICE_ENGINE_DTMF_API |
| 115 | VoEDtmfImpl(this), |
| 116 | #endif |
| 117 | #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API |
| 118 | VoEEncryptionImpl(this), |
| 119 | #endif |
| 120 | #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API |
| 121 | VoEExternalMediaImpl(this), |
| 122 | #endif |
| 123 | #ifdef WEBRTC_VOICE_ENGINE_FILE_API |
| 124 | VoEFileImpl(this), |
| 125 | #endif |
| 126 | #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API |
| 127 | VoEHardwareImpl(this), |
| 128 | #endif |
| 129 | #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
| 130 | VoENetEqStatsImpl(this), |
| 131 | #endif |
| 132 | #ifdef WEBRTC_VOICE_ENGINE_NETWORK_API |
| 133 | VoENetworkImpl(this), |
| 134 | #endif |
| 135 | #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
| 136 | VoERTP_RTCPImpl(this), |
| 137 | #endif |
| 138 | #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
| 139 | VoEVideoSyncImpl(this), |
| 140 | #endif |
| 141 | #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
| 142 | VoEVolumeControlImpl(this), |
| 143 | #endif |
tommi@webrtc.org | a990e12 | 2012-04-26 15:28:22 +0000 | [diff] [blame] | 144 | VoEBaseImpl(this), |
| 145 | _ref_count(0) |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 146 | { |
tommi@webrtc.org | 9ff87db | 2012-01-19 15:05:36 +0000 | [diff] [blame] | 147 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 148 | virtual ~VoiceEngineImpl() |
| 149 | { |
tommi@webrtc.org | a990e12 | 2012-04-26 15:28:22 +0000 | [diff] [blame] | 150 | assert(_ref_count.Value() == 0); |
tommi@webrtc.org | 9ff87db | 2012-01-19 15:05:36 +0000 | [diff] [blame] | 151 | } |
tommi@webrtc.org | a990e12 | 2012-04-26 15:28:22 +0000 | [diff] [blame] | 152 | |
| 153 | int AddRef(); |
| 154 | |
| 155 | // This implements the Release() method for all the inherited interfaces. |
| 156 | virtual int Release(); |
| 157 | |
| 158 | private: |
| 159 | Atomic32 _ref_count; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 160 | }; |
| 161 | |
| 162 | } // namespace webrtc |
| 163 | |
| 164 | #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |