| 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 <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/time/tick_clock.h" | 15 #include "base/time/tick_clock.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "media/cast/cast_config.h" | 17 #include "media/cast/cast_config.h" |
| 18 #include "media/cast/cast_defines.h" | 18 #include "media/cast/cast_defines.h" |
| 19 #include "media/cast/cast_environment.h" |
| 19 #include "media/cast/rtcp/rtcp_defines.h" | 20 #include "media/cast/rtcp/rtcp_defines.h" |
| 20 | 21 |
| 21 namespace media { | 22 namespace media { |
| 22 namespace cast { | 23 namespace cast { |
| 23 | 24 |
| 24 class LocalRtcpReceiverFeedback; | 25 class LocalRtcpReceiverFeedback; |
| 25 class LocalRtcpRttFeedback; | 26 class LocalRtcpRttFeedback; |
| 26 class PacedPacketSender; | 27 class PacedPacketSender; |
| 27 class RtcpReceiver; | 28 class RtcpReceiver; |
| 28 class RtcpSender; | 29 class RtcpSender; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 virtual void GetStatistics(uint8* fraction_lost, | 48 virtual void GetStatistics(uint8* fraction_lost, |
| 48 uint32* cumulative_lost, // 24 bits valid. | 49 uint32* cumulative_lost, // 24 bits valid. |
| 49 uint32* extended_high_sequence_number, | 50 uint32* extended_high_sequence_number, |
| 50 uint32* jitter) = 0; | 51 uint32* jitter) = 0; |
| 51 | 52 |
| 52 virtual ~RtpReceiverStatistics() {} | 53 virtual ~RtpReceiverStatistics() {} |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 class Rtcp { | 56 class Rtcp { |
| 56 public: | 57 public: |
| 57 Rtcp(base::TickClock* clock, | 58 Rtcp(scoped_refptr<CastEnvironment> cast_environment, |
| 58 RtcpSenderFeedback* sender_feedback, | 59 RtcpSenderFeedback* sender_feedback, |
| 59 PacedPacketSender* paced_packet_sender, | 60 PacedPacketSender* paced_packet_sender, |
| 60 RtpSenderStatistics* rtp_sender_statistics, | 61 RtpSenderStatistics* rtp_sender_statistics, |
| 61 RtpReceiverStatistics* rtp_receiver_statistics, | 62 RtpReceiverStatistics* rtp_receiver_statistics, |
| 62 RtcpMode rtcp_mode, | 63 RtcpMode rtcp_mode, |
| 63 const base::TimeDelta& rtcp_interval, | 64 const base::TimeDelta& rtcp_interval, |
| 64 bool sending_media, | 65 bool sending_media, |
| 65 uint32 local_ssrc, | 66 uint32 local_ssrc, |
| 66 const std::string& c_name); | 67 const std::string& c_name); |
| 67 | 68 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 uint32 last_report, | 108 uint32 last_report, |
| 108 uint32 delay_since_last_report); | 109 uint32 delay_since_last_report); |
| 109 | 110 |
| 110 void OnReceivedSendReportRequest(); | 111 void OnReceivedSendReportRequest(); |
| 111 | 112 |
| 112 void UpdateRtt(const base::TimeDelta& sender_delay, | 113 void UpdateRtt(const base::TimeDelta& sender_delay, |
| 113 const base::TimeDelta& receiver_delay); | 114 const base::TimeDelta& receiver_delay); |
| 114 | 115 |
| 115 void UpdateNextTimeToSendRtcp(); | 116 void UpdateNextTimeToSendRtcp(); |
| 116 | 117 |
| 117 base::TickClock* const clock_; // Not owned by this class. | 118 scoped_refptr<CastEnvironment> cast_environment_; |
| 118 const base::TimeDelta rtcp_interval_; | 119 const base::TimeDelta rtcp_interval_; |
| 119 const RtcpMode rtcp_mode_; | 120 const RtcpMode rtcp_mode_; |
| 120 const bool sending_media_; | 121 const bool sending_media_; |
| 121 const uint32 local_ssrc_; | 122 const uint32 local_ssrc_; |
| 122 | 123 |
| 123 // Not owned by this class. | 124 // Not owned by this class. |
| 124 RtpSenderStatistics* const rtp_sender_statistics_; | 125 RtpSenderStatistics* const rtp_sender_statistics_; |
| 125 RtpReceiverStatistics* const rtp_receiver_statistics_; | 126 RtpReceiverStatistics* const rtp_receiver_statistics_; |
| 126 | 127 |
| 127 scoped_ptr<LocalRtcpRttFeedback> rtt_feedback_; | 128 scoped_ptr<LocalRtcpRttFeedback> rtt_feedback_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 147 int number_of_rtt_in_avg_; | 148 int number_of_rtt_in_avg_; |
| 148 float avg_rtt_ms_; | 149 float avg_rtt_ms_; |
| 149 | 150 |
| 150 DISALLOW_COPY_AND_ASSIGN(Rtcp); | 151 DISALLOW_COPY_AND_ASSIGN(Rtcp); |
| 151 }; | 152 }; |
| 152 | 153 |
| 153 } // namespace cast | 154 } // namespace cast |
| 154 } // namespace media | 155 } // namespace media |
| 155 | 156 |
| 156 #endif // MEDIA_CAST_RTCP_RTCP_H_ | 157 #endif // MEDIA_CAST_RTCP_RTCP_H_ |
| OLD | NEW |