| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // be used by the Cast receivers and test applications. | 61 // be used by the Cast receivers and test applications. |
| 62 Rtcp(scoped_refptr<CastEnvironment> cast_environment, | 62 Rtcp(scoped_refptr<CastEnvironment> cast_environment, |
| 63 RtcpSenderFeedback* sender_feedback, | 63 RtcpSenderFeedback* sender_feedback, |
| 64 transport::CastTransportSender* const transport_sender, // Send-side. | 64 transport::CastTransportSender* const transport_sender, // Send-side. |
| 65 transport::PacedPacketSender* paced_packet_sender, // Receive side. | 65 transport::PacedPacketSender* paced_packet_sender, // Receive side. |
| 66 RtpReceiverStatistics* rtp_receiver_statistics, | 66 RtpReceiverStatistics* rtp_receiver_statistics, |
| 67 RtcpMode rtcp_mode, | 67 RtcpMode rtcp_mode, |
| 68 const base::TimeDelta& rtcp_interval, | 68 const base::TimeDelta& rtcp_interval, |
| 69 uint32 local_ssrc, | 69 uint32 local_ssrc, |
| 70 uint32 remote_ssrc, | 70 uint32 remote_ssrc, |
| 71 const std::string& c_name); | 71 const std::string& c_name, |
| 72 bool is_audio); |
| 72 | 73 |
| 73 virtual ~Rtcp(); | 74 virtual ~Rtcp(); |
| 74 | 75 |
| 75 static bool IsRtcpPacket(const uint8* rtcp_buffer, size_t length); | 76 static bool IsRtcpPacket(const uint8* rtcp_buffer, size_t length); |
| 76 | 77 |
| 77 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length); | 78 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length); |
| 78 | 79 |
| 79 base::TimeTicks TimeToSendNextRtcpReport(); | 80 base::TimeTicks TimeToSendNextRtcpReport(); |
| 80 // |sender_log_message| is optional; without it no log messages will be | 81 // |sender_log_message| is optional; without it no log messages will be |
| 81 // attached to the RTCP report; instead a normal RTCP send report will be | 82 // attached to the RTCP report; instead a normal RTCP send report will be |
| (...skipping 22 matching lines...) Expand all Loading... |
| 104 uint32 rtp_timestamp, | 105 uint32 rtp_timestamp, |
| 105 base::TimeTicks* rtp_timestamp_in_ticks) const; | 106 base::TimeTicks* rtp_timestamp_in_ticks) const; |
| 106 | 107 |
| 107 // Set the history size to record Cast receiver events. The event history is | 108 // Set the history size to record Cast receiver events. The event history is |
| 108 // used to remove duplicates. The history will store at most |size| events. | 109 // used to remove duplicates. The history will store at most |size| events. |
| 109 void SetCastReceiverEventHistorySize(size_t size); | 110 void SetCastReceiverEventHistorySize(size_t size); |
| 110 | 111 |
| 111 // Update the target delay. Will be added to every sender report. | 112 // Update the target delay. Will be added to every sender report. |
| 112 void SetTargetDelay(base::TimeDelta target_delay); | 113 void SetTargetDelay(base::TimeDelta target_delay); |
| 113 | 114 |
| 115 void OnReceivedReceiverLog(const RtcpReceiverLogMessage& receiver_log); |
| 116 |
| 114 protected: | 117 protected: |
| 115 int CheckForWrapAround(uint32 new_timestamp, uint32 old_timestamp) const; | 118 int CheckForWrapAround(uint32 new_timestamp, uint32 old_timestamp) const; |
| 116 | 119 |
| 117 void OnReceivedLipSyncInfo(uint32 rtp_timestamp, | 120 void OnReceivedLipSyncInfo(uint32 rtp_timestamp, |
| 118 uint32 ntp_seconds, | 121 uint32 ntp_seconds, |
| 119 uint32 ntp_fraction); | 122 uint32 ntp_fraction); |
| 120 | 123 |
| 121 private: | 124 private: |
| 122 friend class LocalRtcpRttFeedback; | 125 friend class LocalRtcpRttFeedback; |
| 123 friend class LocalRtcpReceiverFeedback; | 126 friend class LocalRtcpReceiverFeedback; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 uint32 last_received_rtp_timestamp_; | 172 uint32 last_received_rtp_timestamp_; |
| 170 uint32 last_received_ntp_seconds_; | 173 uint32 last_received_ntp_seconds_; |
| 171 uint32 last_received_ntp_fraction_; | 174 uint32 last_received_ntp_fraction_; |
| 172 | 175 |
| 173 base::TimeDelta rtt_; | 176 base::TimeDelta rtt_; |
| 174 base::TimeDelta min_rtt_; | 177 base::TimeDelta min_rtt_; |
| 175 base::TimeDelta max_rtt_; | 178 base::TimeDelta max_rtt_; |
| 176 int number_of_rtt_in_avg_; | 179 int number_of_rtt_in_avg_; |
| 177 float avg_rtt_ms_; | 180 float avg_rtt_ms_; |
| 178 uint16 target_delay_ms_; | 181 uint16 target_delay_ms_; |
| 182 bool is_audio_; |
| 179 | 183 |
| 180 DISALLOW_COPY_AND_ASSIGN(Rtcp); | 184 DISALLOW_COPY_AND_ASSIGN(Rtcp); |
| 181 }; | 185 }; |
| 182 | 186 |
| 183 } // namespace cast | 187 } // namespace cast |
| 184 } // namespace media | 188 } // namespace media |
| 185 | 189 |
| 186 #endif // MEDIA_CAST_RTCP_RTCP_H_ | 190 #endif // MEDIA_CAST_RTCP_RTCP_H_ |
| OLD | NEW |