summaryrefslogtreecommitdiff
path: root/video_engine/vie_rtp_rtcp_impl.cc
diff options
context:
space:
mode:
authorjiayl@webrtc.org <jiayl@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-27 22:32:40 +0000
committerjiayl@webrtc.org <jiayl@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-27 22:32:40 +0000
commit55a2a27d1a1aa9bf8401312a0b31250af4e3bd11 (patch)
tree10e31d44e5a34d6cba8c00928a089a414072e623 /video_engine/vie_rtp_rtcp_impl.cc
parenta1a60018a1f1ec863451ad0ed4eae58239882920 (diff)
downloadwebrtc-55a2a27d1a1aa9bf8401312a0b31250af4e3bd11.tar.gz
Adds APIs for reporting pacer queuing delay.
BUG=2775 R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/8959005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5621 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/vie_rtp_rtcp_impl.cc')
-rw-r--r--video_engine/vie_rtp_rtcp_impl.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/video_engine/vie_rtp_rtcp_impl.cc b/video_engine/vie_rtp_rtcp_impl.cc
index 627c5308..54afa93c 100644
--- a/video_engine/vie_rtp_rtcp_impl.cc
+++ b/video_engine/vie_rtp_rtcp_impl.cc
@@ -1040,6 +1040,25 @@ int ViERTP_RTCPImpl::GetReceiveBandwidthEstimatorStats(
return 0;
}
+int ViERTP_RTCPImpl::GetPacerQueuingDelayMs(
+ const int video_channel, int* delay_ms) const {
+ WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
+ ViEId(shared_data_->instance_id(), video_channel),
+ "%s(channel: %d)", __FUNCTION__, video_channel);
+ ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
+ ViEEncoder* vie_encoder = cs.Encoder(video_channel);
+ if (!vie_encoder) {
+ WEBRTC_TRACE(kTraceError, kTraceVideo,
+ ViEId(shared_data_->instance_id(), video_channel),
+ "%s: Could not get encoder for channel %d", __FUNCTION__,
+ video_channel);
+ shared_data_->SetLastError(kViERtpRtcpInvalidChannelId);
+ return -1;
+ }
+ *delay_ms = vie_encoder->PacerQueuingDelayMs();
+ return 0;
+}
+
int ViERTP_RTCPImpl::StartRTPDump(const int video_channel,
const char file_nameUTF8[1024],
RTPDirections direction) {