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@4556 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
wu@webrtc.org
2013-08-15 23:38:54 +00:00
parent dde7d4c6ed
commit 822fbd8b68
108 changed files with 2926 additions and 4301 deletions

View File

@ -196,99 +196,4 @@ int ViENetworkImpl::SetMTU(int video_channel, unsigned int mtu) {
}
return 0;
}
int ViENetworkImpl::SetPacketTimeoutNotification(const int video_channel,
bool enable,
int timeout_seconds) {
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"%s(channel: %d, enable: %d, timeout_seconds: %u)",
__FUNCTION__, video_channel, enable, timeout_seconds);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
WEBRTC_TRACE(kTraceError, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"Channel doesn't exist");
shared_data_->SetLastError(kViENetworkInvalidChannelId);
return -1;
}
if (vie_channel->SetPacketTimeoutNotification(enable,
timeout_seconds) != 0) {
shared_data_->SetLastError(kViENetworkUnknownError);
return -1;
}
return 0;
}
int ViENetworkImpl::RegisterObserver(const int video_channel,
ViENetworkObserver& observer) {
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"%s(channel: %d)", __FUNCTION__, video_channel);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
WEBRTC_TRACE(kTraceError, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"Channel doesn't exist");
shared_data_->SetLastError(kViENetworkInvalidChannelId);
return -1;
}
if (vie_channel->RegisterNetworkObserver(&observer) != 0) {
shared_data_->SetLastError(kViENetworkObserverAlreadyRegistered);
return -1;
}
return 0;
}
int ViENetworkImpl::DeregisterObserver(const int video_channel) {
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"%s(channel: %d)", __FUNCTION__, video_channel);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
WEBRTC_TRACE(kTraceError, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"Channel doesn't exist");
shared_data_->SetLastError(kViENetworkInvalidChannelId);
return -1;
}
if (!vie_channel->NetworkObserverRegistered()) {
shared_data_->SetLastError(kViENetworkObserverNotRegistered);
return -1;
}
return vie_channel->RegisterNetworkObserver(NULL);
}
int ViENetworkImpl::SetPeriodicDeadOrAliveStatus(
const int video_channel,
bool enable,
unsigned int sample_time_seconds) {
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"%s(channel: %d, enable: %d, sample_time_seconds: %ul)",
__FUNCTION__, video_channel, enable, sample_time_seconds);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
WEBRTC_TRACE(kTraceError, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"Channel doesn't exist");
shared_data_->SetLastError(kViENetworkInvalidChannelId);
return -1;
}
if (!vie_channel->NetworkObserverRegistered()) {
shared_data_->SetLastError(kViENetworkObserverNotRegistered);
return -1;
}
if (vie_channel->SetPeriodicDeadOrAliveStatus(enable, sample_time_seconds)
!= 0) {
shared_data_->SetLastError(kViENetworkUnknownError);
return -1;
}
return 0;
}
} // namespace webrtc