OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_NET_RTCP_RTCP_BUILDER_H_ | 5 #ifndef MEDIA_CAST_NET_RTCP_RTCP_BUILDER_H_ |
6 #define MEDIA_CAST_NET_RTCP_RTCP_BUILDER_H_ | 6 #define MEDIA_CAST_NET_RTCP_RTCP_BUILDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 explicit RtcpBuilder(uint32_t sending_ssrc); | 27 explicit RtcpBuilder(uint32_t sending_ssrc); |
28 ~RtcpBuilder(); | 28 ~RtcpBuilder(); |
29 | 29 |
30 PacketRef BuildRtcpFromSender(const RtcpSenderInfo& sender_info); | 30 PacketRef BuildRtcpFromSender(const RtcpSenderInfo& sender_info); |
31 | 31 |
32 uint32_t local_ssrc() const { return local_ssrc_; } | 32 uint32_t local_ssrc() const { return local_ssrc_; } |
33 void AddRR(const RtcpReportBlock* report_block); | 33 void AddRR(const RtcpReportBlock* report_block); |
34 void AddRrtr(const RtcpReceiverReferenceTimeReport& rrtr); | 34 void AddRrtr(const RtcpReceiverReferenceTimeReport& rrtr); |
35 void AddCast(const RtcpCastMessage& cast_message, | 35 void AddCast(const RtcpCastMessage& cast_message, |
36 base::TimeDelta target_delay); | 36 base::TimeDelta target_delay); |
| 37 void AddPli(const RtcpPliMessage& pli_message); |
37 void AddReceiverLog( | 38 void AddReceiverLog( |
38 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events); | 39 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events); |
39 void Start(); | 40 void Start(); |
40 PacketRef Finish(); | 41 PacketRef Finish(); |
41 | 42 |
42 private: | 43 private: |
43 void AddRtcpHeader(RtcpPacketFields payload, int format_or_count); | 44 void AddRtcpHeader(RtcpPacketFields payload, int format_or_count); |
44 void PatchLengthField(); | 45 void PatchLengthField(); |
45 void AddSR(const RtcpSenderInfo& sender_info); | 46 void AddSR(const RtcpSenderInfo& sender_info); |
46 void AddDlrrRb(const RtcpDlrrReportBlock& dlrr); | 47 void AddDlrrRb(const RtcpDlrrReportBlock& dlrr); |
47 void AddReportBlocks(const RtcpReportBlock& report_block); | 48 void AddReportBlocks(const RtcpReportBlock& report_block); |
48 | 49 |
49 bool GetRtcpReceiverLogMessage( | 50 bool GetRtcpReceiverLogMessage( |
50 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events, | 51 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events, |
51 RtcpReceiverLogMessage* receiver_log_message, | 52 RtcpReceiverLogMessage* receiver_log_message, |
52 size_t* total_number_of_messages_to_send); | 53 size_t* total_number_of_messages_to_send); |
53 | 54 |
54 base::BigEndianWriter writer_; | 55 base::BigEndianWriter writer_; |
55 const uint32_t local_ssrc_; | 56 const uint32_t local_ssrc_; |
56 char* ptr_of_length_; | 57 char* ptr_of_length_; |
57 PacketRef packet_; | 58 PacketRef packet_; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(RtcpBuilder); | 60 DISALLOW_COPY_AND_ASSIGN(RtcpBuilder); |
60 }; | 61 }; |
61 | 62 |
62 } // namespace cast | 63 } // namespace cast |
63 } // namespace media | 64 } // namespace media |
64 | 65 |
65 #endif // MEDIA_CAST_NET_RTCP_RTCP_SENDER_H_ | 66 #endif // MEDIA_CAST_NET_RTCP_RTCP_SENDER_H_ |
OLD | NEW |