diff options
Diffstat (limited to 'voice_engine/voe_video_sync_impl.cc')
-rw-r--r-- | voice_engine/voe_video_sync_impl.cc | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/voice_engine/voe_video_sync_impl.cc b/voice_engine/voe_video_sync_impl.cc index 2a7ff7d8..b0910c31 100644 --- a/voice_engine/voe_video_sync_impl.cc +++ b/voice_engine/voe_video_sync_impl.cc @@ -10,11 +10,11 @@ #include "voe_video_sync_impl.h" -#include "channel.h" -#include "critical_section_wrapper.h" -#include "trace.h" -#include "voe_errors.h" -#include "voice_engine_impl.h" +#include "webrtc/system_wrappers/interface/critical_section_wrapper.h" +#include "webrtc/system_wrappers/interface/trace.h" +#include "webrtc/voice_engine/channel.h" +#include "webrtc/voice_engine/include/voe_errors.h" +#include "webrtc/voice_engine/voice_engine_impl.h" namespace webrtc { @@ -144,6 +144,30 @@ int VoEVideoSyncImpl::SetMinimumPlayoutDelay(int channel,int delayMs) return channelPtr->SetMinimumPlayoutDelay(delayMs); } +int VoEVideoSyncImpl::SetInitialPlayoutDelay(int channel, int delay_ms) +{ + WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), + "SetInitialPlayoutDelay(channel=%d, delay_ms=%d)", + channel, delay_ms); + ANDROID_NOT_SUPPORTED(_shared->statistics()); + 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* channel_ptr = sc.ChannelPtr(); + if (channel_ptr == NULL) + { + _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, + "SetInitialPlayoutDelay() failed to locate channel"); + return -1; + } + return channel_ptr->SetInitialPlayoutDelay(delay_ms); +} + int VoEVideoSyncImpl::GetDelayEstimate(int channel, int& delayMs) { WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |