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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender.h

Issue 1639253007: Validates sending RTCP before RTP. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: adjusted RtpRtcpImplTest to comply with stricter conditions for Sender Report Created 4 years, 10 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 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 void SetCsrcs(const std::vector<uint32_t>& csrcs); 151 void SetCsrcs(const std::vector<uint32_t>& csrcs);
152 152
153 void SetTargetBitrate(unsigned int target_bitrate); 153 void SetTargetBitrate(unsigned int target_bitrate);
154 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); 154 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet);
155 155
156 private: 156 private:
157 class RtcpContext; 157 class RtcpContext;
158 158
159 // Determine which RTCP messages should be sent and setup flags. 159 // Determine which RTCP messages should be sent and setup flags.
160 void PrepareReport(const std::set<RTCPPacketType>& packetTypes, 160 void PrepareReport(const FeedbackState& feedback_state)
161 const FeedbackState& feedback_state)
162 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 161 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
163 162
164 bool AddReportBlock(const FeedbackState& feedback_state, 163 bool AddReportBlock(const FeedbackState& feedback_state,
165 uint32_t ssrc, 164 uint32_t ssrc,
166 StreamStatistician* statistician) 165 StreamStatistician* statistician)
167 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 166 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
168 167
169 rtc::scoped_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context) 168 rtc::scoped_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context)
170 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 169 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
171 rtc::scoped_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context) 170 rtc::scoped_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 298
300 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( 299 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)(
301 const RtcpContext&); 300 const RtcpContext&);
302 std::map<RTCPPacketType, BuilderFunc> builders_; 301 std::map<RTCPPacketType, BuilderFunc> builders_;
303 302
304 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); 303 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender);
305 }; 304 };
306 } // namespace webrtc 305 } // namespace webrtc
307 306
308 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ 307 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtcp_sender.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698