| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ | 5 #ifndef MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ |
| 6 #define MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ | 6 #define MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Return the next sequence number, and increment by one. Enables unique | 43 // Return the next sequence number, and increment by one. Enables unique |
| 44 // incremental sequence numbers for every packet (including retransmissions). | 44 // incremental sequence numbers for every packet (including retransmissions). |
| 45 uint16 NextSequenceNumber(); | 45 uint16 NextSequenceNumber(); |
| 46 | 46 |
| 47 int send_packets_count() { return send_packets_count_; } | 47 int send_packets_count() { return send_packets_count_; } |
| 48 | 48 |
| 49 size_t send_octet_count() { return send_octet_count_; } | 49 size_t send_octet_count() { return send_octet_count_; } |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 void Cast(bool is_key, uint8 reference_frame_id, | 52 void Cast(bool is_key, uint8 reference_frame_id, |
| 53 uint32 timestamp, std::vector<uint8> data); | 53 uint32 timestamp, const std::string& data); |
| 54 |
| 54 void BuildCommonRTPheader(std::vector<uint8>* packet, bool marker_bit, | 55 void BuildCommonRTPheader(std::vector<uint8>* packet, bool marker_bit, |
| 55 uint32 time_stamp); | 56 uint32 time_stamp); |
| 56 | 57 |
| 57 RtpPacketizerConfig config_; | 58 RtpPacketizerConfig config_; |
| 58 PacedPacketSender* transport_; | 59 PacedPacketSender* transport_; |
| 59 PacketStorage* packet_storage_; | 60 PacketStorage* packet_storage_; |
| 60 | 61 |
| 61 base::TimeTicks time_last_sent_rtp_timestamp_; | 62 base::TimeTicks time_last_sent_rtp_timestamp_; |
| 62 uint16 sequence_number_; | 63 uint16 sequence_number_; |
| 63 uint32 rtp_timestamp_; | 64 uint32 rtp_timestamp_; |
| 64 uint8 frame_id_; | 65 uint8 frame_id_; |
| 65 uint16 packet_id_; | 66 uint16 packet_id_; |
| 66 | 67 |
| 67 int send_packets_count_; | 68 int send_packets_count_; |
| 68 size_t send_octet_count_; | 69 size_t send_octet_count_; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace cast | 72 } // namespace cast |
| 72 } // namespace media | 73 } // namespace media |
| 73 | 74 |
| 74 #endif // MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ | 75 #endif // MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ |
| OLD | NEW |