summaryrefslogtreecommitdiff
path: root/video_engine/vie_codec_impl.cc
diff options
context:
space:
mode:
authorstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-12-05 14:05:07 +0000
committerstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-12-05 14:05:07 +0000
commitee234be7908840221b78e6489d42ea792d4ce87d (patch)
tree04dcf412882801eda01e1905217152f501c3f8ae /video_engine/vie_codec_impl.cc
parenta4fae33568490c9994f65713c52d0b380210ca99 (diff)
downloadwebrtc-ee234be7908840221b78e6489d42ea792d4ce87d.tar.gz
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
Diffstat (limited to 'video_engine/vie_codec_impl.cc')
-rw-r--r--video_engine/vie_codec_impl.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/video_engine/vie_codec_impl.cc b/video_engine/vie_codec_impl.cc
index 364862fe..b46eb88d 100644
--- a/video_engine/vie_codec_impl.cc
+++ b/video_engine/vie_codec_impl.cc
@@ -738,6 +738,20 @@ void ViECodecImpl::SuspendBelowMinBitrate(int video_channel) {
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) {