From 4317b02f66440cbb0700e847e3f9fe870af684e4 Mon Sep 17 00:00:00 2001 From: Evan Shrubsole Date: Wed, 10 Aug 2022 16:08:48 +0000 Subject: [PATCH] Remove workaround for long video pauses. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This behaviour has been fixed with the introduction of FrameBuffer3 Bug: webrtc:14033, webrtc:13343, webrtc:9974 Change-Id: Iba81c169706336e85194ed141324466e44a2c859 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265867 Reviewed-by: Erik Språng Commit-Queue: Evan Shrubsole Cr-Commit-Position: refs/heads/main@{#37742} --- video/video_receive_stream2.cc | 16 ---------------- video/video_receive_stream2.h | 2 -- 2 files changed, 18 deletions(-) diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index cf10a45d40..84a9bb3543 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -171,11 +171,6 @@ bool IsKeyFrameAndUnspecifiedResolution(const EncodedFrame& frame) { frame.EncodedImage()._encodedHeight == 0; } -// TODO(https://bugs.webrtc.org/9974): Consider removing this workaround. -// Maximum time between frames before resetting the FrameBuffer to avoid RTP -// timestamps wraparound to affect FrameBuffer. -constexpr TimeDelta kInactiveStreamThreshold = TimeDelta::Minutes(10); - std::string OptionalDelayToLogString(const absl::optional opt) { return opt.has_value() ? ToLogString(*opt) : ""; } @@ -717,17 +712,6 @@ void VideoReceiveStream2::RequestKeyFrame(Timestamp now) { void VideoReceiveStream2::OnCompleteFrame(std::unique_ptr frame) { RTC_DCHECK_RUN_ON(&worker_sequence_checker_); - // TODO(https://bugs.webrtc.org/9974): Consider removing this workaround. - // TODO(https://bugs.webrtc.org/13343): Remove this check when FrameBuffer3 is - // deployed. With FrameBuffer3, this case is properly handled and tested in - // the FrameBufferProxyTest.PausedStream unit test. - Timestamp time_now = clock_->CurrentTime(); - if (last_complete_frame_time_ && - time_now - *last_complete_frame_time_ > kInactiveStreamThreshold) { - frame_buffer_->Clear(); - } - last_complete_frame_time_ = time_now; - const VideoPlayoutDelay& playout_delay = frame->EncodedImage().playout_delay_; if (playout_delay.min_ms >= 0) { frame_minimum_playout_delay_ = TimeDelta::Millis(playout_delay.min_ms); diff --git a/video/video_receive_stream2.h b/video/video_receive_stream2.h index 686e3af52a..6410434a36 100644 --- a/video/video_receive_stream2.h +++ b/video/video_receive_stream2.h @@ -275,8 +275,6 @@ class VideoReceiveStream2 absl::optional last_keyframe_request_ RTC_GUARDED_BY(decode_queue_); - absl::optional last_complete_frame_time_ - RTC_GUARDED_BY(worker_sequence_checker_); // Keyframe request intervals are configurable through field trials. TimeDelta max_wait_for_keyframe_ RTC_GUARDED_BY(decode_queue_);