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

Unified Diff: remoting/protocol/host_video_dispatcher.cc

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, 10 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 | « remoting/protocol/host_video_dispatcher.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/host_video_dispatcher.cc
diff --git a/remoting/protocol/host_video_dispatcher.cc b/remoting/protocol/host_video_dispatcher.cc
index b9a12c0294f28ac8e95d65ca52c8e6c000e8334f..4a752fbb74fa5300b5ec629044638f6ab4461344 100644
--- a/remoting/protocol/host_video_dispatcher.cc
+++ b/remoting/protocol/host_video_dispatcher.cc
@@ -7,14 +7,18 @@
#include "base/bind.h"
#include "net/socket/stream_socket.h"
#include "remoting/base/constants.h"
-#include "remoting/proto/video.pb.h"
#include "remoting/protocol/message_serialization.h"
+#include "remoting/protocol/video_feedback_stub.h"
namespace remoting {
namespace protocol {
HostVideoDispatcher::HostVideoDispatcher()
- : ChannelDispatcherBase(kVideoChannelName) {
+ : ChannelDispatcherBase(kVideoChannelName),
+ parser_(
+ base::Bind(&HostVideoDispatcher::OnVideoAck, base::Unretained(this)),
+ reader()),
+ video_feedback_stub_(nullptr) {
}
HostVideoDispatcher::~HostVideoDispatcher() {
@@ -25,5 +29,13 @@ void HostVideoDispatcher::ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
writer()->Write(SerializeAndFrameMessage(*packet), done);
}
+void HostVideoDispatcher::OnVideoAck(scoped_ptr<VideoAck> ack,
+ const base::Closure& done) {
+ if (video_feedback_stub_)
+ video_feedback_stub_->ProcessVideoAck(ack.Pass());
+
+ done.Run();
+}
+
} // namespace protocol
} // namespace remoting
« no previous file with comments | « remoting/protocol/host_video_dispatcher.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698