niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
leozwang@webrtc.org | 813e4b0 | 2012-03-01 18:34:25 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H |
| 12 | #define WEBRTC_VOICE_ENGINE_CHANNEL_H |
| 13 | |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 14 | #include "webrtc/common_audio/resampler/include/push_resampler.h" |
turaj@webrtc.org | 6388c3e | 2013-02-12 21:42:18 +0000 | [diff] [blame] | 15 | #include "webrtc/common_types.h" |
| 16 | #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h" |
| 17 | #include "webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer_defines.h" |
stefan@webrtc.org | a5cb98c | 2013-05-29 12:12:51 +0000 | [diff] [blame] | 18 | #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h" |
turaj@webrtc.org | 6388c3e | 2013-02-12 21:42:18 +0000 | [diff] [blame] | 19 | #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h" |
| 20 | #include "webrtc/modules/utility/interface/file_player.h" |
| 21 | #include "webrtc/modules/utility/interface/file_recorder.h" |
| 22 | #include "webrtc/system_wrappers/interface/scoped_ptr.h" |
| 23 | #include "webrtc/voice_engine/dtmf_inband.h" |
| 24 | #include "webrtc/voice_engine/dtmf_inband_queue.h" |
| 25 | #include "webrtc/voice_engine/include/voe_audio_processing.h" |
| 26 | #include "webrtc/voice_engine/include/voe_network.h" |
| 27 | #include "webrtc/voice_engine/level_indicator.h" |
| 28 | #include "webrtc/voice_engine/shared_data.h" |
| 29 | #include "webrtc/voice_engine/voice_engine_defines.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 30 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 31 | #ifdef WEBRTC_DTMF_DETECTION |
pbos@webrtc.org | 956aa7e | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 32 | // TelephoneEventDetectionMethods, TelephoneEventObserver |
| 33 | #include "webrtc/voice_engine/include/voe_dtmf.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 34 | #endif |
| 35 | |
| 36 | namespace webrtc |
| 37 | { |
stefan@webrtc.org | 66b2e5c | 2013-07-05 14:30:48 +0000 | [diff] [blame] | 38 | class CriticalSectionWrapper; |
stefan@webrtc.org | 66b2e5c | 2013-07-05 14:30:48 +0000 | [diff] [blame] | 39 | class ProcessThread; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 40 | class AudioDeviceModule; |
stefan@webrtc.org | 66b2e5c | 2013-07-05 14:30:48 +0000 | [diff] [blame] | 41 | class RtpRtcp; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 42 | class FileWrapper; |
| 43 | class RtpDump; |
stefan@webrtc.org | 66b2e5c | 2013-07-05 14:30:48 +0000 | [diff] [blame] | 44 | class VoiceEngineObserver; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 45 | class VoEMediaProcess; |
| 46 | class VoERTPObserver; |
| 47 | class VoERTCPObserver; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 48 | |
| 49 | struct CallStatistics; |
henrika@webrtc.org | 8a2fc88 | 2012-08-22 08:53:55 +0000 | [diff] [blame] | 50 | struct ReportBlock; |
| 51 | struct SenderInfo; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 52 | |
| 53 | namespace voe |
| 54 | { |
| 55 | class Statistics; |
| 56 | class TransmitMixer; |
| 57 | class OutputMixer; |
| 58 | |
| 59 | |
| 60 | class Channel: |
| 61 | public RtpData, |
| 62 | public RtpFeedback, |
| 63 | public RtcpFeedback, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 64 | public FileCallback, // receiving notification from file player & recorder |
| 65 | public Transport, |
| 66 | public RtpAudioFeedback, |
| 67 | public AudioPacketizationCallback, // receive encoded packets from the ACM |
| 68 | public ACMVADCallback, // receive voice activity from the ACM |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 69 | public MixerParticipant // supplies output mixer with audio frames |
| 70 | { |
| 71 | public: |
| 72 | enum {KNumSocketThreads = 1}; |
| 73 | enum {KNumberOfSocketBuffers = 8}; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 74 | public: |
| 75 | virtual ~Channel(); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 76 | static int32_t CreateChannel(Channel*& channel, |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 77 | int32_t channelId, |
| 78 | uint32_t instanceId); |
| 79 | Channel(int32_t channelId, uint32_t instanceId); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 80 | int32_t Init(); |
| 81 | int32_t SetEngineInformation( |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 82 | Statistics& engineStatistics, |
| 83 | OutputMixer& outputMixer, |
| 84 | TransmitMixer& transmitMixer, |
| 85 | ProcessThread& moduleProcessThread, |
| 86 | AudioDeviceModule& audioDeviceModule, |
| 87 | VoiceEngineObserver* voiceEngineObserver, |
| 88 | CriticalSectionWrapper* callbackCritSect); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 89 | int32_t UpdateLocalTimeStamp(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 90 | |
| 91 | public: |
| 92 | // API methods |
| 93 | |
| 94 | // VoEBase |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 95 | int32_t StartPlayout(); |
| 96 | int32_t StopPlayout(); |
| 97 | int32_t StartSend(); |
| 98 | int32_t StopSend(); |
| 99 | int32_t StartReceiving(); |
| 100 | int32_t StopReceiving(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 101 | |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 102 | int32_t SetNetEQPlayoutMode(NetEqModes mode); |
| 103 | int32_t GetNetEQPlayoutMode(NetEqModes& mode); |
| 104 | int32_t SetOnHoldStatus(bool enable, OnHoldModes mode); |
| 105 | int32_t GetOnHoldStatus(bool& enabled, OnHoldModes& mode); |
| 106 | int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); |
| 107 | int32_t DeRegisterVoiceEngineObserver(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 108 | |
| 109 | // VoECodec |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 110 | int32_t GetSendCodec(CodecInst& codec); |
| 111 | int32_t GetRecCodec(CodecInst& codec); |
| 112 | int32_t SetSendCodec(const CodecInst& codec); |
| 113 | int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX); |
| 114 | int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX); |
| 115 | int32_t SetRecPayloadType(const CodecInst& codec); |
| 116 | int32_t GetRecPayloadType(CodecInst& codec); |
| 117 | int32_t SetAMREncFormat(AmrMode mode); |
| 118 | int32_t SetAMRDecFormat(AmrMode mode); |
| 119 | int32_t SetAMRWbEncFormat(AmrMode mode); |
| 120 | int32_t SetAMRWbDecFormat(AmrMode mode); |
| 121 | int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency); |
| 122 | int32_t SetISACInitTargetRate(int rateBps, bool useFixedFrameSize); |
| 123 | int32_t SetISACMaxRate(int rateBps); |
| 124 | int32_t SetISACMaxPayloadSize(int sizeBytes); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 125 | |
turaj@webrtc.org | 42259e7 | 2012-12-11 02:15:12 +0000 | [diff] [blame] | 126 | // VoE dual-streaming. |
| 127 | int SetSecondarySendCodec(const CodecInst& codec, int red_payload_type); |
| 128 | void RemoveSecondarySendCodec(); |
| 129 | int GetSecondarySendCodec(CodecInst* codec); |
| 130 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 131 | // VoENetwork |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 132 | int32_t RegisterExternalTransport(Transport& transport); |
| 133 | int32_t DeRegisterExternalTransport(); |
| 134 | int32_t ReceivedRTPPacket(const int8_t* data, int32_t length); |
| 135 | int32_t ReceivedRTCPPacket(const int8_t* data, int32_t length); |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 136 | int32_t SetPacketTimeoutNotification(bool enable, int timeoutSeconds); |
| 137 | int32_t GetPacketTimeoutNotification(bool& enabled, int& timeoutSeconds); |
| 138 | int32_t RegisterDeadOrAliveObserver(VoEConnectionObserver& observer); |
| 139 | int32_t DeRegisterDeadOrAliveObserver(); |
| 140 | int32_t SetPeriodicDeadOrAliveStatus(bool enable, int sampleTimeSeconds); |
| 141 | int32_t GetPeriodicDeadOrAliveStatus(bool& enabled, int& sampleTimeSeconds); |
pwestin@webrtc.org | 684f057 | 2013-03-13 23:20:57 +0000 | [diff] [blame] | 142 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 143 | // VoEFile |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 144 | int StartPlayingFileLocally(const char* fileName, bool loop, |
| 145 | FileFormats format, |
| 146 | int startPosition, |
| 147 | float volumeScaling, |
| 148 | int stopPosition, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 149 | const CodecInst* codecInst); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 150 | int StartPlayingFileLocally(InStream* stream, FileFormats format, |
| 151 | int startPosition, |
| 152 | float volumeScaling, |
| 153 | int stopPosition, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 154 | const CodecInst* codecInst); |
| 155 | int StopPlayingFileLocally(); |
| 156 | int IsPlayingFileLocally() const; |
braveyao@webrtc.org | ab12990 | 2012-06-04 03:26:39 +0000 | [diff] [blame] | 157 | int RegisterFilePlayingToMixer(); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 158 | int ScaleLocalFilePlayout(float scale); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 159 | int GetLocalPlayoutPosition(int& positionMs); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 160 | int StartPlayingFileAsMicrophone(const char* fileName, bool loop, |
| 161 | FileFormats format, |
| 162 | int startPosition, |
| 163 | float volumeScaling, |
| 164 | int stopPosition, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 165 | const CodecInst* codecInst); |
| 166 | int StartPlayingFileAsMicrophone(InStream* stream, |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 167 | FileFormats format, |
| 168 | int startPosition, |
| 169 | float volumeScaling, |
| 170 | int stopPosition, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 171 | const CodecInst* codecInst); |
| 172 | int StopPlayingFileAsMicrophone(); |
| 173 | int IsPlayingFileAsMicrophone() const; |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 174 | int ScaleFileAsMicrophonePlayout(float scale); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 175 | int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst); |
| 176 | int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst); |
| 177 | int StopRecordingPlayout(); |
| 178 | |
| 179 | void SetMixWithMicStatus(bool mix); |
| 180 | |
| 181 | // VoEExternalMediaProcessing |
| 182 | int RegisterExternalMediaProcessing(ProcessingTypes type, |
| 183 | VoEMediaProcess& processObject); |
| 184 | int DeRegisterExternalMediaProcessing(ProcessingTypes type); |
roosa@google.com | 1b60ceb | 2012-12-12 23:00:29 +0000 | [diff] [blame] | 185 | int SetExternalMixing(bool enabled); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 186 | |
| 187 | // VoEVolumeControl |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 188 | int GetSpeechOutputLevel(uint32_t& level) const; |
| 189 | int GetSpeechOutputLevelFullRange(uint32_t& level) const; |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 190 | int SetMute(bool enable); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 191 | bool Mute() const; |
| 192 | int SetOutputVolumePan(float left, float right); |
| 193 | int GetOutputVolumePan(float& left, float& right) const; |
| 194 | int SetChannelOutputVolumeScaling(float scaling); |
| 195 | int GetChannelOutputVolumeScaling(float& scaling) const; |
| 196 | |
| 197 | // VoECallReport |
| 198 | void ResetDeadOrAliveCounters(); |
| 199 | int ResetRTCPStatistics(); |
| 200 | int GetRoundTripTimeSummary(StatVal& delaysMs) const; |
| 201 | int GetDeadOrAliveCounters(int& countDead, int& countAlive) const; |
| 202 | |
| 203 | // VoENetEqStats |
| 204 | int GetNetworkStatistics(NetworkStatistics& stats); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 205 | |
| 206 | // VoEVideoSync |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 207 | bool GetDelayEstimate(int* jitter_buffer_delay_ms, |
| 208 | int* playout_buffer_delay_ms) const; |
turaj@webrtc.org | e46c8d3 | 2013-05-22 20:39:43 +0000 | [diff] [blame] | 209 | int least_required_delay_ms() const { return least_required_delay_ms_; } |
turaj@webrtc.org | 6388c3e | 2013-02-12 21:42:18 +0000 | [diff] [blame] | 210 | int SetInitialPlayoutDelay(int delay_ms); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 211 | int SetMinimumPlayoutDelay(int delayMs); |
| 212 | int GetPlayoutTimestamp(unsigned int& timestamp); |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 213 | void UpdatePlayoutTimestamp(bool rtcp); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 214 | int SetInitTimestamp(unsigned int timestamp); |
| 215 | int SetInitSequenceNumber(short sequenceNumber); |
| 216 | |
| 217 | // VoEVideoSyncExtended |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 218 | int GetRtpRtcp(RtpRtcp* &rtpRtcpModule) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 219 | |
| 220 | // VoEEncryption |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 221 | int RegisterExternalEncryption(Encryption& encryption); |
| 222 | int DeRegisterExternalEncryption(); |
| 223 | |
| 224 | // VoEDtmf |
| 225 | int SendTelephoneEventOutband(unsigned char eventCode, int lengthMs, |
| 226 | int attenuationDb, bool playDtmfEvent); |
| 227 | int SendTelephoneEventInband(unsigned char eventCode, int lengthMs, |
| 228 | int attenuationDb, bool playDtmfEvent); |
| 229 | int SetDtmfPlayoutStatus(bool enable); |
| 230 | bool DtmfPlayoutStatus() const; |
| 231 | int SetSendTelephoneEventPayloadType(unsigned char type); |
| 232 | int GetSendTelephoneEventPayloadType(unsigned char& type); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 233 | |
| 234 | // VoEAudioProcessingImpl |
| 235 | int UpdateRxVadDetection(AudioFrame& audioFrame); |
| 236 | int RegisterRxVadObserver(VoERxVadCallback &observer); |
| 237 | int DeRegisterRxVadObserver(); |
| 238 | int VoiceActivityIndicator(int &activity); |
| 239 | #ifdef WEBRTC_VOICE_ENGINE_AGC |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 240 | int SetRxAgcStatus(bool enable, AgcModes mode); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 241 | int GetRxAgcStatus(bool& enabled, AgcModes& mode); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 242 | int SetRxAgcConfig(AgcConfig config); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 243 | int GetRxAgcConfig(AgcConfig& config); |
| 244 | #endif |
| 245 | #ifdef WEBRTC_VOICE_ENGINE_NR |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 246 | int SetRxNsStatus(bool enable, NsModes mode); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 247 | int GetRxNsStatus(bool& enabled, NsModes& mode); |
| 248 | #endif |
| 249 | |
| 250 | // VoERTP_RTCP |
| 251 | int RegisterRTPObserver(VoERTPObserver& observer); |
| 252 | int DeRegisterRTPObserver(); |
| 253 | int RegisterRTCPObserver(VoERTCPObserver& observer); |
| 254 | int DeRegisterRTCPObserver(); |
| 255 | int SetLocalSSRC(unsigned int ssrc); |
| 256 | int GetLocalSSRC(unsigned int& ssrc); |
| 257 | int GetRemoteSSRC(unsigned int& ssrc); |
| 258 | int GetRemoteCSRCs(unsigned int arrCSRC[15]); |
| 259 | int SetRTPAudioLevelIndicationStatus(bool enable, unsigned char ID); |
| 260 | int GetRTPAudioLevelIndicationStatus(bool& enable, unsigned char& ID); |
| 261 | int SetRTCPStatus(bool enable); |
| 262 | int GetRTCPStatus(bool& enabled); |
| 263 | int SetRTCP_CNAME(const char cName[256]); |
| 264 | int GetRTCP_CNAME(char cName[256]); |
| 265 | int GetRemoteRTCP_CNAME(char cName[256]); |
| 266 | int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow, |
| 267 | unsigned int& timestamp, |
| 268 | unsigned int& playoutTimestamp, unsigned int* jitter, |
| 269 | unsigned short* fractionLost); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 270 | int SendApplicationDefinedRTCPPacket(unsigned char subType, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 271 | unsigned int name, const char* data, |
| 272 | unsigned short dataLengthInBytes); |
| 273 | int GetRTPStatistics(unsigned int& averageJitterMs, |
| 274 | unsigned int& maxJitterMs, |
| 275 | unsigned int& discardedPackets); |
henrika@webrtc.org | 8a2fc88 | 2012-08-22 08:53:55 +0000 | [diff] [blame] | 276 | int GetRemoteRTCPSenderInfo(SenderInfo* sender_info); |
| 277 | int GetRemoteRTCPReportBlocks(std::vector<ReportBlock>* report_blocks); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 278 | int GetRTPStatistics(CallStatistics& stats); |
| 279 | int SetFECStatus(bool enable, int redPayloadtype); |
| 280 | int GetFECStatus(bool& enabled, int& redPayloadtype); |
pwestin@webrtc.org | db24995 | 2013-06-05 15:33:20 +0000 | [diff] [blame] | 281 | void SetNACKStatus(bool enable, int maxNumberOfPackets); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 282 | int StartRTPDump(const char fileNameUTF8[1024], RTPDirections direction); |
| 283 | int StopRTPDump(RTPDirections direction); |
| 284 | bool RTPDumpIsActive(RTPDirections direction); |
| 285 | int InsertExtraRTPPacket(unsigned char payloadType, bool markerBit, |
| 286 | const char* payloadData, |
| 287 | unsigned short payloadSize); |
roosa@google.com | 0870f02 | 2012-12-12 21:31:41 +0000 | [diff] [blame] | 288 | uint32_t LastRemoteTimeStamp() { return _lastRemoteTimeStamp; } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 289 | |
| 290 | public: |
| 291 | // From AudioPacketizationCallback in the ACM |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 292 | int32_t SendData(FrameType frameType, |
| 293 | uint8_t payloadType, |
| 294 | uint32_t timeStamp, |
| 295 | const uint8_t* payloadData, |
| 296 | uint16_t payloadSize, |
| 297 | const RTPFragmentationHeader* fragmentation); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 298 | // From ACMVADCallback in the ACM |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 299 | int32_t InFrameType(int16_t frameType); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 300 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 301 | public: |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 302 | int32_t OnRxVadDetected(int vadDecision); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 303 | |
| 304 | public: |
| 305 | // From RtpData in the RTP/RTCP module |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 306 | int32_t OnReceivedPayloadData(const uint8_t* payloadData, |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 307 | uint16_t payloadSize, |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 308 | const WebRtcRTPHeader* rtpHeader); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 309 | |
| 310 | public: |
| 311 | // From RtpFeedback in the RTP/RTCP module |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 312 | int32_t OnInitializeDecoder( |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 313 | int32_t id, |
| 314 | int8_t payloadType, |
leozwang@webrtc.org | 813e4b0 | 2012-03-01 18:34:25 +0000 | [diff] [blame] | 315 | const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 316 | int frequency, |
| 317 | uint8_t channels, |
| 318 | uint32_t rate); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 319 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 320 | void OnPacketTimeout(int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 321 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 322 | void OnReceivedPacket(int32_t id, RtpRtcpPacketType packetType); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 323 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 324 | void OnPeriodicDeadOrAlive(int32_t id, |
| 325 | RTPAliveType alive); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 326 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 327 | void OnIncomingSSRCChanged(int32_t id, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 328 | uint32_t SSRC); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 329 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 330 | void OnIncomingCSRCChanged(int32_t id, |
| 331 | uint32_t CSRC, bool added); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 332 | |
| 333 | public: |
| 334 | // From RtcpFeedback in the RTP/RTCP module |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 335 | void OnApplicationDataReceived(int32_t id, |
| 336 | uint8_t subType, |
| 337 | uint32_t name, |
| 338 | uint16_t length, |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 339 | const uint8_t* data); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 340 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 341 | public: |
| 342 | // From RtpAudioFeedback in the RTP/RTCP module |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 343 | void OnReceivedTelephoneEvent(int32_t id, |
| 344 | uint8_t event, |
| 345 | bool endOfEvent); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 346 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 347 | void OnPlayTelephoneEvent(int32_t id, |
| 348 | uint8_t event, |
| 349 | uint16_t lengthMs, |
| 350 | uint8_t volume); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 351 | |
| 352 | public: |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 353 | // From Transport (called by the RTP/RTCP module) |
| 354 | int SendPacket(int /*channel*/, const void *data, int len); |
| 355 | int SendRTCPPacket(int /*channel*/, const void *data, int len); |
| 356 | |
| 357 | public: |
| 358 | // From MixerParticipant |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 359 | int32_t GetAudioFrame(int32_t id, AudioFrame& audioFrame); |
| 360 | int32_t NeededFrequency(int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 361 | |
| 362 | public: |
| 363 | // From MonitorObserver |
| 364 | void OnPeriodicProcess(); |
| 365 | |
| 366 | public: |
| 367 | // From FileCallback |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 368 | void PlayNotification(int32_t id, |
| 369 | uint32_t durationMs); |
| 370 | void RecordNotification(int32_t id, |
| 371 | uint32_t durationMs); |
| 372 | void PlayFileEnded(int32_t id); |
| 373 | void RecordFileEnded(int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 374 | |
| 375 | public: |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 376 | uint32_t InstanceId() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 377 | { |
| 378 | return _instanceId; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 379 | } |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 380 | int32_t ChannelId() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 381 | { |
| 382 | return _channelId; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 383 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 384 | bool Playing() const |
| 385 | { |
| 386 | return _playing; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 387 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 388 | bool Sending() const |
| 389 | { |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 390 | // A lock is needed because |_sending| is accessed by both |
| 391 | // TransmitMixer::PrepareDemux() and StartSend()/StopSend(), which |
| 392 | // are called by different threads. |
mflodman@webrtc.org | 9a065d1 | 2012-03-07 08:12:21 +0000 | [diff] [blame] | 393 | CriticalSectionScoped cs(&_callbackCritSect); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 394 | return _sending; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 395 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 396 | bool Receiving() const |
| 397 | { |
| 398 | return _receiving; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 399 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 400 | bool ExternalTransport() const |
| 401 | { |
| 402 | return _externalTransport; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 403 | } |
roosa@google.com | 1b60ceb | 2012-12-12 23:00:29 +0000 | [diff] [blame] | 404 | bool ExternalMixing() const |
| 405 | { |
| 406 | return _externalMixing; |
| 407 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 408 | bool OutputIsOnHold() const |
| 409 | { |
| 410 | return _outputIsOnHold; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 411 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 412 | bool InputIsOnHold() const |
| 413 | { |
| 414 | return _inputIsOnHold; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 415 | } |
andrew@webrtc.org | f81f9f8 | 2011-08-19 22:56:22 +0000 | [diff] [blame] | 416 | RtpRtcp* RtpRtcpModulePtr() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 417 | { |
pwestin@webrtc.org | 2853dde | 2012-05-11 11:08:54 +0000 | [diff] [blame] | 418 | return _rtpRtcpModule.get(); |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 419 | } |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 420 | int8_t OutputEnergyLevel() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 421 | { |
| 422 | return _outputAudioLevel.Level(); |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 423 | } |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 424 | uint32_t Demultiplex(const AudioFrame& audioFrame); |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 425 | // Demultiplex the data to the channel's |_audioFrame|. The difference |
| 426 | // between this method and the overloaded method above is that |audio_data| |
| 427 | // does not go through transmit_mixer and APM. |
| 428 | void Demultiplex(const int16_t* audio_data, |
xians@webrtc.org | 8fff1f0 | 2013-07-31 16:27:42 +0000 | [diff] [blame^] | 429 | int sample_rate, |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 430 | int number_of_frames, |
xians@webrtc.org | 8fff1f0 | 2013-07-31 16:27:42 +0000 | [diff] [blame^] | 431 | int number_of_channels); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 432 | uint32_t PrepareEncodeAndSend(int mixingFrequency); |
| 433 | uint32_t EncodeAndSend(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 434 | |
| 435 | private: |
andrew@webrtc.org | da71044 | 2013-06-07 01:43:12 +0000 | [diff] [blame] | 436 | int ResendPackets(const uint16_t* sequence_numbers, int length); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 437 | int InsertInbandDtmfTone(); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 438 | int32_t MixOrReplaceAudioWithFile(int mixingFrequency); |
| 439 | int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 440 | void UpdateDeadOrAliveCounters(bool alive); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 441 | int32_t SendPacketRaw(const void *data, int len, bool RTCP); |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 442 | void UpdatePacketDelay(uint32_t timestamp, |
| 443 | uint16_t sequenceNumber); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 444 | void RegisterReceiveCodecsToRTPModule(); |
| 445 | int ApmProcessRx(AudioFrame& audioFrame); |
| 446 | |
turaj@webrtc.org | 42259e7 | 2012-12-11 02:15:12 +0000 | [diff] [blame] | 447 | int SetRedPayloadType(int red_payload_type); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 448 | private: |
| 449 | CriticalSectionWrapper& _fileCritSect; |
| 450 | CriticalSectionWrapper& _callbackCritSect; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 451 | uint32_t _instanceId; |
| 452 | int32_t _channelId; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 453 | |
| 454 | private: |
stefan@webrtc.org | a5cb98c | 2013-05-29 12:12:51 +0000 | [diff] [blame] | 455 | scoped_ptr<RtpHeaderParser> rtp_header_parser_; |
pwestin@webrtc.org | 2853dde | 2012-05-11 11:08:54 +0000 | [diff] [blame] | 456 | scoped_ptr<RtpRtcp> _rtpRtcpModule; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 457 | AudioCodingModule& _audioCodingModule; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 458 | RtpDump& _rtpDumpIn; |
| 459 | RtpDump& _rtpDumpOut; |
| 460 | private: |
| 461 | AudioLevel _outputAudioLevel; |
| 462 | bool _externalTransport; |
| 463 | AudioFrame _audioFrame; |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 464 | scoped_array<int16_t> mono_recording_audio_; |
| 465 | // Resampler is used when input data is stereo while codec is mono. |
| 466 | PushResampler input_resampler_; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 467 | uint8_t _audioLevel_dBov; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 468 | FilePlayer* _inputFilePlayerPtr; |
| 469 | FilePlayer* _outputFilePlayerPtr; |
| 470 | FileRecorder* _outputFileRecorderPtr; |
xians@google.com | 0b0665a | 2011-08-08 08:18:44 +0000 | [diff] [blame] | 471 | int _inputFilePlayerId; |
| 472 | int _outputFilePlayerId; |
| 473 | int _outputFileRecorderId; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 474 | bool _inputFilePlaying; |
| 475 | bool _outputFilePlaying; |
| 476 | bool _outputFileRecording; |
| 477 | DtmfInbandQueue _inbandDtmfQueue; |
| 478 | DtmfInband _inbandDtmfGenerator; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 479 | bool _inputExternalMedia; |
xians@google.com | 22963ab | 2011-08-03 12:40:23 +0000 | [diff] [blame] | 480 | bool _outputExternalMedia; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 481 | VoEMediaProcess* _inputExternalMediaCallbackPtr; |
| 482 | VoEMediaProcess* _outputExternalMediaCallbackPtr; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 483 | uint8_t* _encryptionRTPBufferPtr; |
| 484 | uint8_t* _decryptionRTPBufferPtr; |
| 485 | uint8_t* _encryptionRTCPBufferPtr; |
| 486 | uint8_t* _decryptionRTCPBufferPtr; |
| 487 | uint32_t _timeStamp; |
| 488 | uint8_t _sendTelephoneEventPayloadType; |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 489 | uint32_t playout_timestamp_rtp_; |
| 490 | uint32_t playout_timestamp_rtcp_; |
| 491 | uint32_t playout_delay_ms_; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 492 | uint32_t _numberOfDiscardedPackets; |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 493 | |
| 494 | private: |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 495 | // uses |
| 496 | Statistics* _engineStatisticsPtr; |
| 497 | OutputMixer* _outputMixerPtr; |
| 498 | TransmitMixer* _transmitMixerPtr; |
| 499 | ProcessThread* _moduleProcessThreadPtr; |
| 500 | AudioDeviceModule* _audioDeviceModulePtr; |
| 501 | VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base |
| 502 | CriticalSectionWrapper* _callbackCritSectPtr; // owned by base |
| 503 | Transport* _transportPtr; // WebRtc socket or external transport |
| 504 | Encryption* _encryptionPtr; // WebRtc SRTP or external encryption |
andrew@webrtc.org | 755b04a | 2011-11-15 16:57:56 +0000 | [diff] [blame] | 505 | scoped_ptr<AudioProcessing> _rtpAudioProc; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 506 | AudioProcessing* _rxAudioProcessingModulePtr; // far end AudioProcessing |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 507 | VoERxVadCallback* _rxVadObserverPtr; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 508 | int32_t _oldVadDecision; |
| 509 | int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 510 | VoERTPObserver* _rtpObserverPtr; |
| 511 | VoERTCPObserver* _rtcpObserverPtr; |
| 512 | private: |
| 513 | // VoEBase |
| 514 | bool _outputIsOnHold; |
| 515 | bool _externalPlayout; |
roosa@google.com | 1b60ceb | 2012-12-12 23:00:29 +0000 | [diff] [blame] | 516 | bool _externalMixing; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 517 | bool _inputIsOnHold; |
| 518 | bool _playing; |
| 519 | bool _sending; |
| 520 | bool _receiving; |
| 521 | bool _mixFileWithMicrophone; |
| 522 | bool _rtpObserver; |
| 523 | bool _rtcpObserver; |
| 524 | // VoEVolumeControl |
| 525 | bool _mute; |
| 526 | float _panLeft; |
| 527 | float _panRight; |
| 528 | float _outputGain; |
| 529 | // VoEEncryption |
| 530 | bool _encrypting; |
| 531 | bool _decrypting; |
| 532 | // VoEDtmf |
| 533 | bool _playOutbandDtmfEvent; |
| 534 | bool _playInbandDtmfEvent; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 535 | // VoeRTP_RTCP |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 536 | uint8_t _extraPayloadType; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 537 | bool _insertExtraRTPPacket; |
| 538 | bool _extraMarkerBit; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 539 | uint32_t _lastLocalTimeStamp; |
roosa@google.com | 0870f02 | 2012-12-12 21:31:41 +0000 | [diff] [blame] | 540 | uint32_t _lastRemoteTimeStamp; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 541 | int8_t _lastPayloadType; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 542 | bool _includeAudioLevelIndication; |
| 543 | // VoENetwork |
| 544 | bool _rtpPacketTimedOut; |
| 545 | bool _rtpPacketTimeOutIsEnabled; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 546 | uint32_t _rtpTimeOutSeconds; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 547 | bool _connectionObserver; |
| 548 | VoEConnectionObserver* _connectionObserverPtr; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 549 | uint32_t _countAliveDetections; |
| 550 | uint32_t _countDeadDetections; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 551 | AudioFrame::SpeechType _outputSpeechType; |
| 552 | // VoEVideoSync |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 553 | uint32_t _average_jitter_buffer_delay_us; |
turaj@webrtc.org | e46c8d3 | 2013-05-22 20:39:43 +0000 | [diff] [blame] | 554 | int least_required_delay_ms_; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 555 | uint32_t _previousTimestamp; |
| 556 | uint16_t _recPacketDelayMs; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 557 | // VoEAudioProcessing |
| 558 | bool _RxVadDetection; |
| 559 | bool _rxApmIsEnabled; |
| 560 | bool _rxAgcIsEnabled; |
| 561 | bool _rxNsIsEnabled; |
| 562 | }; |
| 563 | |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 564 | } // namespace voe |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 565 | |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 566 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 567 | |
| 568 | #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H |