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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // sequence number has been received and processed. Ignore any additional | 43 // sequence number has been received and processed. Ignore any additional |
44 // packet with the same sequence number. | 44 // packet with the same sequence number. |
45 struct PacketsQueueEntry { | 45 struct PacketsQueueEntry { |
46 PacketsQueueEntry(); | 46 PacketsQueueEntry(); |
47 bool received; | 47 bool received; |
48 const RtpPacket* packet; | 48 const RtpPacket* packet; |
49 }; | 49 }; |
50 | 50 |
51 typedef std::deque<PacketsQueueEntry> PacketsQueue; | 51 typedef std::deque<PacketsQueueEntry> PacketsQueue; |
52 | 52 |
53 void OnChannelReady(const std::string& name, net::Socket* socket); | 53 void OnChannelReady(bool rtp, net::Socket* socket); |
54 | 54 |
55 void OnRtpPacket(const RtpPacket* rtp_packet); | 55 void OnRtpPacket(const RtpPacket* rtp_packet); |
56 void CheckFullPacket(const PacketsQueue::iterator& pos); | 56 void CheckFullPacket(const PacketsQueue::iterator& pos); |
57 void RebuildVideoPacket(const PacketsQueue::iterator& from, | 57 void RebuildVideoPacket(const PacketsQueue::iterator& from, |
58 const PacketsQueue::iterator& to); | 58 const PacketsQueue::iterator& to); |
59 void ResetQueue(); | 59 void ResetQueue(); |
60 | 60 |
61 // Helper method that sends RTCP receiver reports if enough time has | 61 // Helper method that sends RTCP receiver reports if enough time has |
62 // passed since the last report. It is called from | 62 // passed since the last report. It is called from |
63 // OnRtpPacket(). Interval between reports is defined by | 63 // OnRtpPacket(). Interval between reports is defined by |
(...skipping 16 matching lines...) Expand all Loading... |
80 // The stub that processes all received packets. | 80 // The stub that processes all received packets. |
81 VideoStub* video_stub_; | 81 VideoStub* video_stub_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(RtpVideoReader); | 83 DISALLOW_COPY_AND_ASSIGN(RtpVideoReader); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace protocol | 86 } // namespace protocol |
87 } // namespace remoting | 87 } // namespace remoting |
88 | 88 |
89 #endif // REMOTING_PROTOCOL_RTP_VIDEO_READER_H_ | 89 #endif // REMOTING_PROTOCOL_RTP_VIDEO_READER_H_ |
OLD | NEW |