blob: d2fad70e96f08f037c8ffaa98ab1eba88636e81a [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"
kwiberg4485ffb2016-04-26 08:14:39 -070021#include "webrtc/base/constructormagic.h"
Honghai Zhangcc411c02016-03-29 17:27:21 -070022#include "webrtc/base/networkroute.h"
solenbergff976312016-03-30 23:28:51 -070023#include "webrtc/base/scoped_ref_ptr.h"
buildbot@webrtc.orga09a9992014-08-13 17:26:08 +000024#include "webrtc/base/stream.h"
Fredrik Solenberg4b60c732015-05-07 14:07:48 +020025#include "webrtc/base/thread_checker.h"
26#include "webrtc/call.h"
sergeyu@chromium.org5bc25c42013-12-05 00:24:06 +000027#include "webrtc/common.h"
Henrik Lundin64dad832015-05-11 12:44:23 +020028#include "webrtc/config.h"
kjellandera96e2d72016-02-04 23:52:28 -080029#include "webrtc/media/base/rtputils.h"
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +010030#include "webrtc/media/engine/webrtccommon.h"
31#include "webrtc/media/engine/webrtcvoe.h"
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +010032#include "webrtc/pc/channel.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000033
henrike@webrtc.org28e20752013-07-10 00:45:36 +000034namespace cricket {
35
henrike@webrtc.org28e20752013-07-10 00:45:36 +000036class AudioDeviceModule;
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -080037class AudioSource;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000038class VoEWrapper;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000039class WebRtcVoiceMediaChannel;
40
solenberg971cab02016-06-14 10:02:41 -070041struct SendCodecSpec {
42 SendCodecSpec() {
43 webrtc::CodecInst empty_inst = {0};
44 codec_inst = empty_inst;
45 codec_inst.pltype = -1;
46 }
47 bool operator==(const SendCodecSpec& rhs) const;
48 bool operator!=(const SendCodecSpec& rhs) const;
49
50 bool nack_enabled = false;
51 bool transport_cc_enabled = false;
52 bool enable_codec_fec = false;
53 bool enable_opus_dtx = false;
54 int opus_max_playback_rate = 0;
55 int red_payload_type = -1;
56 int cng_payload_type = -1;
57 int cng_plfreq = -1;
58 webrtc::CodecInst codec_inst;
59};
60
henrike@webrtc.org28e20752013-07-10 00:45:36 +000061// WebRtcVoiceEngine is a class to be used with CompositeMediaEngine.
62// It uses the WebRtc VoiceEngine library for audio handling.
solenberg566ef242015-11-06 15:34:49 -080063class WebRtcVoiceEngine final : public webrtc::TraceCallback {
Jelena Marusicc28a8962015-05-29 15:05:44 +020064 friend class WebRtcVoiceMediaChannel;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000065 public:
solenberg26c8c912015-11-27 04:00:25 -080066 // Exposed for the WVoE/MC unit test.
67 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out);
68
ossu29b1a8d2016-06-13 07:34:51 -070069 WebRtcVoiceEngine(
70 webrtc::AudioDeviceModule* adm,
71 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& decoder_factory);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000072 // Dependency injection for testing.
ossu29b1a8d2016-06-13 07:34:51 -070073 WebRtcVoiceEngine(
74 webrtc::AudioDeviceModule* adm,
75 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& decoder_factory,
76 VoEWrapper* voe_wrapper);
solenbergff976312016-03-30 23:28:51 -070077 ~WebRtcVoiceEngine() override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000078
solenberg566ef242015-11-06 15:34:49 -080079 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const;
Fredrik Solenberg709ed672015-09-15 12:26:33 +020080 VoiceMediaChannel* CreateChannel(webrtc::Call* call,
nisse51542be2016-02-12 02:27:06 -080081 const MediaConfig& config,
Fredrik Solenberg709ed672015-09-15 12:26:33 +020082 const AudioOptions& options);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000083
henrike@webrtc.org28e20752013-07-10 00:45:36 +000084 int GetInputLevel();
henrike@webrtc.org28e20752013-07-10 00:45:36 +000085
ossudedfd282016-06-14 07:12:39 -070086 const std::vector<AudioCodec>& send_codecs() const;
87 const std::vector<AudioCodec>& recv_codecs() const;
Stefan Holmer9d69c3f2015-12-07 10:45:43 +010088 RtpCapabilities GetCapabilities() const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000089
henrike@webrtc.org28e20752013-07-10 00:45:36 +000090 // For tracking WebRtc channels. Needed because we have to pause them
91 // all when switching devices.
92 // May only be called by WebRtcVoiceMediaChannel.
solenberg63b34542015-09-29 06:06:31 -070093 void RegisterChannel(WebRtcVoiceMediaChannel* channel);
94 void UnregisterChannel(WebRtcVoiceMediaChannel* channel);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000095
henrike@webrtc.org28e20752013-07-10 00:45:36 +000096 // Called by WebRtcVoiceMediaChannel to set a gain offset from
97 // the default AGC target level.
98 bool AdjustAgcLevel(int delta);
99
100 VoEWrapper* voe() { return voe_wrapper_.get(); }
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000101 int GetLastEngineError();
102
ivocd66b44d2016-01-15 03:06:36 -0800103 // Starts AEC dump using an existing file. A maximum file size in bytes can be
104 // specified. When the maximum file size is reached, logging is stopped and
105 // the file is closed. If max_size_bytes is set to <= 0, no limit will be
106 // used.
107 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes);
wu@webrtc.orga9890802013-12-13 00:21:03 +0000108
ivoc797ef122015-10-22 03:25:41 -0700109 // Stops AEC dump.
110 void StopAecDump();
111
ivocc1513ee2016-05-13 08:30:39 -0700112 // Starts recording an RtcEventLog using an existing file until the log file
113 // reaches the maximum filesize or the StopRtcEventLog function is called.
114 // If the value of max_size_bytes is <= 0, no limit is used.
115 bool StartRtcEventLog(rtc::PlatformFile file, int64_t max_size_bytes);
ivoc112a3d82015-10-16 02:22:18 -0700116
117 // Stops recording the RtcEventLog.
118 void StopRtcEventLog();
119
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000120 private:
solenberg63b34542015-09-29 06:06:31 -0700121 // Every option that is "set" will be applied. Every option not "set" will be
122 // ignored. This allows us to selectively turn on and off different options
123 // easily at any time.
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000124 bool ApplyOptions(const AudioOptions& options);
solenberg246b8172015-12-08 09:50:23 -0800125 void SetDefaultDevices();
xians@webrtc.org3cefbc92014-10-10 09:42:53 +0000126
127 // webrtc::TraceCallback:
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +0000128 void Print(webrtc::TraceLevel level, const char* trace, int length) override;
xians@webrtc.org3cefbc92014-10-10 09:42:53 +0000129
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000130 void StartAecDump(const std::string& filename);
solenberg0a617e22015-10-20 15:49:38 -0700131 int CreateVoEChannel();
solenberg5b5129a2016-04-08 05:35:48 -0700132 webrtc::AudioDeviceModule* adm();
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000133
solenberg566ef242015-11-06 15:34:49 -0800134 rtc::ThreadChecker signal_thread_checker_;
135 rtc::ThreadChecker worker_thread_checker_;
136
solenbergff976312016-03-30 23:28:51 -0700137 // The audio device manager.
138 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
ossu29b1a8d2016-06-13 07:34:51 -0700139 rtc::scoped_refptr<webrtc::AudioDecoderFactory> decoder_factory_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000140 // The primary instance of WebRtc VoiceEngine.
kwiberg686a8ef2016-02-26 03:00:35 -0800141 std::unique_ptr<VoEWrapper> voe_wrapper_;
solenberg566ef242015-11-06 15:34:49 -0800142 rtc::scoped_refptr<webrtc::AudioState> audio_state_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000143 std::vector<AudioCodec> codecs_;
solenberg63b34542015-09-29 06:06:31 -0700144 std::vector<WebRtcVoiceMediaChannel*> channels_;
sergeyu@chromium.org5bc25c42013-12-05 00:24:06 +0000145 webrtc::Config voe_config_;
solenberg246b8172015-12-08 09:50:23 -0800146 bool is_dumping_aec_ = false;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000147
solenberg246b8172015-12-08 09:50:23 -0800148 webrtc::AgcConfig default_agc_config_;
Alejandro Luebsc9b0c262016-05-16 15:32:38 -0700149 // Cache received extended_filter_aec, delay_agnostic_aec, experimental_ns and
150 // intelligibility_enhancer values, and apply them in case they are missing
151 // in the audio options. We need to do this because SetExtraOptions() will
152 // revert to defaults for options which are not provided.
Karl Wibergbe579832015-11-10 22:34:18 +0100153 rtc::Optional<bool> extended_filter_aec_;
154 rtc::Optional<bool> delay_agnostic_aec_;
155 rtc::Optional<bool> experimental_ns_;
Alejandro Luebsc9b0c262016-05-16 15:32:38 -0700156 rtc::Optional<bool> intelligibility_enhancer_;
solenbergc96df772015-10-21 13:01:53 -0700157
solenbergff976312016-03-30 23:28:51 -0700158 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceEngine);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000159};
160
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000161// WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses
162// WebRtc Voice Engine.
solenberg566ef242015-11-06 15:34:49 -0800163class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
164 public webrtc::Transport {
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000165 public:
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200166 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine,
nisse51542be2016-02-12 02:27:06 -0800167 const MediaConfig& config,
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200168 const AudioOptions& options,
169 webrtc::Call* call);
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200170 ~WebRtcVoiceMediaChannel() override;
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200171
solenberg66f43392015-09-09 01:36:22 -0700172 const AudioOptions& options() const { return options_; }
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200173
nisse51542be2016-02-12 02:27:06 -0800174 rtc::DiffServCodePoint PreferredDscp() const override;
175
Peter Thatcherc2ee2c82015-08-07 16:05:34 -0700176 bool SetSendParameters(const AudioSendParameters& params) override;
177 bool SetRecvParameters(const AudioRecvParameters& params) override;
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -0700178 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override;
179 bool SetRtpSendParameters(uint32_t ssrc,
180 const webrtc::RtpParameters& parameters) override;
181 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override;
182 bool SetRtpReceiveParameters(
183 uint32_t ssrc,
184 const webrtc::RtpParameters& parameters) override;
skvlade0d46372016-04-07 22:59:22 -0700185
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200186 bool SetPlayout(bool playout) override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000187 bool PausePlayout();
188 bool ResumePlayout();
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800189 void SetSend(bool send) override;
Peter Boström0c4e06b2015-10-07 12:23:21 +0200190 bool SetAudioSend(uint32_t ssrc,
191 bool enable,
192 const AudioOptions* options,
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800193 AudioSource* source) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200194 bool AddSendStream(const StreamParams& sp) override;
Peter Boström0c4e06b2015-10-07 12:23:21 +0200195 bool RemoveSendStream(uint32_t ssrc) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200196 bool AddRecvStream(const StreamParams& sp) override;
Peter Boström0c4e06b2015-10-07 12:23:21 +0200197 bool RemoveRecvStream(uint32_t ssrc) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200198 bool GetActiveStreams(AudioInfo::StreamList* actives) override;
199 int GetOutputLevel() override;
200 int GetTimeSinceLastTyping() override;
201 void SetTypingDetectionParameters(int time_window,
202 int cost_per_typing,
203 int reporting_threshold,
204 int penalty_decay,
205 int type_event_delay) override;
solenberg4bac9c52015-10-09 02:32:53 -0700206 bool SetOutputVolume(uint32_t ssrc, double volume) override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000207
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200208 bool CanInsertDtmf() override;
solenberg1d63dd02015-12-02 12:35:09 -0800209 bool InsertDtmf(uint32_t ssrc, int event, int duration) override;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000210
jbaucheec21bd2016-03-20 06:15:43 -0700211 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet,
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200212 const rtc::PacketTime& packet_time) override;
jbaucheec21bd2016-03-20 06:15:43 -0700213 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet,
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200214 const rtc::PacketTime& packet_time) override;
Honghai Zhangcc411c02016-03-29 17:27:21 -0700215 void OnNetworkRouteChanged(const std::string& transport_name,
Honghai Zhang0e533ef2016-04-19 15:41:36 -0700216 const rtc::NetworkRoute& network_route) override;
skvlad7a43d252016-03-22 15:32:27 -0700217 void OnReadyToSend(bool ready) override;
Fredrik Solenbergaaf8ff22015-05-07 16:05:53 +0200218 bool GetStats(VoiceMediaInfo* info) override;
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200219
Tommif888bb52015-12-12 01:37:01 +0100220 void SetRawAudioSink(
221 uint32_t ssrc,
kwiberg686a8ef2016-02-26 03:00:35 -0800222 std::unique_ptr<webrtc::AudioSinkInterface> sink) override;
Tommif888bb52015-12-12 01:37:01 +0100223
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200224 // implements Transport interface
stefan1d8a5062015-10-02 03:39:33 -0700225 bool SendRtp(const uint8_t* data,
226 size_t len,
227 const webrtc::PacketOptions& options) override {
jbaucheec21bd2016-03-20 06:15:43 -0700228 rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen);
stefanc1aeaf02015-10-15 07:26:07 -0700229 rtc::PacketOptions rtc_options;
230 rtc_options.packet_id = options.packet_id;
231 return VoiceMediaChannel::SendPacket(&packet, rtc_options);
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200232 }
233
pbos2d566682015-09-28 09:59:31 -0700234 bool SendRtcp(const uint8_t* data, size_t len) override {
jbaucheec21bd2016-03-20 06:15:43 -0700235 rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen);
stefanc1aeaf02015-10-15 07:26:07 -0700236 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions());
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200237 }
238
Peter Boström0c4e06b2015-10-07 12:23:21 +0200239 int GetReceiveChannelId(uint32_t ssrc) const;
240 int GetSendChannelId(uint32_t ssrc) const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000241
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200242 private:
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200243 bool SetOptions(const AudioOptions& options);
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200244 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);
solenberg72e29d22016-03-08 06:35:16 -0800245 bool SetSendCodecs(const std::vector<AudioCodec>& codecs);
skvlade0d46372016-04-07 22:59:22 -0700246 bool SetSendCodecs(int channel, const webrtc::RtpParameters& rtp_parameters);
solenberg72e29d22016-03-08 06:35:16 -0800247 void SetNack(int channel, bool nack_enabled);
248 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec);
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800249 bool SetLocalSource(uint32_t ssrc, AudioSource* source);
Peter Boström0c4e06b2015-10-07 12:23:21 +0200250 bool MuteStream(uint32_t ssrc, bool mute);
Fredrik Solenbergb071a192015-09-17 16:42:56 +0200251
Fredrik Solenberge444a3d2015-05-07 16:42:08 +0200252 WebRtcVoiceEngine* engine() { return engine_; }
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000253 int GetLastEngineError() { return engine()->GetLastEngineError(); }
254 int GetOutputLevel(int channel);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000255 bool SetPlayout(int channel, bool playout);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000256 bool ChangePlayout(bool playout);
solenberg0a617e22015-10-20 15:49:38 -0700257 int CreateVoEChannel();
solenberg7add0582015-11-20 09:59:34 -0800258 bool DeleteVoEChannel(int channel);
solenberg1ac56142015-10-13 03:58:19 -0700259 bool IsDefaultRecvStream(uint32_t ssrc) {
260 return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
261 }
deadbeef80346142016-04-27 14:17:10 -0700262 bool SetMaxSendBitrate(int bps);
Taylor Brandstetterdb0cd9e2016-05-16 11:40:30 -0700263 bool SetChannelSendParameters(int channel,
264 const webrtc::RtpParameters& parameters);
deadbeef80346142016-04-27 14:17:10 -0700265 bool SetMaxSendBitrate(int channel, int bps);
solenberg72e29d22016-03-08 06:35:16 -0800266 bool HasSendCodec() const {
267 return send_codec_spec_.codec_inst.pltype != -1;
268 }
skvlade0d46372016-04-07 22:59:22 -0700269 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters);
solenbergd53a3f92016-04-14 13:56:37 -0700270 void SetupRecording();
Fredrik Solenberg4b60c732015-05-07 14:07:48 +0200271
solenberg566ef242015-11-06 15:34:49 -0800272 rtc::ThreadChecker worker_thread_checker_;
Fredrik Solenberg4b60c732015-05-07 14:07:48 +0200273
solenberg566ef242015-11-06 15:34:49 -0800274 WebRtcVoiceEngine* const engine_ = nullptr;
Taylor Brandstetter0cd086b2016-04-20 16:23:10 -0700275 std::vector<AudioCodec> send_codecs_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000276 std::vector<AudioCodec> recv_codecs_;
deadbeef80346142016-04-27 14:17:10 -0700277 int max_send_bitrate_bps_ = 0;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000278 AudioOptions options_;
Fredrik Solenbergb5727682015-12-04 15:22:19 +0100279 rtc::Optional<int> dtmf_payload_type_;
solenberg566ef242015-11-06 15:34:49 -0800280 bool desired_playout_ = false;
solenberg72e29d22016-03-08 06:35:16 -0800281 bool recv_transport_cc_enabled_ = false;
solenberg566ef242015-11-06 15:34:49 -0800282 bool playout_ = false;
Taylor Brandstetter1a018dc2016-03-08 12:37:39 -0800283 bool send_ = false;
solenberg566ef242015-11-06 15:34:49 -0800284 webrtc::Call* const call_ = nullptr;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000285
solenberg1ac56142015-10-13 03:58:19 -0700286 // SSRC of unsignalled receive stream, or -1 if there isn't one.
287 int64_t default_recv_ssrc_ = -1;
288 // Volume for unsignalled stream, which may be set before the stream exists.
289 double default_recv_volume_ = 1.0;
deadbeef884f5852016-01-15 09:20:04 -0800290 // Sink for unsignalled stream, which may be set before the stream exists.
kwiberg686a8ef2016-02-26 03:00:35 -0800291 std::unique_ptr<webrtc::AudioSinkInterface> default_sink_;
solenberg8093d542015-11-12 06:02:30 -0800292 // Default SSRC to use for RTCP receiver reports in case of no signaled
solenberg0a617e22015-10-20 15:49:38 -0700293 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740
solenberg8093d542015-11-12 06:02:30 -0800294 // and https://code.google.com/p/chromium/issues/detail?id=547661
295 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u;
solenberg1ac56142015-10-13 03:58:19 -0700296
solenbergc96df772015-10-21 13:01:53 -0700297 class WebRtcAudioSendStream;
298 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_;
solenberg3a941542015-11-16 07:34:50 -0800299 std::vector<webrtc::RtpExtension> send_rtp_extensions_;
solenbergc96df772015-10-21 13:01:53 -0700300
301 class WebRtcAudioReceiveStream;
solenberg7add0582015-11-20 09:59:34 -0800302 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
Fredrik Solenberg4b60c732015-05-07 14:07:48 +0200303 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
solenbergc96df772015-10-21 13:01:53 -0700304
solenberg971cab02016-06-14 10:02:41 -0700305 SendCodecSpec send_codec_spec_;
solenberg72e29d22016-03-08 06:35:16 -0800306
solenbergc96df772015-10-21 13:01:53 -0700307 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000308};
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000309} // namespace cricket
310
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +0100311#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_