From 9ffd8fe96b6f7126420200ac78317756e855f1f1 Mon Sep 17 00:00:00 2001 From: "asapersson@webrtc.org" Date: Wed, 21 Jan 2015 08:22:50 +0000 Subject: [PATCH] Indentation changes. R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/32149004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8107 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/rtp_rtcp/source/rtcp_sender.h | 80 +++++++++---------- .../modules/rtp_rtcp/source/rtp_rtcp_impl.cc | 9 +-- .../modules/rtp_rtcp/source/rtp_rtcp_impl.h | 33 ++++---- 3 files changed, 59 insertions(+), 63 deletions(-) diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h index 255d8adce3..874adbfa77 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h +++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h @@ -31,24 +31,22 @@ namespace webrtc { class ModuleRtpRtcpImpl; class RTCPReceiver; -class NACKStringBuilder -{ -public: - NACKStringBuilder(); - ~NACKStringBuilder(); +class NACKStringBuilder { + public: + NACKStringBuilder(); + ~NACKStringBuilder(); - void PushNACK(uint16_t nack); - std::string GetResult(); + void PushNACK(uint16_t nack); + std::string GetResult(); -private: - std::ostringstream _stream; - int _count; - uint16_t _prevNack; - bool _consecutive; + private: + std::ostringstream _stream; + int _count; + uint16_t _prevNack; + bool _consecutive; }; -class RTCPSender -{ +class RTCPSender { public: struct FeedbackState { FeedbackState(); @@ -120,8 +118,8 @@ public: uint64_t pictureID = 0); int32_t AddExternalReportBlock( - uint32_t SSRC, - const RTCPReportBlock* receiveBlock); + uint32_t SSRC, + const RTCPReportBlock* receiveBlock); int32_t RemoveExternalReportBlock(uint32_t SSRC); @@ -269,24 +267,24 @@ private: EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPSender); private: - const int32_t _id; - const bool _audio; - Clock* const _clock; - RTCPMethod _method GUARDED_BY(_criticalSectionRTCPSender); + const int32_t _id; + const bool _audio; + Clock* const _clock; + RTCPMethod _method GUARDED_BY(_criticalSectionRTCPSender); CriticalSectionWrapper* _criticalSectionTransport; - Transport* _cbTransport GUARDED_BY(_criticalSectionTransport); + Transport* _cbTransport GUARDED_BY(_criticalSectionTransport); CriticalSectionWrapper* _criticalSectionRTCPSender; - bool _usingNack GUARDED_BY(_criticalSectionRTCPSender); - bool _sending GUARDED_BY(_criticalSectionRTCPSender); - bool _sendTMMBN GUARDED_BY(_criticalSectionRTCPSender); - bool _REMB GUARDED_BY(_criticalSectionRTCPSender); - bool _sendREMB GUARDED_BY(_criticalSectionRTCPSender); - bool _TMMBR GUARDED_BY(_criticalSectionRTCPSender); - bool _IJ GUARDED_BY(_criticalSectionRTCPSender); + bool _usingNack GUARDED_BY(_criticalSectionRTCPSender); + bool _sending GUARDED_BY(_criticalSectionRTCPSender); + bool _sendTMMBN GUARDED_BY(_criticalSectionRTCPSender); + bool _REMB GUARDED_BY(_criticalSectionRTCPSender); + bool _sendREMB GUARDED_BY(_criticalSectionRTCPSender); + bool _TMMBR GUARDED_BY(_criticalSectionRTCPSender); + bool _IJ GUARDED_BY(_criticalSectionRTCPSender); - int64_t _nextTimeToSendRTCP GUARDED_BY(_criticalSectionRTCPSender); + int64_t _nextTimeToSendRTCP GUARDED_BY(_criticalSectionRTCPSender); uint32_t start_timestamp_ GUARDED_BY(_criticalSectionRTCPSender); uint32_t last_rtp_timestamp_ GUARDED_BY(_criticalSectionRTCPSender); @@ -305,7 +303,7 @@ private: std::map _csrcCNAMEs GUARDED_BY(_criticalSectionRTCPSender); - int32_t _cameraDelayMS GUARDED_BY(_criticalSectionRTCPSender); + int32_t _cameraDelayMS GUARDED_BY(_criticalSectionRTCPSender); // Sent uint32_t _lastSendReport[RTCP_NUMBER_OF_SR] GUARDED_BY( @@ -322,22 +320,22 @@ private: std::vector csrcs_ GUARDED_BY(_criticalSectionRTCPSender); // Full intra request - uint8_t _sequenceNumberFIR GUARDED_BY(_criticalSectionRTCPSender); + uint8_t _sequenceNumberFIR GUARDED_BY(_criticalSectionRTCPSender); // REMB - uint32_t _rembBitrate GUARDED_BY(_criticalSectionRTCPSender); - std::vector remb_ssrcs_ GUARDED_BY(_criticalSectionRTCPSender); + uint32_t _rembBitrate GUARDED_BY(_criticalSectionRTCPSender); + std::vector remb_ssrcs_ GUARDED_BY(_criticalSectionRTCPSender); - TMMBRHelp _tmmbrHelp GUARDED_BY(_criticalSectionRTCPSender); - uint32_t _tmmbr_Send GUARDED_BY(_criticalSectionRTCPSender); - uint32_t _packetOH_Send GUARDED_BY(_criticalSectionRTCPSender); + TMMBRHelp _tmmbrHelp GUARDED_BY(_criticalSectionRTCPSender); + uint32_t _tmmbr_Send GUARDED_BY(_criticalSectionRTCPSender); + uint32_t _packetOH_Send GUARDED_BY(_criticalSectionRTCPSender); // APP - bool _appSend GUARDED_BY(_criticalSectionRTCPSender); - uint8_t _appSubType GUARDED_BY(_criticalSectionRTCPSender); - uint32_t _appName GUARDED_BY(_criticalSectionRTCPSender); - uint8_t* _appData GUARDED_BY(_criticalSectionRTCPSender); - uint16_t _appLength GUARDED_BY(_criticalSectionRTCPSender); + bool _appSend GUARDED_BY(_criticalSectionRTCPSender); + uint8_t _appSubType GUARDED_BY(_criticalSectionRTCPSender); + uint32_t _appName GUARDED_BY(_criticalSectionRTCPSender); + uint8_t* _appData GUARDED_BY(_criticalSectionRTCPSender); + uint16_t _appLength GUARDED_BY(_criticalSectionRTCPSender); // True if sending of XR Receiver reference time report is enabled. bool xrSendReceiverReferenceTimeEnabled_ diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index ba8ad0b897..2792273842 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -289,8 +289,7 @@ int32_t ModuleRtpRtcpImpl::RegisterSendPayload( (voice_codec.rate < 0) ? 0 : voice_codec.rate); } -int32_t ModuleRtpRtcpImpl::RegisterSendPayload( - const VideoCodec& video_codec) { +int32_t ModuleRtpRtcpImpl::RegisterSendPayload(const VideoCodec& video_codec) { send_video_codec_ = video_codec; { // simulcast_ is accessed when accessing child_modules_, so this write needs @@ -305,8 +304,7 @@ int32_t ModuleRtpRtcpImpl::RegisterSendPayload( video_codec.maxBitrate); } -int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload( - const int8_t payload_type) { +int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload(const int8_t payload_type) { return rtp_sender_.DeRegisterSendPayload(payload_type); } @@ -960,8 +958,7 @@ bool ModuleRtpRtcpImpl::TimeToSendFullNackList(int64_t now) const { return now - nack_last_time_sent_full_prev_ > wait_time; } -// Store the sent packets, needed to answer to a Negative acknowledgment -// requests. +// Store the sent packets, needed to answer to Negative acknowledgment requests. void ModuleRtpRtcpImpl::SetStorePacketsStatus(const bool enable, const uint16_t number_to_store) { rtp_sender_.SetStorePacketsStatus(enable, number_to_store); diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h index 73eb034b89..ae8ba150e8 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h @@ -120,6 +120,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp { uint16_t sequence_number, int64_t capture_time_ms, bool retransmission) OVERRIDE; + // Returns the number of padding bytes actually sent, which can be more or // less than |bytes|. virtual size_t TimeToSendPadding(size_t bytes) OVERRIDE; @@ -286,7 +287,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp { virtual int32_t SendRTCPSliceLossIndication(uint8_t picture_id) OVERRIDE; - // Set method for requestion a new key frame. + // Set method for requesting a new key frame. virtual int32_t SetKeyFrameRequestMethod( KeyFrameRequestMethod method) OVERRIDE; @@ -367,12 +368,12 @@ class ModuleRtpRtcpImpl : public RtpRtcp { // Only for internal testing. uint32_t LastSendReport(int64_t& last_rtcptime); - RTPSender rtp_sender_; + RTPSender rtp_sender_; - RTCPSender rtcp_sender_; - RTCPReceiver rtcp_receiver_; + RTCPSender rtcp_sender_; + RTCPReceiver rtcp_receiver_; - Clock* clock_; + Clock* clock_; private: FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, Rtt); @@ -387,28 +388,28 @@ class ModuleRtpRtcpImpl : public RtpRtcp { bool IsDefaultModule() const; - int32_t id_; - const bool audio_; - bool collision_detected_; - int64_t last_process_time_; - int64_t last_bitrate_process_time_; - int64_t last_rtt_process_time_; - uint16_t packet_overhead_; + int32_t id_; + const bool audio_; + bool collision_detected_; + int64_t last_process_time_; + int64_t last_bitrate_process_time_; + int64_t last_rtt_process_time_; + uint16_t packet_overhead_; scoped_ptr critical_section_module_ptrs_; scoped_ptr critical_section_module_ptrs_feedback_; - ModuleRtpRtcpImpl* default_module_; + ModuleRtpRtcpImpl* default_module_; std::vector child_modules_; size_t padding_index_; // Send side - NACKMethod nack_method_; + NACKMethod nack_method_; int64_t nack_last_time_sent_full_; uint32_t nack_last_time_sent_full_prev_; uint16_t nack_last_seq_number_sent_; - bool simulcast_; - VideoCodec send_video_codec_; + bool simulcast_; + VideoCodec send_video_codec_; KeyFrameRequestMethod key_frame_req_method_; RemoteBitrateEstimator* remote_bitrate_;