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

Unified Diff: remoting/protocol/video_stub.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/protocol/video_stub.h
diff --git a/remoting/protocol/video_stub.h b/remoting/protocol/video_stub.h
index 59c231ea8403982000112429e0d91ebca77bf52f..548d3f5f6d027e9c9f258710093cb8cc465c8057 100644
--- a/remoting/protocol/video_stub.h
+++ b/remoting/protocol/video_stub.h
@@ -16,8 +16,22 @@ namespace protocol {
class VideoStub {
public:
- virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
- const base::Closure& done) = 0;
+ // For each packet VideoStub calls the specified ProgressCallback to
+ // notify about packet progress. SENT state may be skipped, if the packet is
+ // processed locally. If SupportsAcks() returns true then DONE progress
+ // notification is emitted only after the acknowledgment has been received.
+ enum class PacketProgress {
+ SENT,
Wez 2015/02/03 00:54:32 Do we really need the "SENT" state? It ends up mak
Sergey Ulanov 2015/02/09 19:14:54 Reverted this change now. Using VideoFeedbackStub
+ DONE,
+ };
+ typedef base::Callback<void(PacketProgress progress)> ProgressCallback;
+
+ virtual void ProcessVideoPacket(
+ scoped_ptr<VideoPacket> video_packet,
+ const ProgressCallback& progress_callback) = 0;
Wez 2015/02/03 00:54:32 This complicates the VideoStub interface quite a b
Sergey Ulanov 2015/02/09 19:14:54 Reverted this change now. Using VideoFeedbackStub
+
+ // Indicates that the connection supports video packet acknowledgments.
+ virtual bool SupportsAcks() { return false; }
protected:
VideoStub() {}

Powered by Google App Engine
This is Rietveld 408576698