diff options
author | wu@webrtc.org <wu@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-08-15 23:38:54 +0000 |
---|---|---|
committer | wu@webrtc.org <wu@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-08-15 23:38:54 +0000 |
commit | 7fc75bbb65cc1cd99fdf45d9fce44bcce1396dfa (patch) | |
tree | 604dea40012e66f2a2b22d3637de4ee97d0cb325 /voice_engine/voe_network_impl.cc | |
parent | 1e817c3d470262a8dc0d7f151feb0519a65e0d26 (diff) | |
download | webrtc-7fc75bbb65cc1cd99fdf45d9fce44bcce1396dfa.tar.gz |
Update talk to 50918584.
Together with Stefan's http://review.webrtc.org/1960004/.
R=mallinath@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2048004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4556 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/voe_network_impl.cc')
-rw-r--r-- | voice_engine/voe_network_impl.cc | 154 |
1 files changed, 0 insertions, 154 deletions
diff --git a/voice_engine/voe_network_impl.cc b/voice_engine/voe_network_impl.cc index 615fd6a0..0f4d5c28 100644 --- a/voice_engine/voe_network_impl.cc +++ b/voice_engine/voe_network_impl.cc @@ -165,158 +165,4 @@ int VoENetworkImpl::ReceivedRTCPPacket(int channel, const void* data, } return channelPtr->ReceivedRTCPPacket((const int8_t*) data, length); } - -int VoENetworkImpl::SetPacketTimeoutNotification(int channel, - bool enable, - int timeoutSeconds) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "SetPacketTimeoutNotification(channel=%d, enable=%d, " - "timeoutSeconds=%d)", - channel, (int) enable, timeoutSeconds); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - if (enable && - ((timeoutSeconds < kVoiceEngineMinPacketTimeoutSec) || - (timeoutSeconds > kVoiceEngineMaxPacketTimeoutSec))) - { - _shared->SetLastError(VE_INVALID_ARGUMENT, kTraceError, - "SetPacketTimeoutNotification() invalid timeout size"); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "SetPacketTimeoutNotification() failed to locate channel"); - return -1; - } - return channelPtr->SetPacketTimeoutNotification(enable, timeoutSeconds); -} - -int VoENetworkImpl::GetPacketTimeoutNotification(int channel, - bool& enabled, - int& timeoutSeconds) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "GetPacketTimeoutNotification(channel=%d, enabled=?," - " timeoutSeconds=?)", channel); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "GetPacketTimeoutNotification() failed to locate channel"); - return -1; - } - return channelPtr->GetPacketTimeoutNotification(enabled, timeoutSeconds); -} - -int VoENetworkImpl::RegisterDeadOrAliveObserver(int channel, - VoEConnectionObserver& - observer) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "RegisterDeadOrAliveObserver(channel=%d, observer=0x%x)", - channel, &observer); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "RegisterDeadOrAliveObserver() failed to locate channel"); - return -1; - } - return channelPtr->RegisterDeadOrAliveObserver(observer); -} - -int VoENetworkImpl::DeRegisterDeadOrAliveObserver(int channel) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "DeRegisterDeadOrAliveObserver(channel=%d)", channel); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "DeRegisterDeadOrAliveObserver() failed to locate channel"); - return -1; - } - return channelPtr->DeRegisterDeadOrAliveObserver(); -} - -int VoENetworkImpl::SetPeriodicDeadOrAliveStatus(int channel, bool enable, - int sampleTimeSeconds) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "SetPeriodicDeadOrAliveStatus(channel=%d, enable=%d," - " sampleTimeSeconds=%d)", - channel, enable, sampleTimeSeconds); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - if (enable && - ((sampleTimeSeconds < kVoiceEngineMinSampleTimeSec) || - (sampleTimeSeconds > kVoiceEngineMaxSampleTimeSec))) - { - _shared->SetLastError(VE_INVALID_ARGUMENT, kTraceError, - "SetPeriodicDeadOrAliveStatus() invalid sample time"); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "SetPeriodicDeadOrAliveStatus() failed to locate channel"); - return -1; - } - return channelPtr->SetPeriodicDeadOrAliveStatus(enable, sampleTimeSeconds); -} - -int VoENetworkImpl::GetPeriodicDeadOrAliveStatus(int channel, - bool& enabled, - int& sampleTimeSeconds) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "GetPeriodicDeadOrAliveStatus(channel=%d, enabled=?," - " sampleTimeSeconds=?)", channel); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "GetPeriodicDeadOrAliveStatus() failed to locate channel"); - return -1; - } - return channelPtr->GetPeriodicDeadOrAliveStatus(enabled, - sampleTimeSeconds); -} - } // namespace webrtc |