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

Unified Diff: remoting/host/video_scheduler.h

Issue 292373002: More reliable keep-alive video packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
diff --git a/remoting/host/video_scheduler.h b/remoting/host/video_scheduler.h
index f2eabd9744bbbcc94b178944ab0f4d48e1c55286..94fc7951dbc4e50df29f42518709d848d7eb2c01 100644
--- a/remoting/host/video_scheduler.h
+++ b/remoting/host/video_scheduler.h
@@ -140,7 +140,13 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler>,
// 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 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler>,
// 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