summaryrefslogtreecommitdiff
path: root/voice_engine/voe_network_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'voice_engine/voe_network_impl.cc')
-rw-r--r--voice_engine/voe_network_impl.cc154
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