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 // This class maintains a bi-directional RTCP connection with a remote | 5 // This class maintains a bi-directional RTCP connection with a remote |
6 // peer. | 6 // peer. |
7 | 7 |
8 #ifndef MEDIA_CAST_RTCP_RTCP_H_ | 8 #ifndef MEDIA_CAST_RTCP_RTCP_H_ |
9 #define MEDIA_CAST_RTCP_RTCP_H_ | 9 #define MEDIA_CAST_RTCP_RTCP_H_ |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... | |
24 #include "media/cast/net/cast_transport_sender.h" | 24 #include "media/cast/net/cast_transport_sender.h" |
25 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h" | 25 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h" |
26 #include "media/cast/net/rtcp/rtcp_defines.h" | 26 #include "media/cast/net/rtcp/rtcp_defines.h" |
27 | 27 |
28 namespace media { | 28 namespace media { |
29 namespace cast { | 29 namespace cast { |
30 | 30 |
31 class LocalRtcpReceiverFeedback; | 31 class LocalRtcpReceiverFeedback; |
32 class PacedPacketSender; | 32 class PacedPacketSender; |
33 class RtcpReceiver; | 33 class RtcpReceiver; |
34 class RtcpSender; | 34 class RtcpBuilder; |
35 | 35 |
36 typedef std::pair<uint32, base::TimeTicks> RtcpSendTimePair; | 36 typedef std::pair<uint32, base::TimeTicks> RtcpSendTimePair; |
37 typedef std::map<uint32, base::TimeTicks> RtcpSendTimeMap; | 37 typedef std::map<uint32, base::TimeTicks> RtcpSendTimeMap; |
38 typedef std::queue<RtcpSendTimePair> RtcpSendTimeQueue; | 38 typedef std::queue<RtcpSendTimePair> RtcpSendTimeQueue; |
39 | 39 |
40 class RtpReceiverStatistics { | 40 class RtpReceiverStatistics { |
41 public: | 41 public: |
42 virtual void GetStatistics(uint8* fraction_lost, | 42 virtual void GetStatistics(uint8* fraction_lost, |
43 uint32* cumulative_lost, // 24 bits valid. | 43 uint32* cumulative_lost, // 24 bits valid. |
44 uint32* extended_high_sequence_number, | 44 uint32* extended_high_sequence_number, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 uint32 last_ntp_fraction); | 131 uint32 last_ntp_fraction); |
132 | 132 |
133 // Remove duplicate events in |receiver_log|. | 133 // Remove duplicate events in |receiver_log|. |
134 // Returns true if any events remain. | 134 // Returns true if any events remain. |
135 bool DedupeReceiverLog(RtcpReceiverLogMessage* receiver_log); | 135 bool DedupeReceiverLog(RtcpReceiverLogMessage* receiver_log); |
136 | 136 |
137 const RtcpCastMessageCallback cast_callback_; | 137 const RtcpCastMessageCallback cast_callback_; |
138 const RtcpRttCallback rtt_callback_; | 138 const RtcpRttCallback rtt_callback_; |
139 const RtcpLogMessageCallback log_callback_; | 139 const RtcpLogMessageCallback log_callback_; |
140 base::TickClock* const clock_; // Not owned by this class. | 140 base::TickClock* const clock_; // Not owned by this class. |
141 const scoped_ptr<RtcpSender> rtcp_sender_; | 141 const scoped_ptr<RtcpBuilder> rtcp_builder_; |
miu
2014/09/03 22:28:07
nit: Can we use composition instead of pointer-to-
hubbe
2014/09/04 22:21:19
Oklidokli.
| |
142 PacedPacketSender* packet_sender_; // Not owned. | |
142 const uint32 local_ssrc_; | 143 const uint32 local_ssrc_; |
143 const uint32 remote_ssrc_; | 144 const uint32 remote_ssrc_; |
144 | 145 |
145 RtcpSendTimeMap last_reports_sent_map_; | 146 RtcpSendTimeMap last_reports_sent_map_; |
146 RtcpSendTimeQueue last_reports_sent_queue_; | 147 RtcpSendTimeQueue last_reports_sent_queue_; |
147 | 148 |
148 // The truncated (i.e., 64-->32-bit) NTP timestamp provided in the last report | 149 // The truncated (i.e., 64-->32-bit) NTP timestamp provided in the last report |
149 // from the remote peer, along with the local time at which the report was | 150 // from the remote peer, along with the local time at which the report was |
150 // received. These values are used for ping-pong'ing NTP timestamps between | 151 // received. These values are used for ping-pong'ing NTP timestamps between |
151 // the peers so that they can estimate the network's round-trip time. | 152 // the peers so that they can estimate the network's round-trip time. |
(...skipping 29 matching lines...) Expand all Loading... | |
181 base::hash_set<ReceiverEventKey> receiver_event_key_set_; | 182 base::hash_set<ReceiverEventKey> receiver_event_key_set_; |
182 std::queue<ReceiverEventKey> receiver_event_key_queue_; | 183 std::queue<ReceiverEventKey> receiver_event_key_queue_; |
183 | 184 |
184 DISALLOW_COPY_AND_ASSIGN(Rtcp); | 185 DISALLOW_COPY_AND_ASSIGN(Rtcp); |
185 }; | 186 }; |
186 | 187 |
187 } // namespace cast | 188 } // namespace cast |
188 } // namespace media | 189 } // namespace media |
189 | 190 |
190 #endif // MEDIA_CAST_RTCP_RTCP_H_ | 191 #endif // MEDIA_CAST_RTCP_RTCP_H_ |
OLD | NEW |