blob: 2b3963cdf2f732971c392a17a29b9ef5443191da [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
tommi@webrtc.org851becd2012-04-04 14:57:19 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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.orga990e122012-04-26 15:28:22 +000014#include "atomic32.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000015#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
58namespace webrtc
59{
60
tommi@webrtc.org851becd2012-04-04 14:57:19 +000061class VoiceEngineImpl : public voe::SharedData, // Must be the first base class
tommi@webrtc.org0989fb72013-02-15 15:07:32 +000062 public VoiceEngine,
niklase@google.com470e71d2011-07-07 08:21:25 +000063#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000064 public VoEAudioProcessingImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000065#endif
66#ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000067 public VoECallReportImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000068#endif
69#ifdef WEBRTC_VOICE_ENGINE_CODEC_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000070 public VoECodecImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000071#endif
72#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000073 public VoEDtmfImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000074#endif
75#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000076 public VoEEncryptionImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000077#endif
78#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000079 public VoEExternalMediaImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000080#endif
81#ifdef WEBRTC_VOICE_ENGINE_FILE_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000082 public VoEFileImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000083#endif
84#ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000085 public VoEHardwareImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000086#endif
87#ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000088 public VoENetEqStatsImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000089#endif
90#ifdef WEBRTC_VOICE_ENGINE_NETWORK_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000091 public VoENetworkImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000092#endif
93#ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000094 public VoERTP_RTCPImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000095#endif
96#ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000097 public VoEVideoSyncImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000098#endif
99#ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000100 public VoEVolumeControlImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +0000101#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000102 public VoEBaseImpl
niklase@google.com470e71d2011-07-07 08:21:25 +0000103{
104public:
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000105 VoiceEngineImpl() :
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000106#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
107 VoEAudioProcessingImpl(this),
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000108#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000109#ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
110 VoECallReportImpl(this),
111#endif
112#ifdef WEBRTC_VOICE_ENGINE_CODEC_API
113 VoECodecImpl(this),
114#endif
115#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
116 VoEDtmfImpl(this),
117#endif
118#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
119 VoEEncryptionImpl(this),
120#endif
121#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
122 VoEExternalMediaImpl(this),
123#endif
124#ifdef WEBRTC_VOICE_ENGINE_FILE_API
125 VoEFileImpl(this),
126#endif
127#ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
128 VoEHardwareImpl(this),
129#endif
130#ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
131 VoENetEqStatsImpl(this),
132#endif
133#ifdef WEBRTC_VOICE_ENGINE_NETWORK_API
134 VoENetworkImpl(this),
135#endif
136#ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
137 VoERTP_RTCPImpl(this),
138#endif
139#ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
140 VoEVideoSyncImpl(this),
141#endif
142#ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
143 VoEVolumeControlImpl(this),
144#endif
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000145 VoEBaseImpl(this),
146 _ref_count(0)
niklase@google.com470e71d2011-07-07 08:21:25 +0000147 {
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000148 }
niklase@google.com470e71d2011-07-07 08:21:25 +0000149 virtual ~VoiceEngineImpl()
150 {
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000151 assert(_ref_count.Value() == 0);
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000152 }
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000153
154 int AddRef();
155
156 // This implements the Release() method for all the inherited interfaces.
157 virtual int Release();
158
159private:
160 Atomic32 _ref_count;
niklase@google.com470e71d2011-07-07 08:21:25 +0000161};
162
163} // namespace webrtc
164
165#endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H