OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIDEO_STUB_H_ | 5 #ifndef REMOTING_PROTOCOL_VIDEO_STUB_H_ |
6 #define REMOTING_PROTOCOL_VIDEO_STUB_H_ | 6 #define REMOTING_PROTOCOL_VIDEO_STUB_H_ |
7 | 7 |
8 class Task; | 8 #include "base/callback.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 class VideoPacket; | 12 class VideoPacket; |
13 | 13 |
14 namespace protocol { | 14 namespace protocol { |
15 | 15 |
16 class VideoStub { | 16 class VideoStub { |
17 public: | 17 public: |
18 virtual ~VideoStub() { } | 18 virtual ~VideoStub() { } |
19 | 19 |
20 // TODO(sergeyu): VideoPacket is the protobuf message that is used to send | 20 // TODO(sergeyu): VideoPacket is the protobuf message that is used to send |
21 // video packets in protobuf stream. It should not be used here. Add another | 21 // video packets in protobuf stream. It should not be used here. Add another |
22 // struct and use it to represent video packets internally. | 22 // struct and use it to represent video packets internally. |
23 virtual void ProcessVideoPacket(const VideoPacket* video_packet, | 23 virtual void ProcessVideoPacket(const VideoPacket* video_packet, |
24 Task* done) = 0; | 24 const base::Closure& done) = 0; |
25 | 25 |
26 // Returns number of packets currently pending in the buffer. | 26 // Returns number of packets currently pending in the buffer. |
27 virtual int GetPendingPackets() = 0; | 27 virtual int GetPendingPackets() = 0; |
28 | 28 |
29 protected: | 29 protected: |
30 VideoStub() { } | 30 VideoStub() { } |
31 | 31 |
32 private: | 32 private: |
33 DISALLOW_COPY_AND_ASSIGN(VideoStub); | 33 DISALLOW_COPY_AND_ASSIGN(VideoStub); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace protocol | 36 } // namespace protocol |
37 } // namespace remoting | 37 } // namespace remoting |
38 | 38 |
39 #endif // REMOTING_PROTOCOL_VIDEO_STUB_H_ | 39 #endif // REMOTING_PROTOCOL_VIDEO_STUB_H_ |
OLD | NEW |