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 | |
andrew@webrtc.org | eb524d9 | 2013-09-23 23:02:24 +0000 | [diff] [blame] | 36 | namespace webrtc { |
| 37 | |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 38 | class AudioDeviceModule; |
minyue@webrtc.org | e509f94 | 2013-09-12 17:03:00 +0000 | [diff] [blame] | 39 | class Config; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 40 | class CriticalSectionWrapper; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 41 | class FileWrapper; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 42 | class ProcessThread; |
| 43 | class ReceiveStatistics; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 44 | class RtpDump; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 45 | class RTPPayloadRegistry; |
| 46 | class RtpReceiver; |
| 47 | class RTPReceiverAudio; |
| 48 | class RtpRtcp; |
| 49 | class TelephoneEventHandler; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 50 | class VoEMediaProcess; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 51 | class VoERTCPObserver; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 52 | class VoERTPObserver; |
| 53 | class VoiceEngineObserver; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 54 | |
| 55 | struct CallStatistics; |
henrika@webrtc.org | 8a2fc88 | 2012-08-22 08:53:55 +0000 | [diff] [blame] | 56 | struct ReportBlock; |
| 57 | struct SenderInfo; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 58 | |
andrew@webrtc.org | eb524d9 | 2013-09-23 23:02:24 +0000 | [diff] [blame] | 59 | namespace voe { |
| 60 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 61 | class Statistics; |
sprang@webrtc.org | 54ae4ff | 2013-12-19 13:26:02 +0000 | [diff] [blame] | 62 | class StatisticsProxy; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 63 | class TransmitMixer; |
| 64 | class OutputMixer; |
| 65 | |
| 66 | |
| 67 | class Channel: |
| 68 | public RtpData, |
| 69 | public RtpFeedback, |
| 70 | public RtcpFeedback, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 71 | public FileCallback, // receiving notification from file player & recorder |
| 72 | public Transport, |
| 73 | public RtpAudioFeedback, |
| 74 | public AudioPacketizationCallback, // receive encoded packets from the ACM |
| 75 | public ACMVADCallback, // receive voice activity from the ACM |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 76 | public MixerParticipant // supplies output mixer with audio frames |
| 77 | { |
| 78 | public: |
| 79 | enum {KNumSocketThreads = 1}; |
| 80 | enum {KNumberOfSocketBuffers = 8}; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 81 | virtual ~Channel(); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 82 | static int32_t CreateChannel(Channel*& channel, |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 83 | int32_t channelId, |
minyue@webrtc.org | e509f94 | 2013-09-12 17:03:00 +0000 | [diff] [blame] | 84 | uint32_t instanceId, |
| 85 | const Config& config); |
| 86 | Channel(int32_t channelId, uint32_t instanceId, const Config& config); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 87 | int32_t Init(); |
| 88 | int32_t SetEngineInformation( |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 89 | Statistics& engineStatistics, |
| 90 | OutputMixer& outputMixer, |
| 91 | TransmitMixer& transmitMixer, |
| 92 | ProcessThread& moduleProcessThread, |
| 93 | AudioDeviceModule& audioDeviceModule, |
| 94 | VoiceEngineObserver* voiceEngineObserver, |
| 95 | CriticalSectionWrapper* callbackCritSect); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 96 | int32_t UpdateLocalTimeStamp(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 97 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 98 | // API methods |
| 99 | |
| 100 | // VoEBase |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 101 | int32_t StartPlayout(); |
| 102 | int32_t StopPlayout(); |
| 103 | int32_t StartSend(); |
| 104 | int32_t StopSend(); |
| 105 | int32_t StartReceiving(); |
| 106 | int32_t StopReceiving(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 107 | |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 108 | int32_t SetNetEQPlayoutMode(NetEqModes mode); |
| 109 | int32_t GetNetEQPlayoutMode(NetEqModes& mode); |
| 110 | int32_t SetOnHoldStatus(bool enable, OnHoldModes mode); |
| 111 | int32_t GetOnHoldStatus(bool& enabled, OnHoldModes& mode); |
| 112 | int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); |
| 113 | int32_t DeRegisterVoiceEngineObserver(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 114 | |
| 115 | // VoECodec |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 116 | int32_t GetSendCodec(CodecInst& codec); |
| 117 | int32_t GetRecCodec(CodecInst& codec); |
| 118 | int32_t SetSendCodec(const CodecInst& codec); |
| 119 | int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX); |
| 120 | int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX); |
| 121 | int32_t SetRecPayloadType(const CodecInst& codec); |
| 122 | int32_t GetRecPayloadType(CodecInst& codec); |
| 123 | int32_t SetAMREncFormat(AmrMode mode); |
| 124 | int32_t SetAMRDecFormat(AmrMode mode); |
| 125 | int32_t SetAMRWbEncFormat(AmrMode mode); |
| 126 | int32_t SetAMRWbDecFormat(AmrMode mode); |
| 127 | int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency); |
| 128 | int32_t SetISACInitTargetRate(int rateBps, bool useFixedFrameSize); |
| 129 | int32_t SetISACMaxRate(int rateBps); |
| 130 | int32_t SetISACMaxPayloadSize(int sizeBytes); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 131 | |
turaj@webrtc.org | 42259e7 | 2012-12-11 02:15:12 +0000 | [diff] [blame] | 132 | // VoE dual-streaming. |
| 133 | int SetSecondarySendCodec(const CodecInst& codec, int red_payload_type); |
| 134 | void RemoveSecondarySendCodec(); |
| 135 | int GetSecondarySendCodec(CodecInst* codec); |
| 136 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 137 | // VoENetwork |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 138 | int32_t RegisterExternalTransport(Transport& transport); |
| 139 | int32_t DeRegisterExternalTransport(); |
| 140 | int32_t ReceivedRTPPacket(const int8_t* data, int32_t length); |
| 141 | int32_t ReceivedRTCPPacket(const int8_t* data, int32_t length); |
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); |
wu@webrtc.org | 24301a6 | 2013-12-13 19:17:43 +0000 | [diff] [blame] | 205 | void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 206 | |
| 207 | // VoEVideoSync |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 208 | bool GetDelayEstimate(int* jitter_buffer_delay_ms, |
| 209 | int* playout_buffer_delay_ms) const; |
turaj@webrtc.org | e46c8d3 | 2013-05-22 20:39:43 +0000 | [diff] [blame] | 210 | int least_required_delay_ms() const { return least_required_delay_ms_; } |
turaj@webrtc.org | 6388c3e | 2013-02-12 21:42:18 +0000 | [diff] [blame] | 211 | int SetInitialPlayoutDelay(int delay_ms); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 212 | int SetMinimumPlayoutDelay(int delayMs); |
| 213 | int GetPlayoutTimestamp(unsigned int& timestamp); |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 214 | void UpdatePlayoutTimestamp(bool rtcp); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 215 | int SetInitTimestamp(unsigned int timestamp); |
| 216 | int SetInitSequenceNumber(short sequenceNumber); |
| 217 | |
| 218 | // VoEVideoSyncExtended |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 219 | int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 220 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 221 | // VoEDtmf |
| 222 | int SendTelephoneEventOutband(unsigned char eventCode, int lengthMs, |
| 223 | int attenuationDb, bool playDtmfEvent); |
| 224 | int SendTelephoneEventInband(unsigned char eventCode, int lengthMs, |
| 225 | int attenuationDb, bool playDtmfEvent); |
| 226 | int SetDtmfPlayoutStatus(bool enable); |
| 227 | bool DtmfPlayoutStatus() const; |
| 228 | int SetSendTelephoneEventPayloadType(unsigned char type); |
| 229 | int GetSendTelephoneEventPayloadType(unsigned char& type); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 230 | |
| 231 | // VoEAudioProcessingImpl |
| 232 | int UpdateRxVadDetection(AudioFrame& audioFrame); |
| 233 | int RegisterRxVadObserver(VoERxVadCallback &observer); |
| 234 | int DeRegisterRxVadObserver(); |
| 235 | int VoiceActivityIndicator(int &activity); |
| 236 | #ifdef WEBRTC_VOICE_ENGINE_AGC |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 237 | int SetRxAgcStatus(bool enable, AgcModes mode); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 238 | int GetRxAgcStatus(bool& enabled, AgcModes& mode); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 239 | int SetRxAgcConfig(AgcConfig config); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 240 | int GetRxAgcConfig(AgcConfig& config); |
| 241 | #endif |
| 242 | #ifdef WEBRTC_VOICE_ENGINE_NR |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 243 | int SetRxNsStatus(bool enable, NsModes mode); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 244 | int GetRxNsStatus(bool& enabled, NsModes& mode); |
| 245 | #endif |
| 246 | |
| 247 | // VoERTP_RTCP |
| 248 | int RegisterRTPObserver(VoERTPObserver& observer); |
| 249 | int DeRegisterRTPObserver(); |
| 250 | int RegisterRTCPObserver(VoERTCPObserver& observer); |
| 251 | int DeRegisterRTCPObserver(); |
| 252 | int SetLocalSSRC(unsigned int ssrc); |
| 253 | int GetLocalSSRC(unsigned int& ssrc); |
| 254 | int GetRemoteSSRC(unsigned int& ssrc); |
| 255 | int GetRemoteCSRCs(unsigned int arrCSRC[15]); |
| 256 | int SetRTPAudioLevelIndicationStatus(bool enable, unsigned char ID); |
| 257 | int GetRTPAudioLevelIndicationStatus(bool& enable, unsigned char& ID); |
| 258 | int SetRTCPStatus(bool enable); |
| 259 | int GetRTCPStatus(bool& enabled); |
| 260 | int SetRTCP_CNAME(const char cName[256]); |
| 261 | int GetRTCP_CNAME(char cName[256]); |
| 262 | int GetRemoteRTCP_CNAME(char cName[256]); |
| 263 | int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow, |
| 264 | unsigned int& timestamp, |
| 265 | unsigned int& playoutTimestamp, unsigned int* jitter, |
| 266 | unsigned short* fractionLost); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 267 | int SendApplicationDefinedRTCPPacket(unsigned char subType, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 268 | unsigned int name, const char* data, |
| 269 | unsigned short dataLengthInBytes); |
| 270 | int GetRTPStatistics(unsigned int& averageJitterMs, |
| 271 | unsigned int& maxJitterMs, |
| 272 | unsigned int& discardedPackets); |
henrika@webrtc.org | 8a2fc88 | 2012-08-22 08:53:55 +0000 | [diff] [blame] | 273 | int GetRemoteRTCPSenderInfo(SenderInfo* sender_info); |
| 274 | int GetRemoteRTCPReportBlocks(std::vector<ReportBlock>* report_blocks); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 275 | int GetRTPStatistics(CallStatistics& stats); |
| 276 | int SetFECStatus(bool enable, int redPayloadtype); |
| 277 | int GetFECStatus(bool& enabled, int& redPayloadtype); |
pwestin@webrtc.org | db24995 | 2013-06-05 15:33:20 +0000 | [diff] [blame] | 278 | void SetNACKStatus(bool enable, int maxNumberOfPackets); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 279 | int StartRTPDump(const char fileNameUTF8[1024], RTPDirections direction); |
| 280 | int StopRTPDump(RTPDirections direction); |
| 281 | bool RTPDumpIsActive(RTPDirections direction); |
roosa@google.com | 0870f02 | 2012-12-12 21:31:41 +0000 | [diff] [blame] | 282 | uint32_t LastRemoteTimeStamp() { return _lastRemoteTimeStamp; } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 283 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 284 | // From AudioPacketizationCallback in the ACM |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 285 | int32_t SendData(FrameType frameType, |
| 286 | uint8_t payloadType, |
| 287 | uint32_t timeStamp, |
| 288 | const uint8_t* payloadData, |
| 289 | uint16_t payloadSize, |
| 290 | const RTPFragmentationHeader* fragmentation); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 291 | // From ACMVADCallback in the ACM |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 292 | int32_t InFrameType(int16_t frameType); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 293 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 294 | int32_t OnRxVadDetected(int vadDecision); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 295 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 296 | // From RtpData in the RTP/RTCP module |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 297 | int32_t OnReceivedPayloadData(const uint8_t* payloadData, |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 298 | uint16_t payloadSize, |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 299 | const WebRtcRTPHeader* rtpHeader); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 300 | |
stefan@webrtc.org | 7bb8f02 | 2013-09-06 13:40:11 +0000 | [diff] [blame] | 301 | bool OnRecoveredPacket(const uint8_t* packet, int packet_length); |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 302 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 303 | // From RtpFeedback in the RTP/RTCP module |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 304 | int32_t OnInitializeDecoder( |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 305 | int32_t id, |
| 306 | int8_t payloadType, |
leozwang@webrtc.org | 813e4b0 | 2012-03-01 18:34:25 +0000 | [diff] [blame] | 307 | const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 308 | int frequency, |
| 309 | uint8_t channels, |
| 310 | uint32_t rate); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 311 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 312 | void OnPacketTimeout(int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 313 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 314 | void OnReceivedPacket(int32_t id, RtpRtcpPacketType packetType); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 315 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 316 | void OnPeriodicDeadOrAlive(int32_t id, |
| 317 | RTPAliveType alive); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 318 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 319 | void OnIncomingSSRCChanged(int32_t id, |
stefan@webrtc.org | 286fe0b | 2013-08-21 20:58:21 +0000 | [diff] [blame] | 320 | uint32_t ssrc); |
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 OnIncomingCSRCChanged(int32_t id, |
| 323 | uint32_t CSRC, bool added); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 324 | |
stefan@webrtc.org | 286fe0b | 2013-08-21 20:58:21 +0000 | [diff] [blame] | 325 | void ResetStatistics(uint32_t ssrc); |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 326 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 327 | // From RtcpFeedback in the RTP/RTCP module |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 328 | void OnApplicationDataReceived(int32_t id, |
| 329 | uint8_t subType, |
| 330 | uint32_t name, |
| 331 | uint16_t length, |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 332 | const uint8_t* data); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 333 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 334 | // From RtpAudioFeedback in the RTP/RTCP module |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 335 | void OnReceivedTelephoneEvent(int32_t id, |
| 336 | uint8_t event, |
| 337 | bool endOfEvent); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 338 | |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 339 | void OnPlayTelephoneEvent(int32_t id, |
| 340 | uint8_t event, |
| 341 | uint16_t lengthMs, |
| 342 | uint8_t volume); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 343 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 344 | // From Transport (called by the RTP/RTCP module) |
| 345 | int SendPacket(int /*channel*/, const void *data, int len); |
| 346 | int SendRTCPPacket(int /*channel*/, const void *data, int len); |
| 347 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 348 | // From MixerParticipant |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 349 | int32_t GetAudioFrame(int32_t id, AudioFrame& audioFrame); |
| 350 | int32_t NeededFrequency(int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 351 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 352 | // From MonitorObserver |
| 353 | void OnPeriodicProcess(); |
| 354 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 355 | // From FileCallback |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 356 | void PlayNotification(int32_t id, |
| 357 | uint32_t durationMs); |
| 358 | void RecordNotification(int32_t id, |
| 359 | uint32_t durationMs); |
| 360 | void PlayFileEnded(int32_t id); |
| 361 | void RecordFileEnded(int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 362 | |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 363 | uint32_t InstanceId() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 364 | { |
| 365 | return _instanceId; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 366 | } |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 367 | int32_t ChannelId() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 368 | { |
| 369 | return _channelId; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 370 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 371 | bool Playing() const |
| 372 | { |
| 373 | return _playing; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 374 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 375 | bool Sending() const |
| 376 | { |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 377 | // A lock is needed because |_sending| is accessed by both |
| 378 | // TransmitMixer::PrepareDemux() and StartSend()/StopSend(), which |
| 379 | // are called by different threads. |
mflodman@webrtc.org | 9a065d1 | 2012-03-07 08:12:21 +0000 | [diff] [blame] | 380 | CriticalSectionScoped cs(&_callbackCritSect); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 381 | return _sending; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 382 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 383 | bool Receiving() const |
| 384 | { |
| 385 | return _receiving; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 386 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 387 | bool ExternalTransport() const |
| 388 | { |
| 389 | return _externalTransport; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 390 | } |
roosa@google.com | 1b60ceb | 2012-12-12 23:00:29 +0000 | [diff] [blame] | 391 | bool ExternalMixing() const |
| 392 | { |
| 393 | return _externalMixing; |
| 394 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 395 | bool OutputIsOnHold() const |
| 396 | { |
| 397 | return _outputIsOnHold; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 398 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 399 | bool InputIsOnHold() const |
| 400 | { |
| 401 | return _inputIsOnHold; |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 402 | } |
andrew@webrtc.org | f81f9f8 | 2011-08-19 22:56:22 +0000 | [diff] [blame] | 403 | RtpRtcp* RtpRtcpModulePtr() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 404 | { |
pwestin@webrtc.org | 2853dde | 2012-05-11 11:08:54 +0000 | [diff] [blame] | 405 | return _rtpRtcpModule.get(); |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 406 | } |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 407 | int8_t OutputEnergyLevel() const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 408 | { |
| 409 | return _outputAudioLevel.Level(); |
xians@webrtc.org | e07247a | 2011-11-28 16:31:28 +0000 | [diff] [blame] | 410 | } |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 411 | uint32_t Demultiplex(const AudioFrame& audioFrame); |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 412 | // Demultiplex the data to the channel's |_audioFrame|. The difference |
| 413 | // between this method and the overloaded method above is that |audio_data| |
| 414 | // does not go through transmit_mixer and APM. |
| 415 | void Demultiplex(const int16_t* audio_data, |
xians@webrtc.org | 8fff1f0 | 2013-07-31 16:27:42 +0000 | [diff] [blame] | 416 | int sample_rate, |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 417 | int number_of_frames, |
xians@webrtc.org | 8fff1f0 | 2013-07-31 16:27:42 +0000 | [diff] [blame] | 418 | int number_of_channels); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 419 | uint32_t PrepareEncodeAndSend(int mixingFrequency); |
| 420 | uint32_t EncodeAndSend(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 421 | |
| 422 | private: |
stefan@webrtc.org | 7bb8f02 | 2013-09-06 13:40:11 +0000 | [diff] [blame] | 423 | bool ReceivePacket(const uint8_t* packet, int packet_length, |
| 424 | const RTPHeader& header, bool in_order); |
| 425 | bool HandleEncapsulation(const uint8_t* packet, |
| 426 | int packet_length, |
| 427 | const RTPHeader& header); |
| 428 | bool IsPacketInOrder(const RTPHeader& header) const; |
stefan@webrtc.org | 48df381 | 2013-11-08 15:18:52 +0000 | [diff] [blame] | 429 | bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; |
andrew@webrtc.org | da71044 | 2013-06-07 01:43:12 +0000 | [diff] [blame] | 430 | int ResendPackets(const uint16_t* sequence_numbers, int length); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 431 | int InsertInbandDtmfTone(); |
pbos@webrtc.org | 9213521 | 2013-05-14 08:31:39 +0000 | [diff] [blame] | 432 | int32_t MixOrReplaceAudioWithFile(int mixingFrequency); |
| 433 | int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 434 | void UpdateDeadOrAliveCounters(bool alive); |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 435 | int32_t SendPacketRaw(const void *data, int len, bool RTCP); |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 436 | void UpdatePacketDelay(uint32_t timestamp, |
| 437 | uint16_t sequenceNumber); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 438 | void RegisterReceiveCodecsToRTPModule(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 439 | |
turaj@webrtc.org | 42259e7 | 2012-12-11 02:15:12 +0000 | [diff] [blame] | 440 | int SetRedPayloadType(int red_payload_type); |
andrew@webrtc.org | eb524d9 | 2013-09-23 23:02:24 +0000 | [diff] [blame] | 441 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 442 | CriticalSectionWrapper& _fileCritSect; |
| 443 | CriticalSectionWrapper& _callbackCritSect; |
wu@webrtc.org | 6342066 | 2013-10-17 18:28:55 +0000 | [diff] [blame] | 444 | CriticalSectionWrapper& volume_settings_critsect_; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 445 | uint32_t _instanceId; |
| 446 | int32_t _channelId; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 447 | |
stefan@webrtc.org | a5cb98c | 2013-05-29 12:12:51 +0000 | [diff] [blame] | 448 | scoped_ptr<RtpHeaderParser> rtp_header_parser_; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 449 | scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
| 450 | scoped_ptr<ReceiveStatistics> rtp_receive_statistics_; |
sprang@webrtc.org | 54ae4ff | 2013-12-19 13:26:02 +0000 | [diff] [blame] | 451 | scoped_ptr<StatisticsProxy> statistics_proxy_; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 452 | scoped_ptr<RtpReceiver> rtp_receiver_; |
| 453 | TelephoneEventHandler* telephone_event_handler_; |
pwestin@webrtc.org | 2853dde | 2012-05-11 11:08:54 +0000 | [diff] [blame] | 454 | scoped_ptr<RtpRtcp> _rtpRtcpModule; |
andrew@webrtc.org | eb524d9 | 2013-09-23 23:02:24 +0000 | [diff] [blame] | 455 | scoped_ptr<AudioCodingModule> audio_coding_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 456 | RtpDump& _rtpDumpIn; |
| 457 | RtpDump& _rtpDumpOut; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 458 | AudioLevel _outputAudioLevel; |
| 459 | bool _externalTransport; |
| 460 | AudioFrame _audioFrame; |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 461 | scoped_array<int16_t> mono_recording_audio_; |
| 462 | // Resampler is used when input data is stereo while codec is mono. |
| 463 | PushResampler input_resampler_; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 464 | uint8_t _audioLevel_dBov; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 465 | FilePlayer* _inputFilePlayerPtr; |
| 466 | FilePlayer* _outputFilePlayerPtr; |
| 467 | FileRecorder* _outputFileRecorderPtr; |
xians@google.com | 0b0665a | 2011-08-08 08:18:44 +0000 | [diff] [blame] | 468 | int _inputFilePlayerId; |
| 469 | int _outputFilePlayerId; |
| 470 | int _outputFileRecorderId; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 471 | bool _inputFilePlaying; |
| 472 | bool _outputFilePlaying; |
| 473 | bool _outputFileRecording; |
| 474 | DtmfInbandQueue _inbandDtmfQueue; |
| 475 | DtmfInband _inbandDtmfGenerator; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 476 | bool _inputExternalMedia; |
xians@google.com | 22963ab | 2011-08-03 12:40:23 +0000 | [diff] [blame] | 477 | bool _outputExternalMedia; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 478 | VoEMediaProcess* _inputExternalMediaCallbackPtr; |
| 479 | VoEMediaProcess* _outputExternalMediaCallbackPtr; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 480 | uint32_t _timeStamp; |
| 481 | uint8_t _sendTelephoneEventPayloadType; |
turaj@webrtc.org | 167b6df | 2013-12-13 21:05:07 +0000 | [diff] [blame] | 482 | |
| 483 | // Timestamp of the audio pulled from NetEq. |
| 484 | uint32_t jitter_buffer_playout_timestamp_; |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 485 | uint32_t playout_timestamp_rtp_; |
| 486 | uint32_t playout_timestamp_rtcp_; |
| 487 | uint32_t playout_delay_ms_; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 488 | uint32_t _numberOfDiscardedPackets; |
xians@webrtc.org | 09e8c47 | 2013-07-31 16:30:19 +0000 | [diff] [blame] | 489 | uint16_t send_sequence_number_; |
stefan@webrtc.org | 7bb8f02 | 2013-09-06 13:40:11 +0000 | [diff] [blame] | 490 | uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes]; |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 491 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 492 | // uses |
| 493 | Statistics* _engineStatisticsPtr; |
| 494 | OutputMixer* _outputMixerPtr; |
| 495 | TransmitMixer* _transmitMixerPtr; |
| 496 | ProcessThread* _moduleProcessThreadPtr; |
| 497 | AudioDeviceModule* _audioDeviceModulePtr; |
| 498 | VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base |
| 499 | CriticalSectionWrapper* _callbackCritSectPtr; // owned by base |
| 500 | Transport* _transportPtr; // WebRtc socket or external transport |
andrew@webrtc.org | f3930e9 | 2013-09-18 22:37:32 +0000 | [diff] [blame] | 501 | scoped_ptr<AudioProcessing> rtp_audioproc_; |
| 502 | scoped_ptr<AudioProcessing> rx_audioproc_; // far end AudioProcessing |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 503 | VoERxVadCallback* _rxVadObserverPtr; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 504 | int32_t _oldVadDecision; |
| 505 | int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 506 | VoERTPObserver* _rtpObserverPtr; |
| 507 | VoERTCPObserver* _rtcpObserverPtr; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 508 | // VoEBase |
| 509 | bool _outputIsOnHold; |
| 510 | bool _externalPlayout; |
roosa@google.com | 1b60ceb | 2012-12-12 23:00:29 +0000 | [diff] [blame] | 511 | bool _externalMixing; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 512 | bool _inputIsOnHold; |
| 513 | bool _playing; |
| 514 | bool _sending; |
| 515 | bool _receiving; |
| 516 | bool _mixFileWithMicrophone; |
| 517 | bool _rtpObserver; |
| 518 | bool _rtcpObserver; |
| 519 | // VoEVolumeControl |
| 520 | bool _mute; |
| 521 | float _panLeft; |
| 522 | float _panRight; |
| 523 | float _outputGain; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 524 | // VoEDtmf |
| 525 | bool _playOutbandDtmfEvent; |
| 526 | bool _playInbandDtmfEvent; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 527 | // VoeRTP_RTCP |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 528 | uint32_t _lastLocalTimeStamp; |
roosa@google.com | 0870f02 | 2012-12-12 21:31:41 +0000 | [diff] [blame] | 529 | uint32_t _lastRemoteTimeStamp; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 530 | int8_t _lastPayloadType; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 531 | bool _includeAudioLevelIndication; |
| 532 | // VoENetwork |
| 533 | bool _rtpPacketTimedOut; |
| 534 | bool _rtpPacketTimeOutIsEnabled; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 535 | uint32_t _rtpTimeOutSeconds; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 536 | bool _connectionObserver; |
| 537 | VoEConnectionObserver* _connectionObserverPtr; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 538 | uint32_t _countAliveDetections; |
| 539 | uint32_t _countDeadDetections; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 540 | AudioFrame::SpeechType _outputSpeechType; |
| 541 | // VoEVideoSync |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 542 | uint32_t _average_jitter_buffer_delay_us; |
turaj@webrtc.org | e46c8d3 | 2013-05-22 20:39:43 +0000 | [diff] [blame] | 543 | int least_required_delay_ms_; |
pbos@webrtc.org | 6141e13 | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 544 | uint32_t _previousTimestamp; |
| 545 | uint16_t _recPacketDelayMs; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 546 | // VoEAudioProcessing |
| 547 | bool _RxVadDetection; |
| 548 | bool _rxApmIsEnabled; |
| 549 | bool _rxAgcIsEnabled; |
| 550 | bool _rxNsIsEnabled; |
stefan@webrtc.org | 7bb8f02 | 2013-09-06 13:40:11 +0000 | [diff] [blame] | 551 | bool restored_packet_in_use_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 552 | }; |
| 553 | |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 554 | } // namespace voe |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 555 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 556 | |
| 557 | #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H |