Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2622)

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 2980413002: Fix the video buffer size should take rtt into consideration (Closed)
Patch Set: MODIFY to follow coding guidelines Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index a18d4375a19cee1a1020fd2ce4f75b0f9a459789..20b2f8fad615b85adb029e04ec9d12bbde512c9b 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -267,6 +267,7 @@ void VideoReceiveStream::Start() {
frame_buffer_->Start();
call_stats_->RegisterStatsObserver(&rtp_video_stream_receiver_);
+ call_stats_->RegisterStatsObserver(this);
if (rtp_video_stream_receiver_.IsRetransmissionsEnabled() &&
protected_by_fec) {
@@ -316,6 +317,7 @@ void VideoReceiveStream::Stop() {
rtp_video_stream_receiver_.StopReceive();
frame_buffer_->Stop();
+ call_stats_->DeregisterStatsObserver(this);
call_stats_->DeregisterStatsObserver(&rtp_video_stream_receiver_);
process_thread_->DeRegisterModule(&video_receiver_);
@@ -434,6 +436,10 @@ void VideoReceiveStream::OnCompleteFrame(
rtp_video_stream_receiver_.FrameContinuous(last_continuous_pid);
}
+void VideoReceiveStream::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
+ frame_buffer_->UpdateRtt(max_rtt_ms);
+}
+
int VideoReceiveStream::id() const {
RTC_DCHECK_RUN_ON(&worker_thread_checker_);
return config_.rtp.remote_ssrc;
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698