blob: 7db77be6e8635bbe33b88ffd72d822b8bce203d5 [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
niklase@google.com470e71d2011-07-07 08:21:25 +000062#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000063 public VoEAudioProcessingImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000064#endif
65#ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000066 public VoECallReportImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000067#endif
68#ifdef WEBRTC_VOICE_ENGINE_CODEC_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000069 public VoECodecImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000070#endif
71#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000072 public VoEDtmfImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000073#endif
74#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000075 public VoEEncryptionImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000076#endif
77#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000078 public VoEExternalMediaImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000079#endif
80#ifdef WEBRTC_VOICE_ENGINE_FILE_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000081 public VoEFileImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000082#endif
83#ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000084 public VoEHardwareImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000085#endif
86#ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000087 public VoENetEqStatsImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000088#endif
89#ifdef WEBRTC_VOICE_ENGINE_NETWORK_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000090 public VoENetworkImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000091#endif
92#ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000093 public VoERTP_RTCPImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000094#endif
95#ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000096 public VoEVideoSyncImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000097#endif
98#ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000099 public VoEVolumeControlImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +0000100#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000101 public VoEBaseImpl
niklase@google.com470e71d2011-07-07 08:21:25 +0000102{
103public:
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000104 VoiceEngineImpl() :
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000105#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
106 VoEAudioProcessingImpl(this),
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000107#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000108#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.orga990e122012-04-26 15:28:22 +0000144 VoEBaseImpl(this),
145 _ref_count(0)
niklase@google.com470e71d2011-07-07 08:21:25 +0000146 {
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000147 }
niklase@google.com470e71d2011-07-07 08:21:25 +0000148 virtual ~VoiceEngineImpl()
149 {
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000150 assert(_ref_count.Value() == 0);
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000151 }
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000152
153 int AddRef();
154
155 // This implements the Release() method for all the inherited interfaces.
156 virtual int Release();
157
158private:
159 Atomic32 _ref_count;
niklase@google.com470e71d2011-07-07 08:21:25 +0000160};
161
162} // namespace webrtc
163
164#endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H