Index: remoting/protocol/host_video_dispatcher.h |
diff --git a/remoting/protocol/host_video_dispatcher.h b/remoting/protocol/host_video_dispatcher.h |
index c1a957397c0ab6a018f12b8414df98a84b55bc9d..0c17e2d2403ceb49212335961840f57128204de9 100644 |
--- a/remoting/protocol/host_video_dispatcher.h |
+++ b/remoting/protocol/host_video_dispatcher.h |
@@ -5,17 +5,19 @@ |
#ifndef REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ |
#define REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ |
+#include <deque> |
#include <string> |
#include "base/compiler_specific.h" |
-#include "remoting/protocol/buffered_socket_writer.h" |
+#include "remoting/proto/video.pb.h" |
#include "remoting/protocol/channel_dispatcher_base.h" |
-#include "remoting/protocol/video_stub.h" |
+#include "remoting/protocol/protobuf_message_parser.h" |
+#include "remoting/protocol/video_sender.h" |
namespace remoting { |
namespace protocol { |
-class HostVideoDispatcher : public ChannelDispatcherBase, public VideoStub { |
+class HostVideoDispatcher : public ChannelDispatcherBase, public VideoSender { |
public: |
HostVideoDispatcher(); |
~HostVideoDispatcher() override; |
@@ -23,8 +25,23 @@ class HostVideoDispatcher : public ChannelDispatcherBase, public VideoStub { |
// VideoStub interface. |
void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, |
const base::Closure& done) override; |
+ bool SupportsAcks() override; |
private: |
+ struct PendingFrame { |
+ PendingFrame(int frame_id, const base::Closure& done); |
+ |
+ int32_t frame_id; |
+ base::Closure done; |
+ }; |
+ |
+ void OnVideoAck(scoped_ptr<VideoAck> ack, const base::Closure& done); |
+ |
+ int32_t frame_id_; |
+ ProtobufMessageParser<VideoAck> parser_; |
+ |
+ std::deque<PendingFrame> pending_frames_; |
+ |
DISALLOW_COPY_AND_ASSIGN(HostVideoDispatcher); |
}; |