OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RTP_VIDEO_READER_H_ | 5 #ifndef REMOTING_PROTOCOL_RTP_VIDEO_READER_H_ |
6 #define REMOTING_PROTOCOL_RTP_VIDEO_READER_H_ | 6 #define REMOTING_PROTOCOL_RTP_VIDEO_READER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class RtpVideoReader : public VideoReader { | 26 class RtpVideoReader : public VideoReader { |
27 public: | 27 public: |
28 RtpVideoReader(base::MessageLoopProxy* message_loop); | 28 RtpVideoReader(base::MessageLoopProxy* message_loop); |
29 virtual ~RtpVideoReader(); | 29 virtual ~RtpVideoReader(); |
30 | 30 |
31 // VideoReader interface. | 31 // VideoReader interface. |
32 virtual void Init(protocol::Session* session, | 32 virtual void Init(protocol::Session* session, |
33 VideoStub* video_stub, | 33 VideoStub* video_stub, |
34 const InitializedCallback& callback) OVERRIDE; | 34 const InitializedCallback& callback) OVERRIDE; |
| 35 virtual bool is_connected() OVERRIDE; |
35 | 36 |
36 private: | 37 private: |
37 friend class RtpVideoReaderTest; | 38 friend class RtpVideoReaderTest; |
38 | 39 |
39 // Following struct is used to store pending packets in |packets_queue_|. | 40 // Following struct is used to store pending packets in |packets_queue_|. |
40 // Each entry may be in three different states: | 41 // Each entry may be in three different states: |
41 // |received| == false, |packet| == NULL - packet with the corresponding | 42 // |received| == false, |packet| == NULL - packet with the corresponding |
42 // sequence number hasn't been received. | 43 // sequence number hasn't been received. |
43 // |received| == true, |packet| != NULL - packet with the corresponding | 44 // |received| == true, |packet| != NULL - packet with the corresponding |
44 // sequence number has been received, but hasn't been processed, still | 45 // sequence number has been received, but hasn't been processed, still |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // The stub that processes all received packets. | 87 // The stub that processes all received packets. |
87 VideoStub* video_stub_; | 88 VideoStub* video_stub_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(RtpVideoReader); | 90 DISALLOW_COPY_AND_ASSIGN(RtpVideoReader); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace protocol | 93 } // namespace protocol |
93 } // namespace remoting | 94 } // namespace remoting |
94 | 95 |
95 #endif // REMOTING_PROTOCOL_RTP_VIDEO_READER_H_ | 96 #endif // REMOTING_PROTOCOL_RTP_VIDEO_READER_H_ |
OLD | NEW |