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

Unified Diff: remoting/protocol/webrtc_video_capturer_adapter.cc

Issue 1740443002: Fix WebrtcVideoCapturerAdapter to emit frames even when nothing is changing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_video_capturer_adapter.cc
diff --git a/remoting/protocol/webrtc_video_capturer_adapter.cc b/remoting/protocol/webrtc_video_capturer_adapter.cc
index 96c2c3af891e62d8b95a3d18218d3e7920be48ec..c0aeea1a193fe1cca5953777784155ef47c3e01c 100644
--- a/remoting/protocol/webrtc_video_capturer_adapter.cc
+++ b/remoting/protocol/webrtc_video_capturer_adapter.cc
@@ -161,11 +161,16 @@ void WebrtcVideoCapturerAdapter::OnCaptureCompleted(
DCHECK(capture_pending_);
capture_pending_ = false;
+ if (!frame)
+ return;
+
scoped_ptr<webrtc::DesktopFrame> owned_frame(frame);
- // Drop the frame if there were no changes.
- if (!owned_frame || owned_frame->updated_region().is_empty())
- return;
+ // TODO(sergeyu): Currently the adapter keeps generating frames even when
+ // nothing is changing on the screen. This is necessary because the video
+ // sender drops frames. Obviously this is a suboptimal. The sending code in
+ // WebRTC needs to have some mechanism to notify when the bandwidth is
+ // exceeded, so the capturer can adapt frame rate.
size_t width = frame->size().width();
size_t height = frame->size().height();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698