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

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') | remoting/host/video_scheduler.cc » ('J')
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..7688bad6dee599309a9fc48aa8914f4e0f3e3d2c 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 insure that we occasionally send a frame to the client
Wez 2014/05/23 00:45:24 insure -> ensure
Wez 2014/05/23 00:45:24 nit: suggest "occasionally send a frame" -> "send
Sergey Ulanov 2014/05/23 01:27:13 Done.
Sergey Ulanov 2014/05/23 01:27:13 Done.
+ // even when the video stream is paused or encoder is busy.
Wez 2014/05/23 00:45:24 Why would we want to send frames when the video st
Sergey Ulanov 2014/05/23 01:27:13 That is to fix crbug.com/376528. Libjingle has to
+ 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') | remoting/host/video_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698