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

Unified Diff: remoting/codec/video_encoder_verbatim.cc

Issue 1150163002: Update VideoFramePump to pass un-changed frames to encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work-around Visual Studio issue w/ undefined references Created 5 years, 6 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 | « remoting/codec/video_encoder.h ('k') | remoting/codec/video_encoder_verbatim_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/video_encoder_verbatim.cc
diff --git a/remoting/codec/video_encoder_verbatim.cc b/remoting/codec/video_encoder_verbatim.cc
index c7550e1713397f9d836ac71d439d4641b4e31046..2948e3e27128bba6f78c31cfcd72b436a70df488 100644
--- a/remoting/codec/video_encoder_verbatim.cc
+++ b/remoting/codec/video_encoder_verbatim.cc
@@ -25,7 +25,12 @@ VideoEncoderVerbatim::~VideoEncoderVerbatim() {}
scoped_ptr<VideoPacket> VideoEncoderVerbatim::Encode(
const webrtc::DesktopFrame& frame) {
- CHECK(frame.data());
+ DCHECK(frame.data());
+
+ // If nothing has changed in the frame then return NULL to indicate that
+ // we don't need to actually send anything (e.g. nothing to top-off).
+ if (frame.updated_region().is_empty())
+ return nullptr;
base::Time encode_start_time = base::Time::Now();
« no previous file with comments | « remoting/codec/video_encoder.h ('k') | remoting/codec/video_encoder_verbatim_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698