2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-03-01 18:34:25 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2014-05-05 18:22:21 +00:00
|
|
|
#ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_
|
|
|
|
|
#define WEBRTC_VOICE_ENGINE_CHANNEL_H_
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2015-02-26 14:34:55 +00:00
|
|
|
#include "webrtc/base/scoped_ptr.h"
|
2013-07-31 16:23:37 +00:00
|
|
|
#include "webrtc/common_audio/resampler/include/push_resampler.h"
|
2013-02-12 21:42:18 +00:00
|
|
|
#include "webrtc/common_types.h"
|
2015-11-26 04:44:54 -08:00
|
|
|
#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
|
2015-11-04 08:31:52 +01:00
|
|
|
#include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h"
|
2014-05-05 18:22:21 +00:00
|
|
|
#include "webrtc/modules/audio_processing/rms_level.h"
|
2014-05-28 09:52:06 +00:00
|
|
|
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
|
2015-11-04 08:31:52 +01:00
|
|
|
#include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
|
|
|
|
|
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
|
|
|
|
|
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
|
|
|
|
|
#include "webrtc/modules/utility/include/file_player.h"
|
|
|
|
|
#include "webrtc/modules/utility/include/file_recorder.h"
|
2013-02-12 21:42:18 +00:00
|
|
|
#include "webrtc/voice_engine/dtmf_inband.h"
|
|
|
|
|
#include "webrtc/voice_engine/dtmf_inband_queue.h"
|
|
|
|
|
#include "webrtc/voice_engine/include/voe_audio_processing.h"
|
|
|
|
|
#include "webrtc/voice_engine/include/voe_network.h"
|
|
|
|
|
#include "webrtc/voice_engine/level_indicator.h"
|
2014-07-16 21:28:26 +00:00
|
|
|
#include "webrtc/voice_engine/network_predictor.h"
|
2013-02-12 21:42:18 +00:00
|
|
|
#include "webrtc/voice_engine/shared_data.h"
|
|
|
|
|
#include "webrtc/voice_engine/voice_engine_defines.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
#ifdef WEBRTC_DTMF_DETECTION
|
2013-05-21 13:52:32 +00:00
|
|
|
// TelephoneEventDetectionMethods, TelephoneEventObserver
|
|
|
|
|
#include "webrtc/voice_engine/include/voe_dtmf.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
#endif
|
|
|
|
|
|
2014-06-05 20:34:08 +00:00
|
|
|
namespace rtc {
|
|
|
|
|
|
|
|
|
|
class TimestampWrapAroundHandler;
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-23 23:02:24 +00:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
2013-07-16 19:25:04 +00:00
|
|
|
class AudioDeviceModule;
|
2013-09-12 17:03:00 +00:00
|
|
|
class Config;
|
2013-08-15 23:38:54 +00:00
|
|
|
class CriticalSectionWrapper;
|
2013-07-16 19:25:04 +00:00
|
|
|
class FileWrapper;
|
2013-08-15 23:38:54 +00:00
|
|
|
class ProcessThread;
|
|
|
|
|
class ReceiveStatistics;
|
2014-05-20 22:55:01 +00:00
|
|
|
class RemoteNtpTimeEstimator;
|
2015-09-09 00:09:43 -07:00
|
|
|
class RtcEventLog;
|
2013-08-15 23:38:54 +00:00
|
|
|
class RTPPayloadRegistry;
|
|
|
|
|
class RtpReceiver;
|
|
|
|
|
class RTPReceiverAudio;
|
|
|
|
|
class RtpRtcp;
|
|
|
|
|
class TelephoneEventHandler;
|
2011-07-07 08:21:25 +00:00
|
|
|
class VoEMediaProcess;
|
2013-08-15 23:38:54 +00:00
|
|
|
class VoERTPObserver;
|
|
|
|
|
class VoiceEngineObserver;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
struct CallStatistics;
|
2012-08-22 08:53:55 +00:00
|
|
|
struct ReportBlock;
|
|
|
|
|
struct SenderInfo;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-09-23 23:02:24 +00:00
|
|
|
namespace voe {
|
|
|
|
|
|
2015-02-17 12:57:14 +00:00
|
|
|
class OutputMixer;
|
2011-07-07 08:21:25 +00:00
|
|
|
class Statistics;
|
2013-12-19 13:26:02 +00:00
|
|
|
class StatisticsProxy;
|
2011-07-07 08:21:25 +00:00
|
|
|
class TransmitMixer;
|
2015-02-17 12:57:14 +00:00
|
|
|
class VoERtcpObserver;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2014-03-18 10:32:33 +00:00
|
|
|
// Helper class to simplify locking scheme for members that are accessed from
|
|
|
|
|
// multiple threads.
|
|
|
|
|
// Example: a member can be set on thread T1 and read by an internal audio
|
|
|
|
|
// thread T2. Accessing the member via this class ensures that we are
|
|
|
|
|
// safe and also avoid TSan v2 warnings.
|
|
|
|
|
class ChannelState {
|
|
|
|
|
public:
|
|
|
|
|
struct State {
|
|
|
|
|
State() : rx_apm_is_enabled(false),
|
|
|
|
|
input_external_media(false),
|
|
|
|
|
output_file_playing(false),
|
|
|
|
|
input_file_playing(false),
|
|
|
|
|
playing(false),
|
|
|
|
|
sending(false),
|
|
|
|
|
receiving(false) {}
|
|
|
|
|
|
|
|
|
|
bool rx_apm_is_enabled;
|
|
|
|
|
bool input_external_media;
|
|
|
|
|
bool output_file_playing;
|
|
|
|
|
bool input_file_playing;
|
|
|
|
|
bool playing;
|
|
|
|
|
bool sending;
|
|
|
|
|
bool receiving;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ChannelState() : lock_(CriticalSectionWrapper::CreateCriticalSection()) {
|
|
|
|
|
}
|
|
|
|
|
virtual ~ChannelState() {}
|
|
|
|
|
|
|
|
|
|
void Reset() {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_ = State();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
State Get() const {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
return state_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetRxApmIsEnabled(bool enable) {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_.rx_apm_is_enabled = enable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetInputExternalMedia(bool enable) {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_.input_external_media = enable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetOutputFilePlaying(bool enable) {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_.output_file_playing = enable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetInputFilePlaying(bool enable) {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_.input_file_playing = enable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetPlaying(bool enable) {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_.playing = enable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetSending(bool enable) {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_.sending = enable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetReceiving(bool enable) {
|
|
|
|
|
CriticalSectionScoped lock(lock_.get());
|
|
|
|
|
state_.receiving = enable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<CriticalSectionWrapper> lock_;
|
2014-03-18 10:32:33 +00:00
|
|
|
State state_;
|
|
|
|
|
};
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
class Channel:
|
|
|
|
|
public RtpData,
|
|
|
|
|
public RtpFeedback,
|
|
|
|
|
public FileCallback, // receiving notification from file player & recorder
|
|
|
|
|
public Transport,
|
|
|
|
|
public RtpAudioFeedback,
|
|
|
|
|
public AudioPacketizationCallback, // receive encoded packets from the ACM
|
|
|
|
|
public ACMVADCallback, // receive voice activity from the ACM
|
|
|
|
|
public MixerParticipant // supplies output mixer with audio frames
|
|
|
|
|
{
|
|
|
|
|
public:
|
2015-02-17 12:57:14 +00:00
|
|
|
friend class VoERtcpObserver;
|
|
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
enum {KNumSocketThreads = 1};
|
|
|
|
|
enum {KNumberOfSocketBuffers = 8};
|
|
|
|
|
virtual ~Channel();
|
2013-04-09 10:09:10 +00:00
|
|
|
static int32_t CreateChannel(Channel*& channel,
|
2013-05-14 08:31:39 +00:00
|
|
|
int32_t channelId,
|
2013-09-12 17:03:00 +00:00
|
|
|
uint32_t instanceId,
|
2015-09-09 00:09:43 -07:00
|
|
|
RtcEventLog* const event_log,
|
2013-09-12 17:03:00 +00:00
|
|
|
const Config& config);
|
2015-09-09 00:09:43 -07:00
|
|
|
Channel(int32_t channelId,
|
|
|
|
|
uint32_t instanceId,
|
|
|
|
|
RtcEventLog* const event_log,
|
|
|
|
|
const Config& config);
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t Init();
|
|
|
|
|
int32_t SetEngineInformation(
|
2011-07-07 08:21:25 +00:00
|
|
|
Statistics& engineStatistics,
|
|
|
|
|
OutputMixer& outputMixer,
|
|
|
|
|
TransmitMixer& transmitMixer,
|
|
|
|
|
ProcessThread& moduleProcessThread,
|
|
|
|
|
AudioDeviceModule& audioDeviceModule,
|
|
|
|
|
VoiceEngineObserver* voiceEngineObserver,
|
|
|
|
|
CriticalSectionWrapper* callbackCritSect);
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t UpdateLocalTimeStamp();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// API methods
|
|
|
|
|
|
|
|
|
|
// VoEBase
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t StartPlayout();
|
|
|
|
|
int32_t StopPlayout();
|
|
|
|
|
int32_t StartSend();
|
|
|
|
|
int32_t StopSend();
|
|
|
|
|
int32_t StartReceiving();
|
|
|
|
|
int32_t StopReceiving();
|
|
|
|
|
|
|
|
|
|
int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer);
|
|
|
|
|
int32_t DeRegisterVoiceEngineObserver();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// VoECodec
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t GetSendCodec(CodecInst& codec);
|
|
|
|
|
int32_t GetRecCodec(CodecInst& codec);
|
|
|
|
|
int32_t SetSendCodec(const CodecInst& codec);
|
2015-04-29 16:03:33 +02:00
|
|
|
void SetBitRate(int bitrate_bps);
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX);
|
|
|
|
|
int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX);
|
|
|
|
|
int32_t SetRecPayloadType(const CodecInst& codec);
|
|
|
|
|
int32_t GetRecPayloadType(CodecInst& codec);
|
|
|
|
|
int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency);
|
2014-09-03 12:28:06 +00:00
|
|
|
int SetOpusMaxPlaybackRate(int frequency_hz);
|
2015-03-13 09:38:07 +00:00
|
|
|
int SetOpusDtx(bool enable_dtx);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// VoENetwork
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t RegisterExternalTransport(Transport& transport);
|
|
|
|
|
int32_t DeRegisterExternalTransport();
|
Use size_t more consistently for packet/payload lengths.
See design doc at https://docs.google.com/a/chromium.org/document/d/1I6nmE9D_BmCY-IoV6MDPY2V6WYpEI-dg2apWXTfZyUI/edit?usp=sharing for more information.
This CL was reviewed and approved in pieces in the following CLs:
https://webrtc-codereview.appspot.com/24209004/
https://webrtc-codereview.appspot.com/24229004/
https://webrtc-codereview.appspot.com/24259004/
https://webrtc-codereview.appspot.com/25109004/
https://webrtc-codereview.appspot.com/26099004/
https://webrtc-codereview.appspot.com/27069004/
https://webrtc-codereview.appspot.com/27969004/
https://webrtc-codereview.appspot.com/27989004/
https://webrtc-codereview.appspot.com/29009004/
https://webrtc-codereview.appspot.com/30929004/
https://webrtc-codereview.appspot.com/30939004/
https://webrtc-codereview.appspot.com/31999004/
Committing as TBR to the original reviewers.
BUG=chromium:81439
TEST=none
TBR=pthatcher,henrik.lundin,tina.legrand,stefan,tkchin,glaznev,kjellander,perkj,mflodman,henrika,asapersson,niklas.enbom
Review URL: https://webrtc-codereview.appspot.com/23129004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7726 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-20 22:28:14 +00:00
|
|
|
int32_t ReceivedRTPPacket(const int8_t* data, size_t length,
|
2014-03-24 10:38:25 +00:00
|
|
|
const PacketTime& packet_time);
|
Use size_t more consistently for packet/payload lengths.
See design doc at https://docs.google.com/a/chromium.org/document/d/1I6nmE9D_BmCY-IoV6MDPY2V6WYpEI-dg2apWXTfZyUI/edit?usp=sharing for more information.
This CL was reviewed and approved in pieces in the following CLs:
https://webrtc-codereview.appspot.com/24209004/
https://webrtc-codereview.appspot.com/24229004/
https://webrtc-codereview.appspot.com/24259004/
https://webrtc-codereview.appspot.com/25109004/
https://webrtc-codereview.appspot.com/26099004/
https://webrtc-codereview.appspot.com/27069004/
https://webrtc-codereview.appspot.com/27969004/
https://webrtc-codereview.appspot.com/27989004/
https://webrtc-codereview.appspot.com/29009004/
https://webrtc-codereview.appspot.com/30929004/
https://webrtc-codereview.appspot.com/30939004/
https://webrtc-codereview.appspot.com/31999004/
Committing as TBR to the original reviewers.
BUG=chromium:81439
TEST=none
TBR=pthatcher,henrik.lundin,tina.legrand,stefan,tkchin,glaznev,kjellander,perkj,mflodman,henrika,asapersson,niklas.enbom
Review URL: https://webrtc-codereview.appspot.com/23129004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7726 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-20 22:28:14 +00:00
|
|
|
int32_t ReceivedRTCPPacket(const int8_t* data, size_t length);
|
2013-03-13 23:20:57 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
// VoEFile
|
2013-05-14 08:31:39 +00:00
|
|
|
int StartPlayingFileLocally(const char* fileName, bool loop,
|
|
|
|
|
FileFormats format,
|
|
|
|
|
int startPosition,
|
|
|
|
|
float volumeScaling,
|
|
|
|
|
int stopPosition,
|
2011-07-07 08:21:25 +00:00
|
|
|
const CodecInst* codecInst);
|
2013-05-14 08:31:39 +00:00
|
|
|
int StartPlayingFileLocally(InStream* stream, FileFormats format,
|
|
|
|
|
int startPosition,
|
|
|
|
|
float volumeScaling,
|
|
|
|
|
int stopPosition,
|
2011-07-07 08:21:25 +00:00
|
|
|
const CodecInst* codecInst);
|
|
|
|
|
int StopPlayingFileLocally();
|
|
|
|
|
int IsPlayingFileLocally() const;
|
2012-06-04 03:26:39 +00:00
|
|
|
int RegisterFilePlayingToMixer();
|
2013-05-14 08:31:39 +00:00
|
|
|
int StartPlayingFileAsMicrophone(const char* fileName, bool loop,
|
|
|
|
|
FileFormats format,
|
|
|
|
|
int startPosition,
|
|
|
|
|
float volumeScaling,
|
|
|
|
|
int stopPosition,
|
2011-07-07 08:21:25 +00:00
|
|
|
const CodecInst* codecInst);
|
|
|
|
|
int StartPlayingFileAsMicrophone(InStream* stream,
|
2013-05-14 08:31:39 +00:00
|
|
|
FileFormats format,
|
|
|
|
|
int startPosition,
|
|
|
|
|
float volumeScaling,
|
|
|
|
|
int stopPosition,
|
2011-07-07 08:21:25 +00:00
|
|
|
const CodecInst* codecInst);
|
|
|
|
|
int StopPlayingFileAsMicrophone();
|
|
|
|
|
int IsPlayingFileAsMicrophone() const;
|
|
|
|
|
int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst);
|
|
|
|
|
int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst);
|
|
|
|
|
int StopRecordingPlayout();
|
|
|
|
|
|
|
|
|
|
void SetMixWithMicStatus(bool mix);
|
|
|
|
|
|
|
|
|
|
// VoEExternalMediaProcessing
|
|
|
|
|
int RegisterExternalMediaProcessing(ProcessingTypes type,
|
|
|
|
|
VoEMediaProcess& processObject);
|
|
|
|
|
int DeRegisterExternalMediaProcessing(ProcessingTypes type);
|
2012-12-12 23:00:29 +00:00
|
|
|
int SetExternalMixing(bool enabled);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// VoEVolumeControl
|
2013-04-09 10:09:10 +00:00
|
|
|
int GetSpeechOutputLevel(uint32_t& level) const;
|
|
|
|
|
int GetSpeechOutputLevelFullRange(uint32_t& level) const;
|
2013-05-14 08:31:39 +00:00
|
|
|
int SetMute(bool enable);
|
2011-07-07 08:21:25 +00:00
|
|
|
bool Mute() const;
|
|
|
|
|
int SetOutputVolumePan(float left, float right);
|
|
|
|
|
int GetOutputVolumePan(float& left, float& right) const;
|
|
|
|
|
int SetChannelOutputVolumeScaling(float scaling);
|
|
|
|
|
int GetChannelOutputVolumeScaling(float& scaling) const;
|
|
|
|
|
|
|
|
|
|
// VoENetEqStats
|
|
|
|
|
int GetNetworkStatistics(NetworkStatistics& stats);
|
2013-12-13 19:17:43 +00:00
|
|
|
void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// VoEVideoSync
|
2013-04-11 20:23:35 +00:00
|
|
|
bool GetDelayEstimate(int* jitter_buffer_delay_ms,
|
|
|
|
|
int* playout_buffer_delay_ms) const;
|
2015-11-27 10:46:42 -08:00
|
|
|
uint32_t GetDelayEstimate() const;
|
2015-08-13 12:09:10 -07:00
|
|
|
int LeastRequiredDelayMs() const;
|
2011-07-07 08:21:25 +00:00
|
|
|
int SetMinimumPlayoutDelay(int delayMs);
|
|
|
|
|
int GetPlayoutTimestamp(unsigned int& timestamp);
|
|
|
|
|
int SetInitTimestamp(unsigned int timestamp);
|
|
|
|
|
int SetInitSequenceNumber(short sequenceNumber);
|
|
|
|
|
|
|
|
|
|
// VoEVideoSyncExtended
|
2013-08-15 23:38:54 +00:00
|
|
|
int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// VoEDtmf
|
|
|
|
|
int SendTelephoneEventOutband(unsigned char eventCode, int lengthMs,
|
|
|
|
|
int attenuationDb, bool playDtmfEvent);
|
|
|
|
|
int SendTelephoneEventInband(unsigned char eventCode, int lengthMs,
|
|
|
|
|
int attenuationDb, bool playDtmfEvent);
|
|
|
|
|
int SetSendTelephoneEventPayloadType(unsigned char type);
|
|
|
|
|
int GetSendTelephoneEventPayloadType(unsigned char& type);
|
|
|
|
|
|
|
|
|
|
// VoEAudioProcessingImpl
|
|
|
|
|
int UpdateRxVadDetection(AudioFrame& audioFrame);
|
|
|
|
|
int RegisterRxVadObserver(VoERxVadCallback &observer);
|
|
|
|
|
int DeRegisterRxVadObserver();
|
|
|
|
|
int VoiceActivityIndicator(int &activity);
|
|
|
|
|
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
2013-05-14 08:31:39 +00:00
|
|
|
int SetRxAgcStatus(bool enable, AgcModes mode);
|
2011-07-07 08:21:25 +00:00
|
|
|
int GetRxAgcStatus(bool& enabled, AgcModes& mode);
|
2013-05-14 08:31:39 +00:00
|
|
|
int SetRxAgcConfig(AgcConfig config);
|
2011-07-07 08:21:25 +00:00
|
|
|
int GetRxAgcConfig(AgcConfig& config);
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef WEBRTC_VOICE_ENGINE_NR
|
2013-05-14 08:31:39 +00:00
|
|
|
int SetRxNsStatus(bool enable, NsModes mode);
|
2011-07-07 08:21:25 +00:00
|
|
|
int GetRxNsStatus(bool& enabled, NsModes& mode);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// VoERTP_RTCP
|
|
|
|
|
int SetLocalSSRC(unsigned int ssrc);
|
|
|
|
|
int GetLocalSSRC(unsigned int& ssrc);
|
|
|
|
|
int GetRemoteSSRC(unsigned int& ssrc);
|
2014-03-06 23:49:08 +00:00
|
|
|
int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id);
|
2014-04-24 20:33:08 +00:00
|
|
|
int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id);
|
2014-03-06 23:49:08 +00:00
|
|
|
int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id);
|
|
|
|
|
int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id);
|
2014-12-19 13:49:55 +00:00
|
|
|
void SetRTCPStatus(bool enable);
|
2011-07-07 08:21:25 +00:00
|
|
|
int GetRTCPStatus(bool& enabled);
|
|
|
|
|
int SetRTCP_CNAME(const char cName[256]);
|
|
|
|
|
int GetRemoteRTCP_CNAME(char cName[256]);
|
|
|
|
|
int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow,
|
|
|
|
|
unsigned int& timestamp,
|
|
|
|
|
unsigned int& playoutTimestamp, unsigned int* jitter,
|
|
|
|
|
unsigned short* fractionLost);
|
2013-05-14 08:31:39 +00:00
|
|
|
int SendApplicationDefinedRTCPPacket(unsigned char subType,
|
2011-07-07 08:21:25 +00:00
|
|
|
unsigned int name, const char* data,
|
|
|
|
|
unsigned short dataLengthInBytes);
|
|
|
|
|
int GetRTPStatistics(unsigned int& averageJitterMs,
|
|
|
|
|
unsigned int& maxJitterMs,
|
|
|
|
|
unsigned int& discardedPackets);
|
2012-08-22 08:53:55 +00:00
|
|
|
int GetRemoteRTCPReportBlocks(std::vector<ReportBlock>* report_blocks);
|
2011-07-07 08:21:25 +00:00
|
|
|
int GetRTPStatistics(CallStatistics& stats);
|
2014-05-28 09:52:06 +00:00
|
|
|
int SetREDStatus(bool enable, int redPayloadtype);
|
|
|
|
|
int GetREDStatus(bool& enabled, int& redPayloadtype);
|
|
|
|
|
int SetCodecFECStatus(bool enable);
|
|
|
|
|
bool GetCodecFECStatus();
|
2013-06-05 15:33:20 +00:00
|
|
|
void SetNACKStatus(bool enable, int maxNumberOfPackets);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// From AudioPacketizationCallback in the ACM
|
2015-03-04 12:58:35 +00:00
|
|
|
int32_t SendData(FrameType frameType,
|
|
|
|
|
uint8_t payloadType,
|
|
|
|
|
uint32_t timeStamp,
|
|
|
|
|
const uint8_t* payloadData,
|
|
|
|
|
size_t payloadSize,
|
|
|
|
|
const RTPFragmentationHeader* fragmentation) override;
|
2014-10-10 09:42:53 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
// From ACMVADCallback in the ACM
|
2015-03-06 07:50:34 +00:00
|
|
|
int32_t InFrameType(FrameType frame_type) override;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-14 08:31:39 +00:00
|
|
|
int32_t OnRxVadDetected(int vadDecision);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// From RtpData in the RTP/RTCP module
|
2015-03-04 12:58:35 +00:00
|
|
|
int32_t OnReceivedPayloadData(const uint8_t* payloadData,
|
|
|
|
|
size_t payloadSize,
|
|
|
|
|
const WebRtcRTPHeader* rtpHeader) override;
|
|
|
|
|
bool OnRecoveredPacket(const uint8_t* packet,
|
|
|
|
|
size_t packet_length) override;
|
2013-08-15 23:38:54 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
// From RtpFeedback in the RTP/RTCP module
|
2015-09-17 23:03:57 +02:00
|
|
|
int32_t OnInitializeDecoder(int8_t payloadType,
|
2015-03-04 12:58:35 +00:00
|
|
|
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
|
|
|
|
|
int frequency,
|
|
|
|
|
uint8_t channels,
|
|
|
|
|
uint32_t rate) override;
|
2015-09-17 23:03:57 +02:00
|
|
|
void OnIncomingSSRCChanged(uint32_t ssrc) override;
|
|
|
|
|
void OnIncomingCSRCChanged(uint32_t CSRC, bool added) override;
|
2013-08-15 23:38:54 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
// From RtpAudioFeedback in the RTP/RTCP module
|
2015-09-17 23:03:57 +02:00
|
|
|
void OnPlayTelephoneEvent(uint8_t event,
|
2015-03-04 12:58:35 +00:00
|
|
|
uint16_t lengthMs,
|
|
|
|
|
uint8_t volume) override;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// From Transport (called by the RTP/RTCP module)
|
2015-10-02 03:39:33 -07:00
|
|
|
bool SendRtp(const uint8_t* data,
|
|
|
|
|
size_t len,
|
|
|
|
|
const PacketOptions& packet_options) override;
|
2015-09-28 09:59:31 -07:00
|
|
|
bool SendRtcp(const uint8_t* data, size_t len) override;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// From MixerParticipant
|
2015-08-31 16:04:32 +02:00
|
|
|
int32_t GetAudioFrame(int32_t id, AudioFrame* audioFrame) override;
|
|
|
|
|
int32_t NeededFrequency(int32_t id) const override;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// From FileCallback
|
2015-03-04 12:58:35 +00:00
|
|
|
void PlayNotification(int32_t id, uint32_t durationMs) override;
|
|
|
|
|
void RecordNotification(int32_t id, uint32_t durationMs) override;
|
|
|
|
|
void PlayFileEnded(int32_t id) override;
|
|
|
|
|
void RecordFileEnded(int32_t id) override;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t InstanceId() const
|
2011-07-07 08:21:25 +00:00
|
|
|
{
|
|
|
|
|
return _instanceId;
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t ChannelId() const
|
2011-07-07 08:21:25 +00:00
|
|
|
{
|
|
|
|
|
return _channelId;
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2011-07-07 08:21:25 +00:00
|
|
|
bool Playing() const
|
|
|
|
|
{
|
2014-03-18 10:32:33 +00:00
|
|
|
return channel_state_.Get().playing;
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2011-07-07 08:21:25 +00:00
|
|
|
bool Sending() const
|
|
|
|
|
{
|
2014-03-18 10:32:33 +00:00
|
|
|
return channel_state_.Get().sending;
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2011-07-07 08:21:25 +00:00
|
|
|
bool Receiving() const
|
|
|
|
|
{
|
2014-03-18 10:32:33 +00:00
|
|
|
return channel_state_.Get().receiving;
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2011-07-07 08:21:25 +00:00
|
|
|
bool ExternalTransport() const
|
|
|
|
|
{
|
2014-03-18 10:32:33 +00:00
|
|
|
CriticalSectionScoped cs(&_callbackCritSect);
|
2011-07-07 08:21:25 +00:00
|
|
|
return _externalTransport;
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2012-12-12 23:00:29 +00:00
|
|
|
bool ExternalMixing() const
|
|
|
|
|
{
|
|
|
|
|
return _externalMixing;
|
|
|
|
|
}
|
2011-08-19 22:56:22 +00:00
|
|
|
RtpRtcp* RtpRtcpModulePtr() const
|
2011-07-07 08:21:25 +00:00
|
|
|
{
|
2012-05-11 11:08:54 +00:00
|
|
|
return _rtpRtcpModule.get();
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2013-04-09 10:09:10 +00:00
|
|
|
int8_t OutputEnergyLevel() const
|
2011-07-07 08:21:25 +00:00
|
|
|
{
|
|
|
|
|
return _outputAudioLevel.Level();
|
2011-11-28 16:31:28 +00:00
|
|
|
}
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t Demultiplex(const AudioFrame& audioFrame);
|
2013-07-31 16:23:37 +00:00
|
|
|
// Demultiplex the data to the channel's |_audioFrame|. The difference
|
|
|
|
|
// between this method and the overloaded method above is that |audio_data|
|
|
|
|
|
// does not go through transmit_mixer and APM.
|
|
|
|
|
void Demultiplex(const int16_t* audio_data,
|
2013-07-31 16:27:42 +00:00
|
|
|
int sample_rate,
|
Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.
This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.
This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002
The change is being landed as TBR to all the folks who reviewed the above.
BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher
Review URL: https://codereview.webrtc.org/1230503003 .
Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 14:52:23 -07:00
|
|
|
size_t number_of_frames,
|
2013-07-31 16:27:42 +00:00
|
|
|
int number_of_channels);
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t PrepareEncodeAndSend(int mixingFrequency);
|
|
|
|
|
uint32_t EncodeAndSend();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2015-05-13 14:14:42 +02:00
|
|
|
// Associate to a send channel.
|
|
|
|
|
// Used for obtaining RTT for a receive-only channel.
|
|
|
|
|
void set_associate_send_channel(const ChannelOwner& channel) {
|
|
|
|
|
assert(_channelId != channel.channel()->ChannelId());
|
|
|
|
|
CriticalSectionScoped lock(assoc_send_channel_lock_.get());
|
|
|
|
|
associate_send_channel_ = channel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Disassociate a send channel if it was associated.
|
|
|
|
|
void DisassociateSendChannel(int channel_id);
|
|
|
|
|
|
2015-02-17 12:57:14 +00:00
|
|
|
protected:
|
|
|
|
|
void OnIncomingFractionLoss(int fraction_lost);
|
2014-05-28 09:52:06 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
private:
|
Use size_t more consistently for packet/payload lengths.
See design doc at https://docs.google.com/a/chromium.org/document/d/1I6nmE9D_BmCY-IoV6MDPY2V6WYpEI-dg2apWXTfZyUI/edit?usp=sharing for more information.
This CL was reviewed and approved in pieces in the following CLs:
https://webrtc-codereview.appspot.com/24209004/
https://webrtc-codereview.appspot.com/24229004/
https://webrtc-codereview.appspot.com/24259004/
https://webrtc-codereview.appspot.com/25109004/
https://webrtc-codereview.appspot.com/26099004/
https://webrtc-codereview.appspot.com/27069004/
https://webrtc-codereview.appspot.com/27969004/
https://webrtc-codereview.appspot.com/27989004/
https://webrtc-codereview.appspot.com/29009004/
https://webrtc-codereview.appspot.com/30929004/
https://webrtc-codereview.appspot.com/30939004/
https://webrtc-codereview.appspot.com/31999004/
Committing as TBR to the original reviewers.
BUG=chromium:81439
TEST=none
TBR=pthatcher,henrik.lundin,tina.legrand,stefan,tkchin,glaznev,kjellander,perkj,mflodman,henrika,asapersson,niklas.enbom
Review URL: https://webrtc-codereview.appspot.com/23129004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7726 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-20 22:28:14 +00:00
|
|
|
bool ReceivePacket(const uint8_t* packet, size_t packet_length,
|
2013-09-06 13:40:11 +00:00
|
|
|
const RTPHeader& header, bool in_order);
|
2015-01-23 11:58:42 +00:00
|
|
|
bool HandleRtxPacket(const uint8_t* packet,
|
|
|
|
|
size_t packet_length,
|
|
|
|
|
const RTPHeader& header);
|
2013-09-06 13:40:11 +00:00
|
|
|
bool IsPacketInOrder(const RTPHeader& header) const;
|
2013-11-08 15:18:52 +00:00
|
|
|
bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const;
|
2013-06-07 01:43:12 +00:00
|
|
|
int ResendPackets(const uint16_t* sequence_numbers, int length);
|
2011-07-07 08:21:25 +00:00
|
|
|
int InsertInbandDtmfTone();
|
2013-05-14 08:31:39 +00:00
|
|
|
int32_t MixOrReplaceAudioWithFile(int mixingFrequency);
|
|
|
|
|
int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency);
|
2015-08-13 12:09:10 -07:00
|
|
|
void UpdatePlayoutTimestamp(bool rtcp);
|
2013-04-11 20:23:35 +00:00
|
|
|
void UpdatePacketDelay(uint32_t timestamp,
|
|
|
|
|
uint16_t sequenceNumber);
|
2011-07-07 08:21:25 +00:00
|
|
|
void RegisterReceiveCodecsToRTPModule();
|
|
|
|
|
|
2012-12-11 02:15:12 +00:00
|
|
|
int SetRedPayloadType(int red_payload_type);
|
2014-03-06 23:49:08 +00:00
|
|
|
int SetSendRtpHeaderExtension(bool enable, RTPExtensionType type,
|
|
|
|
|
unsigned char id);
|
2013-09-23 23:02:24 +00:00
|
|
|
|
2014-06-05 20:34:08 +00:00
|
|
|
int32_t GetPlayoutFrequency();
|
2015-05-13 14:14:42 +02:00
|
|
|
int64_t GetRTT(bool allow_associate_channel) const;
|
2014-06-05 20:34:08 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
CriticalSectionWrapper& _fileCritSect;
|
|
|
|
|
CriticalSectionWrapper& _callbackCritSect;
|
2013-10-17 18:28:55 +00:00
|
|
|
CriticalSectionWrapper& volume_settings_critsect_;
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t _instanceId;
|
|
|
|
|
int32_t _channelId;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2014-03-18 10:32:33 +00:00
|
|
|
ChannelState channel_state_;
|
|
|
|
|
|
2015-09-17 16:30:16 +02:00
|
|
|
RtcEventLog* const event_log_;
|
|
|
|
|
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_;
|
|
|
|
|
rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
|
|
|
|
|
rtc::scoped_ptr<ReceiveStatistics> rtp_receive_statistics_;
|
|
|
|
|
rtc::scoped_ptr<StatisticsProxy> statistics_proxy_;
|
|
|
|
|
rtc::scoped_ptr<RtpReceiver> rtp_receiver_;
|
2013-08-15 23:38:54 +00:00
|
|
|
TelephoneEventHandler* telephone_event_handler_;
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<RtpRtcp> _rtpRtcpModule;
|
|
|
|
|
rtc::scoped_ptr<AudioCodingModule> audio_coding_;
|
2011-07-07 08:21:25 +00:00
|
|
|
AudioLevel _outputAudioLevel;
|
|
|
|
|
bool _externalTransport;
|
|
|
|
|
AudioFrame _audioFrame;
|
2014-04-19 00:32:07 +00:00
|
|
|
// Downsamples to the codec rate if necessary.
|
|
|
|
|
PushResampler<int16_t> input_resampler_;
|
2011-07-07 08:21:25 +00:00
|
|
|
FilePlayer* _inputFilePlayerPtr;
|
|
|
|
|
FilePlayer* _outputFilePlayerPtr;
|
|
|
|
|
FileRecorder* _outputFileRecorderPtr;
|
2011-08-08 08:18:44 +00:00
|
|
|
int _inputFilePlayerId;
|
|
|
|
|
int _outputFilePlayerId;
|
|
|
|
|
int _outputFileRecorderId;
|
2011-07-07 08:21:25 +00:00
|
|
|
bool _outputFileRecording;
|
|
|
|
|
DtmfInbandQueue _inbandDtmfQueue;
|
|
|
|
|
DtmfInband _inbandDtmfGenerator;
|
2011-08-03 12:40:23 +00:00
|
|
|
bool _outputExternalMedia;
|
2011-07-07 08:21:25 +00:00
|
|
|
VoEMediaProcess* _inputExternalMediaCallbackPtr;
|
|
|
|
|
VoEMediaProcess* _outputExternalMediaCallbackPtr;
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t _timeStamp;
|
|
|
|
|
uint8_t _sendTelephoneEventPayloadType;
|
2013-12-13 21:05:07 +00:00
|
|
|
|
2014-09-02 18:58:24 +00:00
|
|
|
RemoteNtpTimeEstimator ntp_estimator_ GUARDED_BY(ts_stats_lock_);
|
2014-05-20 22:55:01 +00:00
|
|
|
|
2013-12-13 21:05:07 +00:00
|
|
|
// Timestamp of the audio pulled from NetEq.
|
|
|
|
|
uint32_t jitter_buffer_playout_timestamp_;
|
2015-08-13 12:09:10 -07:00
|
|
|
uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_);
|
2013-04-11 20:23:35 +00:00
|
|
|
uint32_t playout_timestamp_rtcp_;
|
2015-08-13 12:09:10 -07:00
|
|
|
uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_);
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t _numberOfDiscardedPackets;
|
Merge r4374 from stable to trunk.
r4374 was mistakenly committed to stable, so this is to re-merge back to trunk.
Store the sequence number in StopSend() and resume it in StartSend().
When restarting the microphone device, we call StopSend() first, then
StartSend() later. Since we reset sequence number in StopSend(), it sometimes
causes libSRTP to complain about packets being replayed. Libjingle work around
it by caching the sequence number in WebRtcVoiceEngine.cc, and call
SetInitSequenceNumber() to resume the sequence number before StartSend().Store the sequence number in StopSend() and resume it in StartSend().
When restarting the microphone device, we call StopSend() first, then
StartSend() later. Since we reset sequence number in StopSend(), it sometimes
causes libSRTP to complain about packets being replayed. Libjingle work around
it by caching the sequence number in WebRtcVoiceEngine.cc, and call
SetInitSequenceNumber() to resume the sequence number before StartSend().
This patch fixes this problem by storing the sequence number in StopSend(), and
resume it in StartSend(). So that we can remove the workaround in libjingle.
BUG=2102
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1922004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4451 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 16:30:19 +00:00
|
|
|
uint16_t send_sequence_number_;
|
2013-09-06 13:40:11 +00:00
|
|
|
uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes];
|
2013-04-11 20:23:35 +00:00
|
|
|
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<CriticalSectionWrapper> ts_stats_lock_;
|
2014-05-19 17:39:11 +00:00
|
|
|
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_;
|
2014-05-19 17:39:11 +00:00
|
|
|
// The rtp timestamp of the first played out audio frame.
|
2014-06-05 20:34:08 +00:00
|
|
|
int64_t capture_start_rtp_time_stamp_;
|
2014-05-19 17:39:11 +00:00
|
|
|
// The capture ntp time (in local timebase) of the first played out audio
|
|
|
|
|
// frame.
|
2014-09-02 18:58:24 +00:00
|
|
|
int64_t capture_start_ntp_time_ms_ GUARDED_BY(ts_stats_lock_);
|
2014-05-19 17:39:11 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
// uses
|
|
|
|
|
Statistics* _engineStatisticsPtr;
|
|
|
|
|
OutputMixer* _outputMixerPtr;
|
|
|
|
|
TransmitMixer* _transmitMixerPtr;
|
|
|
|
|
ProcessThread* _moduleProcessThreadPtr;
|
|
|
|
|
AudioDeviceModule* _audioDeviceModulePtr;
|
|
|
|
|
VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base
|
|
|
|
|
CriticalSectionWrapper* _callbackCritSectPtr; // owned by base
|
|
|
|
|
Transport* _transportPtr; // WebRtc socket or external transport
|
2014-05-05 18:22:21 +00:00
|
|
|
RMSLevel rms_level_;
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<AudioProcessing> rx_audioproc_; // far end AudioProcessing
|
2011-07-07 08:21:25 +00:00
|
|
|
VoERxVadCallback* _rxVadObserverPtr;
|
2013-04-09 10:09:10 +00:00
|
|
|
int32_t _oldVadDecision;
|
|
|
|
|
int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise
|
2011-07-07 08:21:25 +00:00
|
|
|
// VoEBase
|
2012-12-12 23:00:29 +00:00
|
|
|
bool _externalMixing;
|
2011-07-07 08:21:25 +00:00
|
|
|
bool _mixFileWithMicrophone;
|
|
|
|
|
// VoEVolumeControl
|
|
|
|
|
bool _mute;
|
|
|
|
|
float _panLeft;
|
|
|
|
|
float _panRight;
|
|
|
|
|
float _outputGain;
|
|
|
|
|
// VoEDtmf
|
|
|
|
|
bool _playOutbandDtmfEvent;
|
|
|
|
|
bool _playInbandDtmfEvent;
|
|
|
|
|
// VoeRTP_RTCP
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t _lastLocalTimeStamp;
|
|
|
|
|
int8_t _lastPayloadType;
|
2011-07-07 08:21:25 +00:00
|
|
|
bool _includeAudioLevelIndication;
|
|
|
|
|
// VoENetwork
|
|
|
|
|
AudioFrame::SpeechType _outputSpeechType;
|
|
|
|
|
// VoEVideoSync
|
2015-08-13 12:09:10 -07:00
|
|
|
rtc::scoped_ptr<CriticalSectionWrapper> video_sync_lock_;
|
|
|
|
|
uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_);
|
2013-04-09 10:09:10 +00:00
|
|
|
uint32_t _previousTimestamp;
|
2015-08-13 12:09:10 -07:00
|
|
|
uint16_t _recPacketDelayMs GUARDED_BY(video_sync_lock_);
|
2011-07-07 08:21:25 +00:00
|
|
|
// VoEAudioProcessing
|
|
|
|
|
bool _RxVadDetection;
|
|
|
|
|
bool _rxAgcIsEnabled;
|
|
|
|
|
bool _rxNsIsEnabled;
|
2013-09-06 13:40:11 +00:00
|
|
|
bool restored_packet_in_use_;
|
2014-05-28 09:52:06 +00:00
|
|
|
// RtcpBandwidthObserver
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_;
|
|
|
|
|
rtc::scoped_ptr<NetworkPredictor> network_predictor_;
|
2015-05-13 14:14:42 +02:00
|
|
|
// An associated send channel.
|
|
|
|
|
rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_;
|
|
|
|
|
ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_);
|
2011-07-07 08:21:25 +00:00
|
|
|
};
|
|
|
|
|
|
2013-07-03 15:12:26 +00:00
|
|
|
} // namespace voe
|
|
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2014-05-05 18:22:21 +00:00
|
|
|
#endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
|