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

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

Issue 2747743002: Add accessor functions for protected member variables of ModuleRtpRtcpImpl. (Closed)
Patch Set: Made the clock_ member and clock() accessor const. Created 3 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
« no previous file with comments | « no previous file | no next file » | 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 const std::vector<uint16_t>& nack_sequence_numbers) override; 305 const std::vector<uint16_t>& nack_sequence_numbers) override;
306 void OnReceivedRtcpReportBlocks( 306 void OnReceivedRtcpReportBlocks(
307 const ReportBlockList& report_blocks) override; 307 const ReportBlockList& report_blocks) override;
308 void OnRequestSendReport() override; 308 void OnRequestSendReport() override;
309 309
310 void SetVideoBitrateAllocation(const BitrateAllocation& bitrate) override; 310 void SetVideoBitrateAllocation(const BitrateAllocation& bitrate) override;
311 311
312 protected: 312 protected:
313 bool UpdateRTCPReceiveInformationTimers(); 313 bool UpdateRTCPReceiveInformationTimers();
314 314
315 RTPSender* rtp_sender() { return &rtp_sender_; }
316 const RTPSender* rtp_sender() const { return &rtp_sender_; }
317
318 RTCPSender* rtcp_sender() { return &rtcp_sender_; }
319 const RTCPSender* rtcp_sender() const { return &rtcp_sender_; }
320
321 RTCPReceiver* rtcp_receiver() { return &rtcp_receiver_; }
322 const RTCPReceiver* rtcp_receiver() const { return &rtcp_receiver_; }
323
324 const Clock* clock() const { return clock_; }
325
326 // TODO(nisse): Demote all member variables to private, as soon as
327 // downstream code is updated to use the above accessor methods.
315 RTPSender rtp_sender_; 328 RTPSender rtp_sender_;
316 329
317 RTCPSender rtcp_sender_; 330 RTCPSender rtcp_sender_;
318 RTCPReceiver rtcp_receiver_; 331 RTCPReceiver rtcp_receiver_;
319 332
320 Clock* clock_; 333 const Clock* const clock_;
321 334
322 private: 335 private:
323 FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, Rtt); 336 FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, Rtt);
324 FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, RttForReceiverOnly); 337 FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, RttForReceiverOnly);
325 int64_t RtcpReportInterval(); 338 int64_t RtcpReportInterval();
326 void SetRtcpReceiverSsrcs(uint32_t main_ssrc); 339 void SetRtcpReceiverSsrcs(uint32_t main_ssrc);
327 340
328 void set_rtt_ms(int64_t rtt_ms); 341 void set_rtt_ms(int64_t rtt_ms);
329 int64_t rtt_ms() const; 342 int64_t rtt_ms() const;
330 343
(...skipping 20 matching lines...) Expand all
351 PacketLossStats receive_loss_stats_; 364 PacketLossStats receive_loss_stats_;
352 365
353 // The processed RTT from RtcpRttStats. 366 // The processed RTT from RtcpRttStats.
354 rtc::CriticalSection critical_section_rtt_; 367 rtc::CriticalSection critical_section_rtt_;
355 int64_t rtt_ms_; 368 int64_t rtt_ms_;
356 }; 369 };
357 370
358 } // namespace webrtc 371 } // namespace webrtc
359 372
360 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_ 373 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698