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

Unified Diff: remoting/host/video_scheduler.h

Issue 303223010: Merge 272790 "More reliable keep-alive video packets." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src/
Patch Set: Created 6 years, 7 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 | remoting/host/video_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/video_scheduler.h
===================================================================
--- remoting/host/video_scheduler.h (revision 273938)
+++ remoting/host/video_scheduler.h (working copy)
@@ -140,8 +140,14 @@
// Callback passed to |video_stub_| for the last packet in each frame, to
// rate-limit frame captures to network throughput.
- void VideoFrameSentCallback();
+ void OnVideoPacketSent();
+ // Called by |keep_alive_timer_|.
+ void SendKeepAlivePacket();
+
+ // Callback for |video_stub_| called after a keep-alive packet is sent.
+ void OnKeepAlivePacketSent();
+
// Send updated cursor shape to client.
void SendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape);
@@ -173,6 +179,10 @@
// Timer used to schedule CaptureNextFrame().
scoped_ptr<base::OneShotTimer<VideoScheduler> > capture_timer_;
+ // Timer used to ensure that we send empty keep-alive frames to the client
+ // even when the video stream is paused or encoder is busy.
+ scoped_ptr<base::DelayTimer<VideoScheduler> > keep_alive_timer_;
+
// The number of frames being processed, i.e. frames that we are currently
// capturing, encoding or sending. The value is capped at 2 to minimize
// latency.
« no previous file with comments | « no previous file | remoting/host/video_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698