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_SENDER_H_ | 5 #ifndef MEDIA_CAST_RTCP_RTCP_SENDER_H_ |
6 #define MEDIA_CAST_RTCP_RTCP_SENDER_H_ | 6 #define MEDIA_CAST_RTCP_RTCP_SENDER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 // TODO(mikhal): Resolve duplication between this and RtcpBuilder. | 21 // TODO(mikhal): Resolve duplication between this and RtcpBuilder. |
22 class RtcpSender { | 22 class RtcpSender { |
23 public: | 23 public: |
24 RtcpSender(scoped_refptr<CastEnvironment> cast_environment, | 24 RtcpSender(scoped_refptr<CastEnvironment> cast_environment, |
25 transport::PacedPacketSender* outgoing_transport, | 25 transport::PacedPacketSender* outgoing_transport, |
26 uint32 sending_ssrc, | 26 uint32 sending_ssrc, |
27 const std::string& c_name); | 27 const std::string& c_name); |
28 | 28 |
29 virtual ~RtcpSender(); | 29 virtual ~RtcpSender(); |
30 | 30 |
| 31 // Returns true if |event| is an interesting receiver event. |
| 32 // Such an event should be sent via RTCP. |
| 33 static bool IsReceiverEvent(const media::cast::CastLoggingEvent& event); |
| 34 |
31 void SendRtcpFromRtpReceiver(uint32 packet_type_flags, | 35 void SendRtcpFromRtpReceiver(uint32 packet_type_flags, |
32 const transport::RtcpReportBlock* report_block, | 36 const transport::RtcpReportBlock* report_block, |
33 const RtcpReceiverReferenceTimeReport* rrtr, | 37 const RtcpReceiverReferenceTimeReport* rrtr, |
34 const RtcpCastMessage* cast_message, | 38 const RtcpCastMessage* cast_message, |
35 RtcpReceiverLogMessage* receiver_log); | 39 RtcpReceiverLogMessage* receiver_log); |
36 enum RtcpPacketType { | 40 enum RtcpPacketType { |
37 kRtcpSr = 0x0002, | 41 kRtcpSr = 0x0002, |
38 kRtcpRr = 0x0004, | 42 kRtcpRr = 0x0004, |
39 kRtcpBye = 0x0008, | 43 kRtcpBye = 0x0008, |
40 kRtcpPli = 0x0010, | 44 kRtcpPli = 0x0010, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Not owned by this class. | 105 // Not owned by this class. |
102 transport::PacedPacketSender* const transport_; | 106 transport::PacedPacketSender* const transport_; |
103 scoped_refptr<CastEnvironment> cast_environment_; | 107 scoped_refptr<CastEnvironment> cast_environment_; |
104 | 108 |
105 DISALLOW_COPY_AND_ASSIGN(RtcpSender); | 109 DISALLOW_COPY_AND_ASSIGN(RtcpSender); |
106 }; | 110 }; |
107 | 111 |
108 } // namespace cast | 112 } // namespace cast |
109 } // namespace media | 113 } // namespace media |
110 #endif // MEDIA_CAST_RTCP_RTCP_SENDER_H_ | 114 #endif // MEDIA_CAST_RTCP_RTCP_SENDER_H_ |
OLD | NEW |