Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: media/cast/net/rtcp/rtcp_builder.h

Issue 1709863002: Add Cast PLI support on sender side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and addressed comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 24
25 class RtcpBuilder { 25 class RtcpBuilder {
26 public: 26 public:
27 explicit RtcpBuilder(uint32_t sending_ssrc); 27 explicit RtcpBuilder(uint32_t sending_ssrc);
28 ~RtcpBuilder(); 28 ~RtcpBuilder();
29 29
30 PacketRef BuildRtcpFromReceiver( 30 PacketRef BuildRtcpFromReceiver(
31 const RtcpReportBlock* report_block, 31 const RtcpReportBlock* report_block,
32 const RtcpReceiverReferenceTimeReport* rrtr, 32 const RtcpReceiverReferenceTimeReport* rrtr,
33 const RtcpCastMessage* cast_message, 33 const RtcpCastMessage* cast_message,
34 const RtcpPliMessage* pli_message,
34 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events, 35 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events,
35 base::TimeDelta target_delay); 36 base::TimeDelta target_delay);
36 37
37 PacketRef BuildRtcpFromSender(const RtcpSenderInfo& sender_info); 38 PacketRef BuildRtcpFromSender(const RtcpSenderInfo& sender_info);
38 39
39 private: 40 private:
40 void AddRtcpHeader(RtcpPacketFields payload, int format_or_count); 41 void AddRtcpHeader(RtcpPacketFields payload, int format_or_count);
41 void PatchLengthField(); 42 void PatchLengthField();
42 void AddRR(const RtcpReportBlock* report_block); 43 void AddRR(const RtcpReportBlock* report_block);
43 void AddReportBlocks(const RtcpReportBlock& report_block); 44 void AddReportBlocks(const RtcpReportBlock& report_block);
44 void AddRrtr(const RtcpReceiverReferenceTimeReport* rrtr); 45 void AddRrtr(const RtcpReceiverReferenceTimeReport* rrtr);
45 void AddCast(const RtcpCastMessage* cast_message, 46 void AddCast(const RtcpCastMessage* cast_message,
46 base::TimeDelta target_delay); 47 base::TimeDelta target_delay);
47 void AddSR(const RtcpSenderInfo& sender_info); 48 void AddSR(const RtcpSenderInfo& sender_info);
48 void AddDlrrRb(const RtcpDlrrReportBlock& dlrr); 49 void AddDlrrRb(const RtcpDlrrReportBlock& dlrr);
49 void AddReceiverLog( 50 void AddReceiverLog(
50 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events); 51 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events);
52 void AddPli(const RtcpPliMessage* pli_message);
51 53
52 bool GetRtcpReceiverLogMessage( 54 bool GetRtcpReceiverLogMessage(
53 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events, 55 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events,
54 RtcpReceiverLogMessage* receiver_log_message, 56 RtcpReceiverLogMessage* receiver_log_message,
55 size_t* total_number_of_messages_to_send); 57 size_t* total_number_of_messages_to_send);
56 58
57 void Start(); 59 void Start();
58 PacketRef Finish(); 60 PacketRef Finish();
59 61
60 base::BigEndianWriter writer_; 62 base::BigEndianWriter writer_;
61 const uint32_t ssrc_; 63 const uint32_t ssrc_;
62 char* ptr_of_length_; 64 char* ptr_of_length_;
63 PacketRef packet_; 65 PacketRef packet_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(RtcpBuilder); 67 DISALLOW_COPY_AND_ASSIGN(RtcpBuilder);
66 }; 68 };
67 69
68 } // namespace cast 70 } // namespace cast
69 } // namespace media 71 } // namespace media
70 72
71 #endif // MEDIA_CAST_NET_RTCP_RTCP_SENDER_H_ 73 #endif // MEDIA_CAST_NET_RTCP_RTCP_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698