Add API to query video engine for the send-side delay.

R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5225 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_engine/vie_codec_impl.cc b/video_engine/vie_codec_impl.cc
index 364862f..b46eb88 100644
--- a/video_engine/vie_codec_impl.cc
+++ b/video_engine/vie_codec_impl.cc
@@ -738,6 +738,20 @@
   vie_channel->SetTransmissionSmoothingStatus(true);
 }
 
+bool ViECodecImpl::GetSendSideDelay(int video_channel, int* avg_delay_ms,
+                                   int* max_delay_ms) const {
+  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),
+                 "%s: No channel %d", __FUNCTION__, video_channel);
+    shared_data_->SetLastError(kViECodecInvalidChannelId);
+    return false;
+  }
+  return vie_channel->GetSendSideDelay(avg_delay_ms, max_delay_ms);
+}
+
 bool ViECodecImpl::CodecValid(const VideoCodec& video_codec) {
   // Check pl_name matches codec_type.
   if (video_codec.codecType == kVideoCodecRED) {