2013-07-10 00:45:36 +00:00
|
|
|
/*
|
|
|
|
|
* libjingle
|
|
|
|
|
* Copyright 2004 Google Inc.
|
|
|
|
|
*
|
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
|
*
|
|
|
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
|
|
* this list of conditions and the following disclaimer.
|
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
|
* 3. The name of the author may not be used to endorse or promote products
|
|
|
|
|
* derived from this software without specific prior written permission.
|
|
|
|
|
*
|
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
|
|
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
|
|
|
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
|
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef TALK_MEDIA_WEBRTCVOICEENGINE_H_
|
|
|
|
|
#define TALK_MEDIA_WEBRTCVOICEENGINE_H_
|
|
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
#include <set>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
#include "talk/media/base/rtputils.h"
|
|
|
|
|
#include "talk/media/webrtc/webrtccommon.h"
|
|
|
|
|
#include "talk/media/webrtc/webrtcvoe.h"
|
|
|
|
|
#include "talk/session/media/channel.h"
|
2015-11-06 15:34:49 -08:00
|
|
|
#include "webrtc/audio_state.h"
|
2014-08-13 17:26:08 +00:00
|
|
|
#include "webrtc/base/buffer.h"
|
|
|
|
|
#include "webrtc/base/scoped_ptr.h"
|
|
|
|
|
#include "webrtc/base/stream.h"
|
2015-05-07 14:07:48 +02:00
|
|
|
#include "webrtc/base/thread_checker.h"
|
|
|
|
|
#include "webrtc/call.h"
|
2013-12-05 00:24:06 +00:00
|
|
|
#include "webrtc/common.h"
|
2015-05-11 12:44:23 +02:00
|
|
|
#include "webrtc/config.h"
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
|
|
|
|
|
class AudioDeviceModule;
|
2013-07-26 19:17:59 +00:00
|
|
|
class AudioRenderer;
|
2013-07-10 00:45:36 +00:00
|
|
|
class VoEWrapper;
|
|
|
|
|
class WebRtcVoiceMediaChannel;
|
|
|
|
|
|
|
|
|
|
// WebRtcVoiceEngine is a class to be used with CompositeMediaEngine.
|
|
|
|
|
// It uses the WebRtc VoiceEngine library for audio handling.
|
2015-11-06 15:34:49 -08:00
|
|
|
class WebRtcVoiceEngine final : public webrtc::TraceCallback {
|
2015-05-29 15:05:44 +02:00
|
|
|
friend class WebRtcVoiceMediaChannel;
|
2013-07-10 00:45:36 +00:00
|
|
|
public:
|
2015-11-27 04:00:25 -08:00
|
|
|
// Exposed for the WVoE/MC unit test.
|
|
|
|
|
static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out);
|
|
|
|
|
|
2013-07-10 00:45:36 +00:00
|
|
|
WebRtcVoiceEngine();
|
|
|
|
|
// Dependency injection for testing.
|
2015-11-20 16:08:07 -08:00
|
|
|
explicit WebRtcVoiceEngine(VoEWrapper* voe_wrapper);
|
2013-07-10 00:45:36 +00:00
|
|
|
~WebRtcVoiceEngine();
|
2014-07-29 17:36:52 +00:00
|
|
|
bool Init(rtc::Thread* worker_thread);
|
2013-07-10 00:45:36 +00:00
|
|
|
void Terminate();
|
|
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const;
|
2015-09-15 12:26:33 +02:00
|
|
|
VoiceMediaChannel* CreateChannel(webrtc::Call* call,
|
|
|
|
|
const AudioOptions& options);
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2013-09-27 23:04:10 +00:00
|
|
|
AudioOptions GetOptions() const { return options_; }
|
|
|
|
|
bool SetOptions(const AudioOptions& options);
|
2013-07-10 00:45:36 +00:00
|
|
|
bool SetDevices(const Device* in_device, const Device* out_device);
|
|
|
|
|
bool GetOutputVolume(int* level);
|
|
|
|
|
bool SetOutputVolume(int level);
|
|
|
|
|
int GetInputLevel();
|
|
|
|
|
|
|
|
|
|
const std::vector<AudioCodec>& codecs();
|
|
|
|
|
const std::vector<RtpHeaderExtension>& rtp_header_extensions() const;
|
|
|
|
|
|
|
|
|
|
// For tracking WebRtc channels. Needed because we have to pause them
|
|
|
|
|
// all when switching devices.
|
|
|
|
|
// May only be called by WebRtcVoiceMediaChannel.
|
2015-09-29 06:06:31 -07:00
|
|
|
void RegisterChannel(WebRtcVoiceMediaChannel* channel);
|
|
|
|
|
void UnregisterChannel(WebRtcVoiceMediaChannel* channel);
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
// Called by WebRtcVoiceMediaChannel to set a gain offset from
|
|
|
|
|
// the default AGC target level.
|
|
|
|
|
bool AdjustAgcLevel(int delta);
|
|
|
|
|
|
|
|
|
|
VoEWrapper* voe() { return voe_wrapper_.get(); }
|
|
|
|
|
int GetLastEngineError();
|
|
|
|
|
|
2015-05-19 11:37:56 +02:00
|
|
|
// Set the external ADM. This can only be called before Init.
|
|
|
|
|
bool SetAudioDeviceModule(webrtc::AudioDeviceModule* adm);
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2013-12-13 00:21:03 +00:00
|
|
|
// Starts AEC dump using existing file.
|
2014-07-29 17:36:52 +00:00
|
|
|
bool StartAecDump(rtc::PlatformFile file);
|
2013-12-13 00:21:03 +00:00
|
|
|
|
2015-10-22 03:25:41 -07:00
|
|
|
// Stops AEC dump.
|
|
|
|
|
void StopAecDump();
|
|
|
|
|
|
2015-10-16 02:22:18 -07:00
|
|
|
// Starts recording an RtcEventLog using an existing file until 10 minutes
|
|
|
|
|
// pass or the StopRtcEventLog function is called.
|
|
|
|
|
bool StartRtcEventLog(rtc::PlatformFile file);
|
|
|
|
|
|
|
|
|
|
// Stops recording the RtcEventLog.
|
|
|
|
|
void StopRtcEventLog();
|
|
|
|
|
|
2013-07-10 00:45:36 +00:00
|
|
|
private:
|
|
|
|
|
void Construct();
|
|
|
|
|
bool InitInternal();
|
2015-09-29 06:06:31 -07:00
|
|
|
// Every option that is "set" will be applied. Every option not "set" will be
|
|
|
|
|
// ignored. This allows us to selectively turn on and off different options
|
|
|
|
|
// easily at any time.
|
2013-07-10 00:45:36 +00:00
|
|
|
bool ApplyOptions(const AudioOptions& options);
|
2014-10-10 09:42:53 +00:00
|
|
|
|
|
|
|
|
// webrtc::TraceCallback:
|
2015-03-04 12:58:35 +00:00
|
|
|
void Print(webrtc::TraceLevel level, const char* trace, int length) override;
|
2014-10-10 09:42:53 +00:00
|
|
|
|
2013-07-10 00:45:36 +00:00
|
|
|
// Given the device type, name, and id, find device id. Return true and
|
|
|
|
|
// set the output parameter rtc_id if successful.
|
|
|
|
|
bool FindWebRtcAudioDeviceId(
|
|
|
|
|
bool is_input, const std::string& dev_name, int dev_id, int* rtc_id);
|
|
|
|
|
|
|
|
|
|
void StartAecDump(const std::string& filename);
|
2015-10-20 15:49:38 -07:00
|
|
|
int CreateVoEChannel();
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
rtc::ThreadChecker signal_thread_checker_;
|
|
|
|
|
rtc::ThreadChecker worker_thread_checker_;
|
|
|
|
|
|
2013-07-10 00:45:36 +00:00
|
|
|
// The primary instance of WebRtc VoiceEngine.
|
2014-07-29 17:36:52 +00:00
|
|
|
rtc::scoped_ptr<VoEWrapper> voe_wrapper_;
|
2015-11-06 15:34:49 -08:00
|
|
|
rtc::scoped_refptr<webrtc::AudioState> audio_state_;
|
2013-07-10 00:45:36 +00:00
|
|
|
// The external audio device manager
|
2015-11-06 15:34:49 -08:00
|
|
|
webrtc::AudioDeviceModule* adm_ = nullptr;
|
|
|
|
|
bool is_dumping_aec_ = false;
|
2013-07-10 00:45:36 +00:00
|
|
|
std::vector<AudioCodec> codecs_;
|
|
|
|
|
std::vector<RtpHeaderExtension> rtp_header_extensions_;
|
2015-09-29 06:06:31 -07:00
|
|
|
std::vector<WebRtcVoiceMediaChannel*> channels_;
|
2013-07-10 00:45:36 +00:00
|
|
|
webrtc::AgcConfig default_agc_config_;
|
2013-12-05 00:24:06 +00:00
|
|
|
|
|
|
|
|
webrtc::Config voe_config_;
|
|
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
bool initialized_ = false;
|
2013-07-10 00:45:36 +00:00
|
|
|
AudioOptions options_;
|
|
|
|
|
|
2015-06-09 16:03:13 +02:00
|
|
|
// Cache received extended_filter_aec, delay_agnostic_aec and experimental_ns
|
2015-03-25 22:45:56 +01:00
|
|
|
// values, and apply them in case they are missing in the audio options. We
|
|
|
|
|
// need to do this because SetExtraOptions() will revert to defaults for
|
|
|
|
|
// options which are not provided.
|
2015-11-10 22:34:18 +01:00
|
|
|
rtc::Optional<bool> extended_filter_aec_;
|
|
|
|
|
rtc::Optional<bool> delay_agnostic_aec_;
|
|
|
|
|
rtc::Optional<bool> experimental_ns_;
|
2015-10-21 13:01:53 -07:00
|
|
|
|
|
|
|
|
RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcVoiceEngine);
|
2013-07-10 00:45:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses
|
|
|
|
|
// WebRtc Voice Engine.
|
2015-11-06 15:34:49 -08:00
|
|
|
class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
|
|
|
|
|
public webrtc::Transport {
|
2013-07-10 00:45:36 +00:00
|
|
|
public:
|
2015-09-17 16:42:56 +02:00
|
|
|
WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine,
|
|
|
|
|
const AudioOptions& options,
|
|
|
|
|
webrtc::Call* call);
|
2015-05-07 16:05:53 +02:00
|
|
|
~WebRtcVoiceMediaChannel() override;
|
2015-05-07 16:42:08 +02:00
|
|
|
|
2015-09-09 01:36:22 -07:00
|
|
|
const AudioOptions& options() const { return options_; }
|
2015-05-07 16:42:08 +02:00
|
|
|
|
2015-08-07 16:05:34 -07:00
|
|
|
bool SetSendParameters(const AudioSendParameters& params) override;
|
|
|
|
|
bool SetRecvParameters(const AudioRecvParameters& params) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
bool SetPlayout(bool playout) override;
|
2013-07-10 00:45:36 +00:00
|
|
|
bool PausePlayout();
|
|
|
|
|
bool ResumePlayout();
|
2015-05-07 16:05:53 +02:00
|
|
|
bool SetSend(SendFlags send) override;
|
2013-07-10 00:45:36 +00:00
|
|
|
bool PauseSend();
|
|
|
|
|
bool ResumeSend();
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool SetAudioSend(uint32_t ssrc,
|
|
|
|
|
bool enable,
|
|
|
|
|
const AudioOptions* options,
|
2015-09-10 01:57:14 -07:00
|
|
|
AudioRenderer* renderer) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
bool AddSendStream(const StreamParams& sp) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool RemoveSendStream(uint32_t ssrc) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
bool AddRecvStream(const StreamParams& sp) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool RemoveRecvStream(uint32_t ssrc) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
bool GetActiveStreams(AudioInfo::StreamList* actives) override;
|
|
|
|
|
int GetOutputLevel() override;
|
|
|
|
|
int GetTimeSinceLastTyping() override;
|
|
|
|
|
void SetTypingDetectionParameters(int time_window,
|
|
|
|
|
int cost_per_typing,
|
|
|
|
|
int reporting_threshold,
|
|
|
|
|
int penalty_decay,
|
|
|
|
|
int type_event_delay) override;
|
2015-10-09 02:32:53 -07:00
|
|
|
bool SetOutputVolume(uint32_t ssrc, double volume) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
|
|
|
|
|
bool CanInsertDtmf() override;
|
2015-12-02 12:35:09 -08:00
|
|
|
bool InsertDtmf(uint32_t ssrc, int event, int duration) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
|
|
|
|
|
void OnPacketReceived(rtc::Buffer* packet,
|
|
|
|
|
const rtc::PacketTime& packet_time) override;
|
|
|
|
|
void OnRtcpReceived(rtc::Buffer* packet,
|
|
|
|
|
const rtc::PacketTime& packet_time) override;
|
|
|
|
|
void OnReadyToSend(bool ready) override {}
|
|
|
|
|
bool GetStats(VoiceMediaInfo* info) override;
|
2015-05-07 16:42:08 +02:00
|
|
|
|
|
|
|
|
// implements Transport interface
|
2015-10-02 03:39:33 -07:00
|
|
|
bool SendRtp(const uint8_t* data,
|
|
|
|
|
size_t len,
|
|
|
|
|
const webrtc::PacketOptions& options) override {
|
2015-05-07 16:42:08 +02:00
|
|
|
rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len,
|
|
|
|
|
kMaxRtpPacketLen);
|
2015-10-15 07:26:07 -07:00
|
|
|
rtc::PacketOptions rtc_options;
|
|
|
|
|
rtc_options.packet_id = options.packet_id;
|
|
|
|
|
return VoiceMediaChannel::SendPacket(&packet, rtc_options);
|
2015-05-07 16:42:08 +02:00
|
|
|
}
|
|
|
|
|
|
2015-09-28 09:59:31 -07:00
|
|
|
bool SendRtcp(const uint8_t* data, size_t len) override {
|
2015-05-07 16:42:08 +02:00
|
|
|
rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len,
|
|
|
|
|
kMaxRtpPacketLen);
|
2015-10-15 07:26:07 -07:00
|
|
|
return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions());
|
2015-05-07 16:42:08 +02:00
|
|
|
}
|
|
|
|
|
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
int GetReceiveChannelId(uint32_t ssrc) const;
|
|
|
|
|
int GetSendChannelId(uint32_t ssrc) const;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2015-05-07 16:42:08 +02:00
|
|
|
private:
|
2015-09-17 16:42:56 +02:00
|
|
|
bool SetSendCodecs(const std::vector<AudioCodec>& codecs);
|
|
|
|
|
bool SetOptions(const AudioOptions& options);
|
|
|
|
|
bool SetMaxSendBandwidth(int bps);
|
|
|
|
|
bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool SetLocalRenderer(uint32_t ssrc, AudioRenderer* renderer);
|
|
|
|
|
bool MuteStream(uint32_t ssrc, bool mute);
|
2015-09-17 16:42:56 +02:00
|
|
|
|
2015-05-07 16:42:08 +02:00
|
|
|
WebRtcVoiceEngine* engine() { return engine_; }
|
2013-07-10 00:45:36 +00:00
|
|
|
int GetLastEngineError() { return engine()->GetLastEngineError(); }
|
|
|
|
|
int GetOutputLevel(int channel);
|
|
|
|
|
bool GetRedSendCodec(const AudioCodec& red_codec,
|
|
|
|
|
const std::vector<AudioCodec>& all_codecs,
|
|
|
|
|
webrtc::CodecInst* send_codec);
|
|
|
|
|
bool SetPlayout(int channel, bool playout);
|
2013-08-30 21:24:16 +00:00
|
|
|
void SetNack(int channel, bool nack_enabled);
|
2013-08-05 20:36:57 +00:00
|
|
|
bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec);
|
2013-07-10 00:45:36 +00:00
|
|
|
bool ChangePlayout(bool playout);
|
|
|
|
|
bool ChangeSend(SendFlags send);
|
2013-08-05 20:36:57 +00:00
|
|
|
bool ChangeSend(int channel, SendFlags send);
|
2015-10-20 15:49:38 -07:00
|
|
|
int CreateVoEChannel();
|
2015-11-20 09:59:34 -08:00
|
|
|
bool DeleteVoEChannel(int channel);
|
2015-10-13 03:58:19 -07:00
|
|
|
bool IsDefaultRecvStream(uint32_t ssrc) {
|
|
|
|
|
return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
|
|
|
|
|
}
|
2013-08-30 21:24:16 +00:00
|
|
|
bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs);
|
2014-10-29 02:27:08 +00:00
|
|
|
bool SetSendBitrateInternal(int bps);
|
2015-05-07 14:07:48 +02:00
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
rtc::ThreadChecker worker_thread_checker_;
|
2015-05-07 14:07:48 +02:00
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
WebRtcVoiceEngine* const engine_ = nullptr;
|
2013-07-10 00:45:36 +00:00
|
|
|
std::vector<AudioCodec> recv_codecs_;
|
2013-08-30 21:24:16 +00:00
|
|
|
std::vector<AudioCodec> send_codecs_;
|
2014-07-29 17:36:52 +00:00
|
|
|
rtc::scoped_ptr<webrtc::CodecInst> send_codec_;
|
2015-11-06 15:34:49 -08:00
|
|
|
bool send_bitrate_setting_ = false;
|
|
|
|
|
int send_bitrate_bps_ = 0;
|
2013-07-10 00:45:36 +00:00
|
|
|
AudioOptions options_;
|
2015-11-06 15:34:49 -08:00
|
|
|
bool dtmf_allowed_ = false;
|
|
|
|
|
bool desired_playout_ = false;
|
|
|
|
|
bool nack_enabled_ = false;
|
|
|
|
|
bool playout_ = false;
|
|
|
|
|
SendFlags desired_send_ = SEND_NOTHING;
|
|
|
|
|
SendFlags send_ = SEND_NOTHING;
|
|
|
|
|
webrtc::Call* const call_ = nullptr;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2015-10-13 03:58:19 -07:00
|
|
|
// SSRC of unsignalled receive stream, or -1 if there isn't one.
|
|
|
|
|
int64_t default_recv_ssrc_ = -1;
|
|
|
|
|
// Volume for unsignalled stream, which may be set before the stream exists.
|
|
|
|
|
double default_recv_volume_ = 1.0;
|
2015-11-12 06:02:30 -08:00
|
|
|
// Default SSRC to use for RTCP receiver reports in case of no signaled
|
2015-10-20 15:49:38 -07:00
|
|
|
// send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740
|
2015-11-12 06:02:30 -08:00
|
|
|
// and https://code.google.com/p/chromium/issues/detail?id=547661
|
|
|
|
|
uint32_t receiver_reports_ssrc_ = 0xFA17FA17u;
|
2015-10-13 03:58:19 -07:00
|
|
|
|
2015-10-21 13:01:53 -07:00
|
|
|
class WebRtcAudioSendStream;
|
|
|
|
|
std::map<uint32_t, WebRtcAudioSendStream*> send_streams_;
|
2015-11-16 07:34:50 -08:00
|
|
|
std::vector<webrtc::RtpExtension> send_rtp_extensions_;
|
2015-10-21 13:01:53 -07:00
|
|
|
|
|
|
|
|
class WebRtcAudioReceiveStream;
|
2015-11-20 09:59:34 -08:00
|
|
|
std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
|
2015-05-07 14:07:48 +02:00
|
|
|
std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
|
2015-10-21 13:01:53 -07:00
|
|
|
|
|
|
|
|
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
|
2013-07-10 00:45:36 +00:00
|
|
|
};
|
|
|
|
|
} // namespace cricket
|
|
|
|
|
|
|
|
|
|
#endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_
|