OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_NET_RTP_RTP_PACKETIZER_H_ | 5 #ifndef MEDIA_CAST_NET_RTP_RTP_PACKETIZER_H_ |
6 #define MEDIA_CAST_NET_RTP_RTP_PACKETIZER_H_ | 6 #define MEDIA_CAST_NET_RTP_RTP_PACKETIZER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <cmath> | 11 #include <cmath> |
12 #include <list> | 12 #include <list> |
13 #include <map> | 13 #include <map> |
14 | 14 |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "media/cast/common/rtp_time.h" |
16 #include "media/cast/net/rtp/packet_storage.h" | 17 #include "media/cast/net/rtp/packet_storage.h" |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class TickClock; | 20 class TickClock; |
20 } | 21 } |
21 | 22 |
22 namespace media { | 23 namespace media { |
23 namespace cast { | 24 namespace cast { |
24 | 25 |
25 class PacedSender; | 26 class PacedSender; |
(...skipping 26 matching lines...) Expand all Loading... |
52 // Return the next sequence number, and increment by one. Enables unique | 53 // Return the next sequence number, and increment by one. Enables unique |
53 // incremental sequence numbers for every packet (including retransmissions). | 54 // incremental sequence numbers for every packet (including retransmissions). |
54 uint16_t NextSequenceNumber(); | 55 uint16_t NextSequenceNumber(); |
55 | 56 |
56 size_t send_packet_count() const { return send_packet_count_; } | 57 size_t send_packet_count() const { return send_packet_count_; } |
57 size_t send_octet_count() const { return send_octet_count_; } | 58 size_t send_octet_count() const { return send_octet_count_; } |
58 | 59 |
59 private: | 60 private: |
60 void BuildCommonRTPheader(Packet* packet, | 61 void BuildCommonRTPheader(Packet* packet, |
61 bool marker_bit, | 62 bool marker_bit, |
62 uint32_t time_stamp); | 63 RtpTimeTicks rtp_timestamp); |
63 | 64 |
64 RtpPacketizerConfig config_; | 65 RtpPacketizerConfig config_; |
65 PacedSender* const transport_; // Not owned by this class. | 66 PacedSender* const transport_; // Not owned by this class. |
66 PacketStorage* packet_storage_; | 67 PacketStorage* packet_storage_; |
67 | 68 |
68 uint16_t sequence_number_; | 69 uint16_t sequence_number_; |
69 uint32_t rtp_timestamp_; | |
70 uint16_t packet_id_; | |
71 | 70 |
72 size_t send_packet_count_; | 71 size_t send_packet_count_; |
73 size_t send_octet_count_; | 72 size_t send_octet_count_; |
74 }; | 73 }; |
75 | 74 |
76 } // namespace cast | 75 } // namespace cast |
77 } // namespace media | 76 } // namespace media |
78 | 77 |
79 #endif // MEDIA_CAST_NET_RTP_RTP_PACKETIZER_H_ | 78 #endif // MEDIA_CAST_NET_RTP_RTP_PACKETIZER_H_ |
OLD | NEW |