blob: 0c2d8ba2c9f9b278ceb43e41b0f5a9c972505685 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellander1afca732016-02-07 20:46:45 -08002 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellander1afca732016-02-07 20:46:45 -08004 * 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.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00009 */
10
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +010011#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_
12#define WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013
14#include <map>
kwiberg686a8ef2016-02-26 03:00:35 -080015#include <memory>
henrike@webrtc.org28e20752013-07-10 00:45:36 +000016#include <string>
17#include <vector>
18
solenberg566ef242015-11-06 15:34:49 -080019#include "webrtc/audio_state.h"
buildbot@webrtc.orga09a9992014-08-13 17:26:08 +000020#include "webrtc/base/buffer.h"
Honghai Zhangcc411c02016-03-29 17:27:21 -070021#include "webrtc/base/networkroute.h"
solenbergff976312016-03-30 23:28:51 -070022#include "webrtc/base/scoped_ref_ptr.h"
buildbot@webrtc.orga09a9992014-08-13 17:26:08 +000023#include "webrtc/base/stream.h"
Fredrik Solenberg4b60c732015-05-07 14:07:48 +020024#include "webrtc/base/thread_checker.h"
25#include "webrtc/call.h"
sergeyu@chromium.org5bc25c42013-12-05 00:24:06 +000026#include "webrtc/common.h"
Henrik Lundin64dad832015-05-11 12:44:23 +020027#include "webrtc/config.h"
kjellandera96e2d72016-02-04 23:52:28 -080028#include "webrtc/media/base/rtputils.h"
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +010029#include "webrtc/media/engine/webrtccommon.h"
30#include "webrtc/media/engine/webrtcvoe.h"
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +010031#include "webrtc/pc/channel.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000032
henrike@webrtc.org28e20752013-07-10 00:45:36 +000033namespace cricket {
34
henrike@webrtc.org28e20752013-07-10 00:45:36 +000035class AudioDeviceModule;
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -080036class AudioSource;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000037class VoEWrapper;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000038class WebRtcVoiceMediaChannel;
39
40// WebRtcVoiceEngine is a class to be used with CompositeMediaEngine.
41// It uses the WebRtc VoiceEngine library for audio handling.
solenberg566ef242015-11-06 15:34:49 -080042class WebRtcVoiceEngine final : public webrtc::TraceCallback {
Jelena Marusicc28a8962015-05-29 15:05:44 +020043 friend class WebRtcVoiceMediaChannel;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000044 public:
solenberg26c8c912015-11-27 04:00:25 -080045 // Exposed for the WVoE/MC unit test.
46 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out);
47
solenbergff976312016-03-30 23:28:51 -070048 explicit WebRtcVoiceEngine(webrtc::AudioDeviceModule* adm);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000049 // Dependency injection for testing.
solenbergff976312016-03-30 23:28:51 -070050 WebRtcVoiceEngine(webrtc::AudioDeviceModule* adm, VoEWrapper* voe_wrapper);
51 ~WebRtcVoiceEngine() override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000052
solenberg566ef242015-11-06 15:34:49 -080053 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const;
Fredrik Solenberg709ed672015-09-15 12:26:33 +020054 VoiceMediaChannel* CreateChannel(webrtc::Call* call,
nisse51542be2016-02-12 02:27:06 -080055 const MediaConfig& config,
Fredrik Solenberg709ed672015-09-15 12:26:33 +020056 const AudioOptions& options);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000057
henrike@webrtc.org28e20752013-07-10 00:45:36 +000058 bool GetOutputVolume(int* level);
59 bool SetOutputVolume(int level);
60 int GetInputLevel();
henrike@webrtc.org28e20752013-07-10 00:45:36 +000061
62 const std::vector<AudioCodec>& codecs();
Stefan Holmer9d69c3f2015-12-07 10:45:43 +010063 RtpCapabilities GetCapabilities() const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000064
henrike@webrtc.org28e20752013-07-10 00:45:36 +000065 // For tracking WebRtc channels. Needed because we have to pause them
66 // all when switching devices.
67 // May only be called by WebRtcVoiceMediaChannel.
solenberg63b34542015-09-29 06:06:31 -070068 void RegisterChannel(WebRtcVoiceMediaChannel* channel);
69 void UnregisterChannel(WebRtcVoiceMediaChannel* channel);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000070
henrike@webrtc.org28e20752013-07-10 00:45:36 +000071 // Called by WebRtcVoiceMediaChannel to set a gain offset from
72 // the default AGC target level.
73 bool AdjustAgcLevel(int delta);
74
75 VoEWrapper* voe() { return voe_wrapper_.get(); }
henrike@webrtc.org28e20752013-07-10 00:45:36 +000076 int GetLastEngineError();
77
ivocd66b44d2016-01-15 03:06:36 -080078 // Starts AEC dump using an existing file. A maximum file size in bytes can be
79 // specified. When the maximum file size is reached, logging is stopped and
80 // the file is closed. If max_size_bytes is set to <= 0, no limit will be
81 // used.
82 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes);
wu@webrtc.orga9890802013-12-13 00:21:03 +000083
ivoc797ef122015-10-22 03:25:41 -070084 // Stops AEC dump.
85 void StopAecDump();
86
ivoc112a3d82015-10-16 02:22:18 -070087 // Starts recording an RtcEventLog using an existing file until 10 minutes
88 // pass or the StopRtcEventLog function is called.
89 bool StartRtcEventLog(rtc::PlatformFile file);
90
91 // Stops recording the RtcEventLog.
92 void StopRtcEventLog();
93
henrike@webrtc.org28e20752013-07-10 00:45:36 +000094 private:
solenberg63b34542015-09-29 06:06:31 -070095 // Every option that is "set" will be applied. Every option not "set" will be
96 // ignored. This allows us to selectively turn on and off different options
97 // easily at any time.
henrike@webrtc.org28e20752013-07-10 00:45:36 +000098 bool ApplyOptions(const AudioOptions& options);
solenberg246b8172015-12-08 09:50:23 -080099 void SetDefaultDevices();
xians@webrtc.org3cefbc92014-10-10 09:42:53 +0000100
101 // webrtc::TraceCallback:
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +0000102 void Print(webrtc::TraceLevel level, const char* trace, int length) override;
xians@webrtc.org3cefbc92014-10-10 09:42:53 +0000103
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000104 void StartAecDump(const std::string& filename);
solenberg0a617e22015-10-20 15:49:38 -0700105 int CreateVoEChannel();
solenberg5b5129a2016-04-08 05:35:48 -0700106 webrtc::AudioDeviceModule* adm();
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000107
solenberg566ef242015-11-06 15:34:49 -0800108 rtc::ThreadChecker signal_thread_checker_;
109 rtc::ThreadChecker worker_thread_checker_;
110
solenbergff976312016-03-30 23:28:51 -0700111 // The audio device manager.
112 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000113 // The primary instance of WebRtc VoiceEngine.
kwiberg686a8ef2016-02-26 03:00:35 -0800114 std::unique_ptr<VoEWrapper> voe_wrapper_;
solenberg566ef242015-11-06 15:34:49 -0800115 rtc::scoped_refptr<webrtc::AudioState> audio_state_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000116 std::vector<AudioCodec> codecs_;
solenberg63b34542015-09-29 06:06:31 -0700117 std::vector<WebRtcVoiceMediaChannel*> channels_;
sergeyu@chromium.org5bc25c42013-12-05 00:24:06 +0000118 webrtc::Config voe_config_;
solenberg246b8172015-12-08 09:50:23 -0800119 bool is_dumping_aec_ = false;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000120
solenberg246b8172015-12-08 09:50:23 -0800121 webrtc::AgcConfig default_agc_config_;
Henrik Lundin441f6342015-06-09 16:03:13 +0200122 // Cache received extended_filter_aec, delay_agnostic_aec and experimental_ns
Bjorn Volckerbf395c12015-03-25 22:45:56 +0100123 // values, and apply them in case they are missing in the audio options. We
124 // need to do this because SetExtraOptions() will revert to defaults for
125 // options which are not provided.
Karl Wibergbe579832015-11-10 22:34:18 +0100126 rtc::Optional<bool> extended_filter_aec_;
127 rtc::Optional<bool> delay_agnostic_aec_;
128 rtc::Optional<bool> experimental_ns_;
solenbergc96df772015-10-21 13:01:53 -0700129
solenbergff976312016-03-30 23:28:51 -0700130 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceEngine);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000131};
132
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000133// WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses
134// WebRtc Voice Engine.
solenberg566ef242015-11-06 15:34:49 -0800135class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
136 public webrtc::Transport {
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000137 public:
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200138 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine,
nisse51542be2016-02-12 02:27:06 -0800139 const MediaConfig& config,
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200140 const AudioOptions& options,
141 webrtc::Call* call);
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200142 ~WebRtcVoiceMediaChannel() override;
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200143
solenberg66f43392015-09-09 01:36:22 -0700144 const AudioOptions& options() const { return options_; }
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200145
nisse51542be2016-02-12 02:27:06 -0800146 rtc::DiffServCodePoint PreferredDscp() const override;
147
Peter Thatcherc2ee2c82015-08-07 16:05:34 -0700148 bool SetSendParameters(const AudioSendParameters& params) override;
149 bool SetRecvParameters(const AudioRecvParameters& params) override;
skvlade0d46372016-04-07 22:59:22 -0700150 webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const override;
151 bool SetRtpParameters(uint32_t ssrc,
152 const webrtc::RtpParameters& parameters) override;
153
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200154 bool SetPlayout(bool playout) override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000155 bool PausePlayout();
156 bool ResumePlayout();
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800157 void SetSend(bool send) override;
Peter Boström0c4e06b2015-10-07 12:23:21 +0200158 bool SetAudioSend(uint32_t ssrc,
159 bool enable,
160 const AudioOptions* options,
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800161 AudioSource* source) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200162 bool AddSendStream(const StreamParams& sp) override;
Peter Boström0c4e06b2015-10-07 12:23:21 +0200163 bool RemoveSendStream(uint32_t ssrc) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200164 bool AddRecvStream(const StreamParams& sp) override;
Peter Boström0c4e06b2015-10-07 12:23:21 +0200165 bool RemoveRecvStream(uint32_t ssrc) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200166 bool GetActiveStreams(AudioInfo::StreamList* actives) override;
167 int GetOutputLevel() override;
168 int GetTimeSinceLastTyping() override;
169 void SetTypingDetectionParameters(int time_window,
170 int cost_per_typing,
171 int reporting_threshold,
172 int penalty_decay,
173 int type_event_delay) override;
solenberg4bac9c52015-10-09 02:32:53 -0700174 bool SetOutputVolume(uint32_t ssrc, double volume) override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000175
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200176 bool CanInsertDtmf() override;
solenberg1d63dd02015-12-02 12:35:09 -0800177 bool InsertDtmf(uint32_t ssrc, int event, int duration) override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000178
jbaucheec21bd2016-03-20 06:15:43 -0700179 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet,
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200180 const rtc::PacketTime& packet_time) override;
jbaucheec21bd2016-03-20 06:15:43 -0700181 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet,
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200182 const rtc::PacketTime& packet_time) override;
Honghai Zhangcc411c02016-03-29 17:27:21 -0700183 void OnNetworkRouteChanged(const std::string& transport_name,
184 const NetworkRoute& network_route) override;
skvlad7a43d252016-03-22 15:32:27 -0700185 void OnReadyToSend(bool ready) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200186 bool GetStats(VoiceMediaInfo* info) override;
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200187
Tommif888bb52015-12-12 01:37:01 +0100188 void SetRawAudioSink(
189 uint32_t ssrc,
kwiberg686a8ef2016-02-26 03:00:35 -0800190 std::unique_ptr<webrtc::AudioSinkInterface> sink) override;
Tommif888bb52015-12-12 01:37:01 +0100191
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200192 // implements Transport interface
stefan1d8a5062015-10-02 03:39:33 -0700193 bool SendRtp(const uint8_t* data,
194 size_t len,
195 const webrtc::PacketOptions& options) override {
jbaucheec21bd2016-03-20 06:15:43 -0700196 rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen);
stefanc1aeaf02015-10-15 07:26:07 -0700197 rtc::PacketOptions rtc_options;
198 rtc_options.packet_id = options.packet_id;
199 return VoiceMediaChannel::SendPacket(&packet, rtc_options);
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200200 }
201
pbos2d566682015-09-28 09:59:31 -0700202 bool SendRtcp(const uint8_t* data, size_t len) override {
jbaucheec21bd2016-03-20 06:15:43 -0700203 rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen);
stefanc1aeaf02015-10-15 07:26:07 -0700204 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions());
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200205 }
206
Peter Boström0c4e06b2015-10-07 12:23:21 +0200207 int GetReceiveChannelId(uint32_t ssrc) const;
208 int GetSendChannelId(uint32_t ssrc) const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000209
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200210 private:
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200211 bool SetOptions(const AudioOptions& options);
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200212 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);
solenberg72e29d22016-03-08 06:35:16 -0800213 bool SetSendCodecs(const std::vector<AudioCodec>& codecs);
skvlade0d46372016-04-07 22:59:22 -0700214 bool SetSendCodecs(int channel, const webrtc::RtpParameters& rtp_parameters);
solenberg72e29d22016-03-08 06:35:16 -0800215 void SetNack(int channel, bool nack_enabled);
216 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec);
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800217 bool SetLocalSource(uint32_t ssrc, AudioSource* source);
Peter Boström0c4e06b2015-10-07 12:23:21 +0200218 bool MuteStream(uint32_t ssrc, bool mute);
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200219
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200220 WebRtcVoiceEngine* engine() { return engine_; }
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000221 int GetLastEngineError() { return engine()->GetLastEngineError(); }
222 int GetOutputLevel(int channel);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000223 bool SetPlayout(int channel, bool playout);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000224 bool ChangePlayout(bool playout);
solenberg0a617e22015-10-20 15:49:38 -0700225 int CreateVoEChannel();
solenberg7add0582015-11-20 09:59:34 -0800226 bool DeleteVoEChannel(int channel);
solenberg1ac56142015-10-13 03:58:19 -0700227 bool IsDefaultRecvStream(uint32_t ssrc) {
228 return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
229 }
skvlade0d46372016-04-07 22:59:22 -0700230 bool SetSendBitrate(int bps);
231 bool SetChannelParameters(int channel,
232 const webrtc::RtpParameters& parameters);
233 bool SetSendBitrate(int channel, int bps);
solenberg72e29d22016-03-08 06:35:16 -0800234 bool HasSendCodec() const {
235 return send_codec_spec_.codec_inst.pltype != -1;
236 }
skvlade0d46372016-04-07 22:59:22 -0700237 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters);
solenbergd53a3f92016-04-14 13:56:37 -0700238 void SetupRecording();
Fredrik Solenberg4b60c732015-05-07 14:07:48 +0200239
solenberg566ef242015-11-06 15:34:49 -0800240 rtc::ThreadChecker worker_thread_checker_;
Fredrik Solenberg4b60c732015-05-07 14:07:48 +0200241
solenberg566ef242015-11-06 15:34:49 -0800242 WebRtcVoiceEngine* const engine_ = nullptr;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000243 std::vector<AudioCodec> recv_codecs_;
solenberg566ef242015-11-06 15:34:49 -0800244 int send_bitrate_bps_ = 0;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000245 AudioOptions options_;
Fredrik Solenbergb5727682015-12-04 15:22:19 +0100246 rtc::Optional<int> dtmf_payload_type_;
solenberg566ef242015-11-06 15:34:49 -0800247 bool desired_playout_ = false;
solenberg72e29d22016-03-08 06:35:16 -0800248 bool recv_transport_cc_enabled_ = false;
solenberg566ef242015-11-06 15:34:49 -0800249 bool playout_ = false;
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800250 bool send_ = false;
solenberg566ef242015-11-06 15:34:49 -0800251 webrtc::Call* const call_ = nullptr;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000252
solenberg1ac56142015-10-13 03:58:19 -0700253 // SSRC of unsignalled receive stream, or -1 if there isn't one.
254 int64_t default_recv_ssrc_ = -1;
255 // Volume for unsignalled stream, which may be set before the stream exists.
256 double default_recv_volume_ = 1.0;
deadbeef884f5852016-01-15 09:20:04 -0800257 // Sink for unsignalled stream, which may be set before the stream exists.
kwiberg686a8ef2016-02-26 03:00:35 -0800258 std::unique_ptr<webrtc::AudioSinkInterface> default_sink_;
solenberg8093d542015-11-12 06:02:30 -0800259 // Default SSRC to use for RTCP receiver reports in case of no signaled
solenberg0a617e22015-10-20 15:49:38 -0700260 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740
solenberg8093d542015-11-12 06:02:30 -0800261 // and https://code.google.com/p/chromium/issues/detail?id=547661
262 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u;
solenberg1ac56142015-10-13 03:58:19 -0700263
solenbergc96df772015-10-21 13:01:53 -0700264 class WebRtcAudioSendStream;
265 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_;
solenberg3a941542015-11-16 07:34:50 -0800266 std::vector<webrtc::RtpExtension> send_rtp_extensions_;
solenbergc96df772015-10-21 13:01:53 -0700267
268 class WebRtcAudioReceiveStream;
solenberg7add0582015-11-20 09:59:34 -0800269 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
Fredrik Solenberg4b60c732015-05-07 14:07:48 +0200270 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
solenbergc96df772015-10-21 13:01:53 -0700271
solenberg72e29d22016-03-08 06:35:16 -0800272 struct SendCodecSpec {
273 SendCodecSpec() {
274 webrtc::CodecInst empty_inst = {0};
275 codec_inst = empty_inst;
276 codec_inst.pltype = -1;
277 }
278 bool nack_enabled = false;
279 bool transport_cc_enabled = false;
280 bool enable_codec_fec = false;
281 bool enable_opus_dtx = false;
282 int opus_max_playback_rate = 0;
283 int red_payload_type = -1;
284 int cng_payload_type = -1;
285 int cng_plfreq = -1;
286 webrtc::CodecInst codec_inst;
287 } send_codec_spec_;
288
solenbergc96df772015-10-21 13:01:53 -0700289 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000290};
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000291} // namespace cricket
292
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +0100293#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_