| 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_READER_H_ | 5 #ifndef REMOTING_PROTOCOL_RTP_READER_H_ |
| 6 #define REMOTING_PROTOCOL_RTP_READER_H_ | 6 #define REMOTING_PROTOCOL_RTP_READER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "remoting/base/compound_buffer.h" | 10 #include "remoting/base/compound_buffer.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // |socket| belongs to. The callback will be called when a new message is | 59 // |socket| belongs to. The callback will be called when a new message is |
| 60 // received. RtpReader owns |on_message_callback|, doesn't own | 60 // received. RtpReader owns |on_message_callback|, doesn't own |
| 61 // |socket|. | 61 // |socket|. |
| 62 void Init(net::Socket* socket, const OnMessageCallback& on_message_callback); | 62 void Init(net::Socket* socket, const OnMessageCallback& on_message_callback); |
| 63 | 63 |
| 64 void GetReceiverReport(RtcpReceiverReport* report); | 64 void GetReceiverReport(RtcpReceiverReport* report); |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 friend class RtpVideoReaderTest; | 67 friend class RtpVideoReaderTest; |
| 68 | 68 |
| 69 virtual void OnDataReceived(net::IOBuffer* buffer, int data_size); | 69 virtual void OnDataReceived(net::IOBuffer* buffer, int data_size) OVERRIDE; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 OnMessageCallback on_message_callback_; | 72 OnMessageCallback on_message_callback_; |
| 73 | 73 |
| 74 uint16 max_sequence_number_; | 74 uint16 max_sequence_number_; |
| 75 uint16 wrap_around_count_; | 75 uint16 wrap_around_count_; |
| 76 int start_sequence_number_; | 76 int start_sequence_number_; |
| 77 int total_packets_received_; | 77 int total_packets_received_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(RtpReader); | 79 DISALLOW_COPY_AND_ASSIGN(RtpReader); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace protocol | 82 } // namespace protocol |
| 83 } // namespace remoting | 83 } // namespace remoting |
| 84 | 84 |
| 85 | 85 |
| 86 #endif // REMOTING_PROTOCOL_RTP_READER_H_ | 86 #endif // REMOTING_PROTOCOL_RTP_READER_H_ |
| OLD | NEW |