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

Unified Diff: remoting/host/video_scheduler.h

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: remoting/host/video_scheduler.h
diff --git a/remoting/host/video_scheduler.h b/remoting/host/video_scheduler.h
index c30ffa25310c1b1062a758d531c35102d4b70623..59c1b01c9e2d7680b5b7560f108b8a3363cb599d 100644
--- a/remoting/host/video_scheduler.h
+++ b/remoting/host/video_scheduler.h
@@ -14,6 +14,7 @@
#include "base/timer/timer.h"
#include "remoting/codec/video_encoder.h"
#include "remoting/proto/video.pb.h"
+#include "remoting/protocol/video_stub.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
@@ -33,7 +34,6 @@ class CursorShapeInfo;
namespace protocol {
class CursorShapeInfo;
class CursorShapeStub;
-class VideoStub;
} // namespace protocol
// Class responsible for scheduling frame captures from a
@@ -130,7 +130,7 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler>,
const webrtc::DesktopVector& position) override;
// Starts the capturer on the capture thread.
- void StartOnCaptureThread();
+ void StartOnCaptureThread(bool acks_supported);
// Stops scheduling frame captures on the capture thread.
void StopOnCaptureThread();
@@ -144,20 +144,23 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler>,
// Called when a frame has been sent to the client.
void ProcessFrameSentOnCaptureThread();
+ // Called when a frame has been sent to the client.
+ void ProcessFrameAckOnCaptureThread();
+
// Network thread -----------------------------------------------------------
// Send |packet| to the client, unless we are in the process of stopping.
void SendVideoPacket(scoped_ptr<VideoPacket> packet);
- // Callback passed to |video_stub_| for the last packet in each frame, to
+ // Callback passed to |video_stub_|, to
// rate-limit frame captures to network throughput.
- void OnVideoPacketSent();
+ void OnVideoPacketProgress(protocol::VideoStub::PacketProgress progress);
// Called by |keep_alive_timer_|.
void SendKeepAlivePacket();
// Callback for |video_stub_| called after a keep-alive packet is sent.
- void OnKeepAlivePacketSent();
+ void OnKeepAlivePacketProgress(protocol::VideoStub::PacketProgress progress);
// Send updated cursor shape to client.
void SendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape);

Powered by Google App Engine
This is Rietveld 408576698