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