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

Side by Side Diff: media/cast/rtcp/rtcp_sender.h

Issue 192843002: Cast:Adding signaling and infrastructure for adjustable delay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/rtcp/rtcp_receiver_unittest.cc ('k') | media/cast/rtcp/rtcp_sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 28 matching lines...) Expand all
39 39
40 // Returns true if |event| is an interesting receiver event. 40 // Returns true if |event| is an interesting receiver event.
41 // Such an event should be sent via RTCP. 41 // Such an event should be sent via RTCP.
42 static bool IsReceiverEvent(const media::cast::CastLoggingEvent& event); 42 static bool IsReceiverEvent(const media::cast::CastLoggingEvent& event);
43 43
44 void SendRtcpFromRtpReceiver( 44 void SendRtcpFromRtpReceiver(
45 uint32 packet_type_flags, 45 uint32 packet_type_flags,
46 const transport::RtcpReportBlock* report_block, 46 const transport::RtcpReportBlock* report_block,
47 const RtcpReceiverReferenceTimeReport* rrtr, 47 const RtcpReceiverReferenceTimeReport* rrtr,
48 const RtcpCastMessage* cast_message, 48 const RtcpCastMessage* cast_message,
49 const ReceiverRtcpEventSubscriber* event_subscriber); 49 const ReceiverRtcpEventSubscriber* event_subscriber,
50 enum RtcpPacketType { 50 uint16 target_delay_ms);
51 kRtcpSr = 0x0002,
52 kRtcpRr = 0x0004,
53 kRtcpBye = 0x0008,
54 kRtcpPli = 0x0010,
55 kRtcpNack = 0x0020,
56 kRtcpFir = 0x0040,
57 kRtcpSrReq = 0x0200,
58 kRtcpDlrr = 0x0400,
59 kRtcpRrtr = 0x0800,
60 kRtcpRpsi = 0x8000,
61 kRtcpRemb = 0x10000,
62 kRtcpCast = 0x20000,
63 kRtcpSenderLog = 0x40000,
64 kRtcpReceiverLog = 0x80000,
65 };
66 51
67 private: 52 private:
68 void BuildRR(const transport::RtcpReportBlock* report_block, 53 void BuildRR(const transport::RtcpReportBlock* report_block,
69 Packet* packet) const; 54 Packet* packet) const;
70 55
71 void AddReportBlocks(const transport::RtcpReportBlock& report_block, 56 void AddReportBlocks(const transport::RtcpReportBlock& report_block,
72 Packet* packet) const; 57 Packet* packet) const;
73 58
74 void BuildSdec(Packet* packet) const; 59 void BuildSdec(Packet* packet) const;
75 60
76 void BuildPli(uint32 remote_ssrc, Packet* packet) const; 61 void BuildPli(uint32 remote_ssrc, Packet* packet) const;
77 62
78 void BuildRemb(const RtcpRembMessage* remb, Packet* packet) const; 63 void BuildRemb(const RtcpRembMessage* remb, Packet* packet) const;
79 64
80 void BuildRpsi(const RtcpRpsiMessage* rpsi, Packet* packet) const; 65 void BuildRpsi(const RtcpRpsiMessage* rpsi, Packet* packet) const;
81 66
82 void BuildNack(const RtcpNackMessage* nack, Packet* packet) const; 67 void BuildNack(const RtcpNackMessage* nack, Packet* packet) const;
83 68
84 void BuildBye(Packet* packet) const; 69 void BuildBye(Packet* packet) const;
85 70
86 void BuildRrtr(const RtcpReceiverReferenceTimeReport* rrtr, 71 void BuildRrtr(const RtcpReceiverReferenceTimeReport* rrtr,
87 Packet* packet) const; 72 Packet* packet) const;
88 73
89 void BuildCast(const RtcpCastMessage* cast_message, Packet* packet) const; 74 void BuildCast(const RtcpCastMessage* cast_message,
75 uint16 target_delay_ms,
76 Packet* packet) const;
90 77
91 void BuildReceiverLog( 78 void BuildReceiverLog(
92 const ReceiverRtcpEventSubscriber::RtcpEventMultiMap& rtcp_events, 79 const ReceiverRtcpEventSubscriber::RtcpEventMultiMap& rtcp_events,
93 Packet* packet) const; 80 Packet* packet) const;
94 81
95 inline void BitrateToRembExponentBitrate(uint32 bitrate, 82 inline void BitrateToRembExponentBitrate(uint32 bitrate,
96 uint8* exponent, 83 uint8* exponent,
97 uint32* mantissa) const { 84 uint32* mantissa) const {
98 // 6 bit exponent and a 18 bit mantissa. 85 // 6 bit exponent and a 18 bit mantissa.
99 *exponent = 0; 86 *exponent = 0;
(...skipping 12 matching lines...) Expand all
112 // Not owned by this class. 99 // Not owned by this class.
113 transport::PacedPacketSender* const transport_; 100 transport::PacedPacketSender* const transport_;
114 scoped_refptr<CastEnvironment> cast_environment_; 101 scoped_refptr<CastEnvironment> cast_environment_;
115 102
116 DISALLOW_COPY_AND_ASSIGN(RtcpSender); 103 DISALLOW_COPY_AND_ASSIGN(RtcpSender);
117 }; 104 };
118 105
119 } // namespace cast 106 } // namespace cast
120 } // namespace media 107 } // namespace media
121 #endif // MEDIA_CAST_RTCP_RTCP_SENDER_H_ 108 #endif // MEDIA_CAST_RTCP_RTCP_SENDER_H_
OLDNEW
« no previous file with comments | « media/cast/rtcp/rtcp_receiver_unittest.cc ('k') | media/cast/rtcp/rtcp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698