summaryrefslogtreecommitdiff
path: root/voice_engine/channel.cc
diff options
context:
space:
mode:
authorxians@webrtc.org <xians@webrtc.org>2014-10-10 09:42:53 +0000
committerxians@webrtc.org <xians@webrtc.org>2014-10-10 09:42:53 +0000
commitc10bfea744f698e84b1cef5401cb6d060b7835e8 (patch)
tree8ceb747c13043341d25c0a4fe866b49e7d61a500 /voice_engine/channel.cc
parentfd0ab51014388074e640e051001b35f01284213d (diff)
downloadwebrtc-c10bfea744f698e84b1cef5401cb6d060b7835e8.tar.gz
Mark all virtual overrides in the hierarchy of Transport as virtual + OVERRIDE.
This also marks all virtual overrides of other classes in the same files. This will make a subsequent change I intend to do safer, where I'll change the argument types of the base Transport functions, by breaking the compile if I miss any overrides. This also highlighted a number of unused functions. I've removed some of these. TBR=mflodman@webrtc.org, pkasting@chromium.org BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/28709004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@7421 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/channel.cc')
-rw-r--r--voice_engine/channel.cc117
1 files changed, 0 insertions, 117 deletions
diff --git a/voice_engine/channel.cc b/voice_engine/channel.cc
index c52fd984..58e0055d 100644
--- a/voice_engine/channel.cc
+++ b/voice_engine/channel.cc
@@ -395,116 +395,6 @@ Channel::OnInitializeDecoder(
return 0;
}
-void
-Channel::OnPacketTimeout(int32_t id)
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
- "Channel::OnPacketTimeout(id=%d)", id);
-
- CriticalSectionScoped cs(_callbackCritSectPtr);
- if (_voiceEngineObserverPtr)
- {
- if (channel_state_.Get().receiving || _externalTransport)
- {
- int32_t channel = VoEChannelId(id);
- assert(channel == _channelId);
- // Ensure that next OnReceivedPacket() callback will trigger
- // a VE_PACKET_RECEIPT_RESTARTED callback.
- _rtpPacketTimedOut = true;
- // Deliver callback to the observer
- WEBRTC_TRACE(kTraceInfo, kTraceVoice,
- VoEId(_instanceId,_channelId),
- "Channel::OnPacketTimeout() => "
- "CallbackOnError(VE_RECEIVE_PACKET_TIMEOUT)");
- _voiceEngineObserverPtr->CallbackOnError(channel,
- VE_RECEIVE_PACKET_TIMEOUT);
- }
- }
-}
-
-void
-Channel::OnReceivedPacket(int32_t id,
- RtpRtcpPacketType packetType)
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
- "Channel::OnReceivedPacket(id=%d, packetType=%d)",
- id, packetType);
-
- assert(VoEChannelId(id) == _channelId);
-
- // Notify only for the case when we have restarted an RTP session.
- if (_rtpPacketTimedOut && (kPacketRtp == packetType))
- {
- CriticalSectionScoped cs(_callbackCritSectPtr);
- if (_voiceEngineObserverPtr)
- {
- int32_t channel = VoEChannelId(id);
- assert(channel == _channelId);
- // Reset timeout mechanism
- _rtpPacketTimedOut = false;
- // Deliver callback to the observer
- WEBRTC_TRACE(kTraceInfo, kTraceVoice,
- VoEId(_instanceId,_channelId),
- "Channel::OnPacketTimeout() =>"
- " CallbackOnError(VE_PACKET_RECEIPT_RESTARTED)");
- _voiceEngineObserverPtr->CallbackOnError(
- channel,
- VE_PACKET_RECEIPT_RESTARTED);
- }
- }
-}
-
-void
-Channel::OnPeriodicDeadOrAlive(int32_t id,
- RTPAliveType alive)
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
- "Channel::OnPeriodicDeadOrAlive(id=%d, alive=%d)", id, alive);
-
- {
- CriticalSectionScoped cs(&_callbackCritSect);
- if (!_connectionObserver)
- return;
- }
-
- int32_t channel = VoEChannelId(id);
- assert(channel == _channelId);
-
- // Use Alive as default to limit risk of false Dead detections
- bool isAlive(true);
-
- // Always mark the connection as Dead when the module reports kRtpDead
- if (kRtpDead == alive)
- {
- isAlive = false;
- }
-
- // It is possible that the connection is alive even if no RTP packet has
- // been received for a long time since the other side might use VAD/DTX
- // and a low SID-packet update rate.
- if ((kRtpNoRtp == alive) && channel_state_.Get().playing)
- {
- // Detect Alive for all NetEQ states except for the case when we are
- // in PLC_CNG state.
- // PLC_CNG <=> background noise only due to long expand or error.
- // Note that, the case where the other side stops sending during CNG
- // state will be detected as Alive. Dead is is not set until after
- // missing RTCP packets for at least twelve seconds (handled
- // internally by the RTP/RTCP module).
- isAlive = (_outputSpeechType != AudioFrame::kPLCCNG);
- }
-
- // Send callback to the registered observer
- if (_connectionObserver)
- {
- CriticalSectionScoped cs(&_callbackCritSect);
- if (_connectionObserverPtr)
- {
- _connectionObserverPtr->OnPeriodicDeadOrAlive(channel, isAlive);
- }
- }
-}
-
int32_t
Channel::OnReceivedPayloadData(const uint8_t* payloadData,
uint16_t payloadSize,
@@ -862,7 +752,6 @@ Channel::Channel(int32_t channelId,
_rtpDumpOut(*RtpDump::CreateRtpDump()),
_outputAudioLevel(),
_externalTransport(false),
- _audioLevel_dBov(0),
_inputFilePlayerPtr(NULL),
_outputFilePlayerPtr(NULL),
_outputFileRecorderPtr(NULL),
@@ -902,7 +791,6 @@ Channel::Channel(int32_t channelId,
_oldVadDecision(-1),
_sendFrameType(0),
_rtcpObserverPtr(NULL),
- _externalPlayout(false),
_externalMixing(false),
_mixFileWithMicrophone(false),
_rtcpObserver(false),
@@ -915,11 +803,6 @@ Channel::Channel(int32_t channelId,
_lastLocalTimeStamp(0),
_lastPayloadType(0),
_includeAudioLevelIndication(false),
- _rtpPacketTimedOut(false),
- _rtpPacketTimeOutIsEnabled(false),
- _rtpTimeOutSeconds(0),
- _connectionObserver(false),
- _connectionObserverPtr(NULL),
_outputSpeechType(AudioFrame::kNormalSpeech),
vie_network_(NULL),
video_channel_(-1),