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. |