| 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> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/time/tick_clock.h" | 16 #include "base/time/tick_clock.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "media/cast/cast_config.h" | 18 #include "media/cast/cast_config.h" |
| 19 #include "media/cast/cast_defines.h" | 19 #include "media/cast/cast_defines.h" |
| 20 #include "media/cast/cast_environment.h" |
| 20 #include "media/cast/rtcp/rtcp_defines.h" | 21 #include "media/cast/rtcp/rtcp_defines.h" |
| 21 | 22 |
| 22 namespace media { | 23 namespace media { |
| 23 namespace cast { | 24 namespace cast { |
| 24 | 25 |
| 25 class LocalRtcpReceiverFeedback; | 26 class LocalRtcpReceiverFeedback; |
| 26 class LocalRtcpRttFeedback; | 27 class LocalRtcpRttFeedback; |
| 27 class PacedPacketSender; | 28 class PacedPacketSender; |
| 28 class RtcpReceiver; | 29 class RtcpReceiver; |
| 29 class RtcpSender; | 30 class RtcpSender; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 virtual void GetStatistics(uint8* fraction_lost, | 64 virtual void GetStatistics(uint8* fraction_lost, |
| 64 uint32* cumulative_lost, // 24 bits valid. | 65 uint32* cumulative_lost, // 24 bits valid. |
| 65 uint32* extended_high_sequence_number, | 66 uint32* extended_high_sequence_number, |
| 66 uint32* jitter) = 0; | 67 uint32* jitter) = 0; |
| 67 | 68 |
| 68 virtual ~RtpReceiverStatistics() {} | 69 virtual ~RtpReceiverStatistics() {} |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 class Rtcp { | 72 class Rtcp { |
| 72 public: | 73 public: |
| 73 Rtcp(base::TickClock* clock, | 74 Rtcp(scoped_refptr<CastEnvironment> cast_environment, |
| 74 RtcpSenderFeedback* sender_feedback, | 75 RtcpSenderFeedback* sender_feedback, |
| 75 PacedPacketSender* paced_packet_sender, | 76 PacedPacketSender* paced_packet_sender, |
| 76 RtpSenderStatistics* rtp_sender_statistics, | 77 RtpSenderStatistics* rtp_sender_statistics, |
| 77 RtpReceiverStatistics* rtp_receiver_statistics, | 78 RtpReceiverStatistics* rtp_receiver_statistics, |
| 78 RtcpMode rtcp_mode, | 79 RtcpMode rtcp_mode, |
| 79 const base::TimeDelta& rtcp_interval, | 80 const base::TimeDelta& rtcp_interval, |
| 80 uint32 local_ssrc, | 81 uint32 local_ssrc, |
| 81 uint32 remote_ssrc, | 82 uint32 remote_ssrc, |
| 82 const std::string& c_name); | 83 const std::string& c_name); |
| 83 | 84 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 void OnReceivedSendReportRequest(); | 135 void OnReceivedSendReportRequest(); |
| 135 | 136 |
| 136 void UpdateRtt(const base::TimeDelta& sender_delay, | 137 void UpdateRtt(const base::TimeDelta& sender_delay, |
| 137 const base::TimeDelta& receiver_delay); | 138 const base::TimeDelta& receiver_delay); |
| 138 | 139 |
| 139 void UpdateNextTimeToSendRtcp(); | 140 void UpdateNextTimeToSendRtcp(); |
| 140 | 141 |
| 141 void SaveLastSentNtpTime(const base::TimeTicks& now, uint32 last_ntp_seconds, | 142 void SaveLastSentNtpTime(const base::TimeTicks& now, uint32 last_ntp_seconds, |
| 142 uint32 last_ntp_fraction); | 143 uint32 last_ntp_fraction); |
| 143 | 144 |
| 144 base::TickClock* const clock_; // Not owned by this class. | 145 scoped_refptr<CastEnvironment> cast_environment_; |
| 145 const base::TimeDelta rtcp_interval_; | 146 const base::TimeDelta rtcp_interval_; |
| 146 const RtcpMode rtcp_mode_; | 147 const RtcpMode rtcp_mode_; |
| 147 const uint32 local_ssrc_; | 148 const uint32 local_ssrc_; |
| 148 const uint32 remote_ssrc_; | 149 const uint32 remote_ssrc_; |
| 149 | 150 |
| 150 // Not owned by this class. | 151 // Not owned by this class. |
| 151 RtpSenderStatistics* const rtp_sender_statistics_; | 152 RtpSenderStatistics* const rtp_sender_statistics_; |
| 152 RtpReceiverStatistics* const rtp_receiver_statistics_; | 153 RtpReceiverStatistics* const rtp_receiver_statistics_; |
| 153 | 154 |
| 154 scoped_ptr<LocalRtcpRttFeedback> rtt_feedback_; | 155 scoped_ptr<LocalRtcpRttFeedback> rtt_feedback_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 172 int number_of_rtt_in_avg_; | 173 int number_of_rtt_in_avg_; |
| 173 float avg_rtt_ms_; | 174 float avg_rtt_ms_; |
| 174 | 175 |
| 175 DISALLOW_COPY_AND_ASSIGN(Rtcp); | 176 DISALLOW_COPY_AND_ASSIGN(Rtcp); |
| 176 }; | 177 }; |
| 177 | 178 |
| 178 } // namespace cast | 179 } // namespace cast |
| 179 } // namespace media | 180 } // namespace media |
| 180 | 181 |
| 181 #endif // MEDIA_CAST_RTCP_RTCP_H_ | 182 #endif // MEDIA_CAST_RTCP_RTCP_H_ |
| OLD | NEW |