Adding playout buffer status to the voe video sync

Review URL: https://webrtc-codereview.appspot.com/1311004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3835 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pwestin@webrtc.org
2013-04-11 20:23:35 +00:00
parent 9da751715f
commit 1de01354e6
7 changed files with 196 additions and 229 deletions

View File

@ -164,26 +164,29 @@ int VoEVideoSyncImpl::SetInitialPlayoutDelay(int channel, int delay_ms)
return channel_ptr->SetInitialPlayoutDelay(delay_ms);
}
int VoEVideoSyncImpl::GetDelayEstimate(int channel, int& delayMs)
{
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"GetDelayEstimate(channel=%d, delayMs=?)", channel);
IPHONE_NOT_SUPPORTED(_shared->statistics());
int VoEVideoSyncImpl::GetDelayEstimate(int channel,
int* jitter_buffer_delay_ms,
int* playout_buffer_delay_ms) {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"GetDelayEstimate(channel=%d, delayMs=?)", channel);
IPHONE_NOT_SUPPORTED(_shared->statistics());
if (!_shared->statistics().Initialized())
{
_shared->SetLastError(VE_NOT_INITED, kTraceError);
return -1;
}
voe::ScopedChannel sc(_shared->channel_manager(), channel);
voe::Channel* channelPtr = sc.ChannelPtr();
if (channelPtr == NULL)
{
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
"GetDelayEstimate() failed to locate channel");
return -1;
}
return channelPtr->GetDelayEstimate(delayMs);
if (!_shared->statistics().Initialized()) {
_shared->SetLastError(VE_NOT_INITED, kTraceError);
return -1;
}
voe::ScopedChannel sc(_shared->channel_manager(), channel);
voe::Channel* channelPtr = sc.ChannelPtr();
if (channelPtr == NULL) {
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
"GetDelayEstimate() failed to locate channel");
return -1;
}
if (!channelPtr->GetDelayEstimate(jitter_buffer_delay_ms,
playout_buffer_delay_ms)) {
return -1;
}
return 0;
}
int VoEVideoSyncImpl::GetPlayoutBufferSize(int& bufferMs)