OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ | 5 #ifndef REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ |
6 #define REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ | 6 #define REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ |
7 | 7 |
8 #include <string> | |
9 | |
10 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
11 #include "remoting/protocol/buffered_socket_writer.h" | 9 #include "remoting/proto/video.pb.h" |
12 #include "remoting/protocol/channel_dispatcher_base.h" | 10 #include "remoting/protocol/channel_dispatcher_base.h" |
| 11 #include "remoting/protocol/protobuf_message_parser.h" |
13 #include "remoting/protocol/video_stub.h" | 12 #include "remoting/protocol/video_stub.h" |
14 | 13 |
15 namespace remoting { | 14 namespace remoting { |
16 namespace protocol { | 15 namespace protocol { |
17 | 16 |
| 17 class VideoFeedbackStub; |
| 18 |
18 class HostVideoDispatcher : public ChannelDispatcherBase, public VideoStub { | 19 class HostVideoDispatcher : public ChannelDispatcherBase, public VideoStub { |
19 public: | 20 public: |
20 HostVideoDispatcher(); | 21 HostVideoDispatcher(); |
21 ~HostVideoDispatcher() override; | 22 ~HostVideoDispatcher() override; |
22 | 23 |
| 24 void set_video_feedback_stub(VideoFeedbackStub* video_feedback_stub) { |
| 25 video_feedback_stub_ = video_feedback_stub; |
| 26 } |
| 27 |
23 // VideoStub interface. | 28 // VideoStub interface. |
24 void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, | 29 void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, |
25 const base::Closure& done) override; | 30 const base::Closure& done) override; |
26 | 31 |
27 private: | 32 private: |
| 33 void OnVideoAck(scoped_ptr<VideoAck> ack, const base::Closure& done); |
| 34 |
| 35 ProtobufMessageParser<VideoAck> parser_; |
| 36 |
| 37 VideoFeedbackStub* video_feedback_stub_; |
| 38 |
28 DISALLOW_COPY_AND_ASSIGN(HostVideoDispatcher); | 39 DISALLOW_COPY_AND_ASSIGN(HostVideoDispatcher); |
29 }; | 40 }; |
30 | 41 |
31 } // namespace protocol | 42 } // namespace protocol |
32 } // namespace remoting | 43 } // namespace remoting |
33 | 44 |
34 #endif // REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ | 45 #endif // REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ |
OLD | NEW |