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

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: fix lint error Created 4 years, 5 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
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/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 /* 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 void SetCsrcs(const std::vector<uint32_t>& csrcs); 150 void SetCsrcs(const std::vector<uint32_t>& csrcs);
151 151
152 void SetTargetBitrate(unsigned int target_bitrate); 152 void SetTargetBitrate(unsigned int target_bitrate);
153 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); 153 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet);
154 154
155 private: 155 private:
156 class RtcpContext; 156 class RtcpContext;
157 157
158 // Determine which RTCP messages should be sent and setup flags. 158 // Determine which RTCP messages should be sent and setup flags.
159 void PrepareReport(const std::set<RTCPPacketType>& packetTypes, 159 void PrepareReport(const FeedbackState& feedback_state)
160 const FeedbackState& feedback_state)
161 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 160 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
162 161
163 bool AddReportBlock(const FeedbackState& feedback_state, 162 bool AddReportBlock(const FeedbackState& feedback_state,
164 uint32_t ssrc, 163 uint32_t ssrc,
165 StreamStatistician* statistician) 164 StreamStatistician* statistician)
166 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 165 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
167 166
168 std::unique_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context) 167 std::unique_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context)
169 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 168 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
170 std::unique_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context) 169 std::unique_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 288
290 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( 289 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)(
291 const RtcpContext&); 290 const RtcpContext&);
292 std::map<RTCPPacketType, BuilderFunc> builders_; 291 std::map<RTCPPacketType, BuilderFunc> builders_;
293 292
294 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); 293 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender);
295 }; 294 };
296 } // namespace webrtc 295 } // namespace webrtc
297 296
298 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ 297 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698