From 98c04b38a8e4d6afb9b90f728ea465d979a5e18b Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Thu, 18 Dec 2014 13:12:52 +0000 Subject: [PATCH] Get avg_delay_ms from DecoderTiming callback. R=stefan@webrtc.org BUG=1667 Review URL: https://webrtc-codereview.appspot.com/28339004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7949 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/video/receive_statistics_proxy.cc | 15 ++++++++++++++- webrtc/video/receive_statistics_proxy.h | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc index ca0bcdfbd..1fbab0504 100644 --- a/webrtc/video/receive_statistics_proxy.cc +++ b/webrtc/video/receive_statistics_proxy.cc @@ -41,11 +41,13 @@ VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { stats = stats_; } stats.c_name = GetCName(); - codec_->GetReceiveSideDelay(channel_, &stats.avg_delay_ms); stats.discarded_packets = codec_->GetNumDiscardedPackets(channel_); codec_->GetReceiveCodecStastistics( channel_, stats.key_frames, stats.delta_frames); + codec_->GetReceiveCodecStastistics(channel_, stats.key_frames, + stats.delta_frames); + return stats; } @@ -64,6 +66,17 @@ void ReceiveStatisticsProxy::IncomingRate(const int video_channel, stats_.total_bitrate_bps = bitrate_bps; } +void ReceiveStatisticsProxy::DecoderTiming(int decode_ms, + int max_decode_ms, + int current_delay_ms, + int target_delay_ms, + int jitter_buffer_ms, + int min_playout_delay_ms, + int render_delay_ms) { + CriticalSectionScoped lock(crit_.get()); + stats_.avg_delay_ms = target_delay_ms; +} + void ReceiveStatisticsProxy::StatisticsUpdated( const webrtc::RtcpStatistics& statistics, uint32_t ssrc) { diff --git a/webrtc/video/receive_statistics_proxy.h b/webrtc/video/receive_statistics_proxy.h index a1b6735b0..85a3813e0 100644 --- a/webrtc/video/receive_statistics_proxy.h +++ b/webrtc/video/receive_statistics_proxy.h @@ -59,7 +59,7 @@ class ReceiveStatisticsProxy : public ViEDecoderObserver, int target_delay_ms, int jitter_buffer_ms, int min_playout_delay_ms, - int render_delay_ms) OVERRIDE {} + int render_delay_ms) OVERRIDE; virtual void RequestNewKeyFrame(const int video_channel) OVERRIDE {} // Overrides RtcpStatisticsBallback.