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_RTCP_RTCP_H_ | 5 #ifndef MEDIA_CAST_RTCP_RTCP_H_ |
6 #define MEDIA_CAST_RTCP_RTCP_H_ | 6 #define MEDIA_CAST_RTCP_RTCP_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual ~Rtcp(); | 84 virtual ~Rtcp(); |
85 | 85 |
86 static bool IsRtcpPacket(const uint8* rtcp_buffer, size_t length); | 86 static bool IsRtcpPacket(const uint8* rtcp_buffer, size_t length); |
87 | 87 |
88 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length); | 88 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length); |
89 | 89 |
90 base::TimeTicks TimeToSendNextRtcpReport(); | 90 base::TimeTicks TimeToSendNextRtcpReport(); |
91 // |sender_log_message| is optional; without it no log messages will be | 91 // |sender_log_message| is optional; without it no log messages will be |
92 // attached to the RTCP report; instead a normal RTCP send report will be | 92 // attached to the RTCP report; instead a normal RTCP send report will be |
93 // sent. | 93 // sent. |
94 void SendRtcpFromRtpSender(const RtcpSenderLogMessage* sender_log_message); | 94 // Additionally if all messages in |sender_log_message| does |
| 95 // not fit in the packet the |sender_log_message| will contain the remaining |
| 96 // unsent messages. |
| 97 void SendRtcpFromRtpSender(RtcpSenderLogMessage* sender_log_message); |
95 | 98 |
96 // |cast_message| and |receiver_log| is optional; if |cast_message| is | 99 // |cast_message| and |receiver_log| is optional; if |cast_message| is |
97 // provided the RTCP receiver report will append a Cast message containing | 100 // provided the RTCP receiver report will append a Cast message containing |
98 // Acks and Nacks; if |receiver_log| is provided the RTCP receiver report will | 101 // Acks and Nacks; if |receiver_log| is provided the RTCP receiver report will |
99 // append the log messages. If no argument is set a normal RTCP receiver | 102 // append the log messages. If no argument is set a normal RTCP receiver |
100 // report will be sent. | 103 // report will be sent. Additionally if all messages in |receiver_log| does |
| 104 // not fit in the packet the |receiver_log| will contain the remaining unsent |
| 105 // messages. |
101 void SendRtcpFromRtpReceiver(const RtcpCastMessage* cast_message, | 106 void SendRtcpFromRtpReceiver(const RtcpCastMessage* cast_message, |
102 const RtcpReceiverLogMessage* receiver_log); | 107 RtcpReceiverLogMessage* receiver_log); |
103 | 108 |
104 void IncomingRtcpPacket(const uint8* rtcp_buffer, size_t length); | 109 void IncomingRtcpPacket(const uint8* rtcp_buffer, size_t length); |
105 bool Rtt(base::TimeDelta* rtt, base::TimeDelta* avg_rtt, | 110 bool Rtt(base::TimeDelta* rtt, base::TimeDelta* avg_rtt, |
106 base::TimeDelta* min_rtt, base::TimeDelta* max_rtt) const; | 111 base::TimeDelta* min_rtt, base::TimeDelta* max_rtt) const; |
107 bool RtpTimestampInSenderTime(int frequency, | 112 bool RtpTimestampInSenderTime(int frequency, |
108 uint32 rtp_timestamp, | 113 uint32 rtp_timestamp, |
109 base::TimeTicks* rtp_timestamp_in_ticks) const; | 114 base::TimeTicks* rtp_timestamp_in_ticks) const; |
110 | 115 |
111 protected: | 116 protected: |
112 int CheckForWrapAround(uint32 new_timestamp, | 117 int CheckForWrapAround(uint32 new_timestamp, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 int number_of_rtt_in_avg_; | 177 int number_of_rtt_in_avg_; |
173 float avg_rtt_ms_; | 178 float avg_rtt_ms_; |
174 | 179 |
175 DISALLOW_COPY_AND_ASSIGN(Rtcp); | 180 DISALLOW_COPY_AND_ASSIGN(Rtcp); |
176 }; | 181 }; |
177 | 182 |
178 } // namespace cast | 183 } // namespace cast |
179 } // namespace media | 184 } // namespace media |
180 | 185 |
181 #endif // MEDIA_CAST_RTCP_RTCP_H_ | 186 #endif // MEDIA_CAST_RTCP_RTCP_H_ |
OLD | NEW |