diff options
author | pwestin@webrtc.org <pwestin@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-04-11 20:23:35 +0000 |
---|---|---|
committer | pwestin@webrtc.org <pwestin@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-04-11 20:23:35 +0000 |
commit | f2724977323ae0d162fa0b33135046701f3eba66 (patch) | |
tree | 54e44795144c053ad82e517fed248a4701fc87b1 /voice_engine/voe_video_sync_impl.cc | |
parent | 02f158e77885046f5634e8f969496066fa059bed (diff) | |
download | webrtc-f2724977323ae0d162fa0b33135046701f3eba66.tar.gz |
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/webrtc@3835 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/voe_video_sync_impl.cc')
-rw-r--r-- | voice_engine/voe_video_sync_impl.cc | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/voice_engine/voe_video_sync_impl.cc b/voice_engine/voe_video_sync_impl.cc index 4ef1228a..3796c5e0 100644 --- a/voice_engine/voe_video_sync_impl.cc +++ b/voice_engine/voe_video_sync_impl.cc @@ -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()); - - 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); +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; + } + if (!channelPtr->GetDelayEstimate(jitter_buffer_delay_ms, + playout_buffer_delay_ms)) { + return -1; + } + return 0; } int VoEVideoSyncImpl::GetPlayoutBufferSize(int& bufferMs) |