blob: 4666883b0a8cec1999170ddcbf03fc6e3c88c7fb [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
niklase@google.com470e71d2011-07-07 08:21:25 +000045#include "voe_network_impl.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000046#ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
47#include "voe_rtp_rtcp_impl.h"
48#endif
49#ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
50#include "voe_video_sync_impl.h"
51#endif
52#ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
53#include "voe_volume_control_impl.h"
54#endif
55
56namespace webrtc
57{
58
tommi@webrtc.org851becd2012-04-04 14:57:19 +000059class VoiceEngineImpl : public voe::SharedData, // Must be the first base class
tommi@webrtc.org0989fb72013-02-15 15:07:32 +000060 public VoiceEngine,
niklase@google.com470e71d2011-07-07 08:21:25 +000061#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000062 public VoEAudioProcessingImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000063#endif
64#ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000065 public VoECallReportImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000066#endif
67#ifdef WEBRTC_VOICE_ENGINE_CODEC_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000068 public VoECodecImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000069#endif
70#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000071 public VoEDtmfImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000072#endif
73#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000074 public VoEEncryptionImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000075#endif
76#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000077 public VoEExternalMediaImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000078#endif
79#ifdef WEBRTC_VOICE_ENGINE_FILE_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000080 public VoEFileImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000081#endif
82#ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000083 public VoEHardwareImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000084#endif
85#ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000086 public VoENetEqStatsImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000087#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +000088 public VoENetworkImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000089#ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000090 public VoERTP_RTCPImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000091#endif
92#ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000093 public VoEVideoSyncImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000094#endif
95#ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
tommi@webrtc.org851becd2012-04-04 14:57:19 +000096 public VoEVolumeControlImpl,
niklase@google.com470e71d2011-07-07 08:21:25 +000097#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +000098 public VoEBaseImpl
niklase@google.com470e71d2011-07-07 08:21:25 +000099{
100public:
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000101 VoiceEngineImpl() :
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000102#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
103 VoEAudioProcessingImpl(this),
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000104#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000105#ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
106 VoECallReportImpl(this),
107#endif
108#ifdef WEBRTC_VOICE_ENGINE_CODEC_API
109 VoECodecImpl(this),
110#endif
111#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
112 VoEDtmfImpl(this),
113#endif
114#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
115 VoEEncryptionImpl(this),
116#endif
117#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
118 VoEExternalMediaImpl(this),
119#endif
120#ifdef WEBRTC_VOICE_ENGINE_FILE_API
121 VoEFileImpl(this),
122#endif
123#ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
124 VoEHardwareImpl(this),
125#endif
126#ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
127 VoENetEqStatsImpl(this),
128#endif
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000129 VoENetworkImpl(this),
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000130#ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
131 VoERTP_RTCPImpl(this),
132#endif
133#ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
134 VoEVideoSyncImpl(this),
135#endif
136#ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
137 VoEVolumeControlImpl(this),
138#endif
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000139 VoEBaseImpl(this),
140 _ref_count(0)
niklase@google.com470e71d2011-07-07 08:21:25 +0000141 {
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000142 }
niklase@google.com470e71d2011-07-07 08:21:25 +0000143 virtual ~VoiceEngineImpl()
144 {
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000145 assert(_ref_count.Value() == 0);
tommi@webrtc.org9ff87db2012-01-19 15:05:36 +0000146 }
tommi@webrtc.orga990e122012-04-26 15:28:22 +0000147
148 int AddRef();
149
150 // This implements the Release() method for all the inherited interfaces.
151 virtual int Release();
152
153private:
154 Atomic32 _ref_count;
niklase@google.com470e71d2011-07-07 08:21:25 +0000155};
156
157} // namespace webrtc
158
159#endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H