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 |