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