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

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 2994043002: Revert of Request keyframes more frequently on stream start/decoding error. (Closed)
Patch Set: Created 3 years, 4 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 52da09a82df4444d7401a28703a7161980ed34f0..e8a9da22455c7a79d9b2948071347103987496f7 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -491,12 +491,9 @@
bool VideoReceiveStream::Decode() {
TRACE_EVENT0("webrtc", "VideoReceiveStream::Decode");
static const int kMaxWaitForFrameMs = 3000;
- static const int kMaxWaitForKeyFrameMs = 200;
-
- int wait_ms = keyframe_required_ ? kMaxWaitForKeyFrameMs : kMaxWaitForFrameMs;
std::unique_ptr<video_coding::FrameObject> frame;
video_coding::FrameBuffer::ReturnReason res =
- frame_buffer_->NextFrame(wait_ms, &frame, keyframe_required_);
+ frame_buffer_->NextFrame(kMaxWaitForFrameMs, &frame);
if (res == video_coding::FrameBuffer::ReturnReason::kStopped) {
video_receiver_.DecodingStopped();
@@ -505,12 +502,8 @@
if (frame) {
RTC_DCHECK_EQ(res, video_coding::FrameBuffer::ReturnReason::kFrameFound);
- if (video_receiver_.Decode(frame.get()) == VCM_OK) {
- keyframe_required_ = false;
+ if (video_receiver_.Decode(frame.get()) == VCM_OK)
rtp_video_stream_receiver_.FrameDecoded(frame->picture_id);
- } else {
- keyframe_required_ = true;
- }
} else {
RTC_DCHECK_EQ(res, video_coding::FrameBuffer::ReturnReason::kTimeout);
int64_t now_ms = clock_->TimeInMilliseconds();
@@ -531,7 +524,7 @@
now_ms - *last_keyframe_packet_ms < kMaxWaitForFrameMs;
if (stream_is_active && !receiving_keyframe) {
- LOG(LS_WARNING) << "No decodable frame in " << wait_ms
+ LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs
<< " ms, requesting keyframe.";
RequestKeyFrame();
}
« 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