Reformat the WebRTC code base
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
diff --git a/modules/rtp_rtcp/source/rtp_receiver_impl.cc b/modules/rtp_rtcp/source/rtp_receiver_impl.cc
index fb2cc66..a0d201a 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_receiver_impl.cc
@@ -89,7 +89,6 @@
current_remote_csrc_(),
last_received_timestamp_(0),
last_received_frame_time_ms_(-1) {
-
memset(current_remote_csrc_, 0, sizeof(current_remote_csrc_));
}
@@ -122,8 +121,7 @@
return rtp_payload_registry_->RegisterReceivePayload(video_codec);
}
-int32_t RtpReceiverImpl::DeRegisterReceivePayload(
- const int8_t payload_type) {
+int32_t RtpReceiverImpl::DeRegisterReceivePayload(const int8_t payload_type) {
rtc::CritScope lock(&critical_section_rtp_receiver_);
return rtp_payload_registry_->DeRegisterReceivePayload(payload_type);
}
@@ -140,13 +138,12 @@
assert(num_csrcs_ <= kRtpCsrcSize);
if (num_csrcs_ > 0) {
- memcpy(array_of_csrcs, current_remote_csrc_, sizeof(uint32_t)*num_csrcs_);
+ memcpy(array_of_csrcs, current_remote_csrc_, sizeof(uint32_t) * num_csrcs_);
}
return num_csrcs_;
}
-int32_t RtpReceiverImpl::Energy(
- uint8_t array_of_energy[kRtpCsrcSize]) const {
+int32_t RtpReceiverImpl::Energy(uint8_t array_of_energy[kRtpCsrcSize]) const {
return rtp_media_receiver_->Energy(array_of_energy);
}
@@ -157,8 +154,7 @@
// Trigger our callbacks.
CheckSSRCChanged(rtp_header);
- if (CheckPayloadChanged(rtp_header,
- &payload_specific) == -1) {
+ if (CheckPayloadChanged(rtp_header, &payload_specific) == -1) {
if (payload_length == 0) {
// OK, keep-alive packet.
return true;
@@ -282,9 +278,8 @@
if (payload_type != last_received_payload_type) {
bool should_discard_changes = false;
- rtp_media_receiver_->CheckPayloadChanged(
- payload_type, specific_payload,
- &should_discard_changes);
+ rtp_media_receiver_->CheckPayloadChanged(payload_type, specific_payload,
+ &should_discard_changes);
if (should_discard_changes) {
return 0;
@@ -314,8 +309,7 @@
rtc::CritScope lock(&critical_section_rtp_receiver_);
// Copy new.
- memcpy(current_remote_csrc_,
- rtp_header.header.arrOfCSRCs,
+ memcpy(current_remote_csrc_, rtp_header.header.arrOfCSRCs,
num_csrcs * sizeof(uint32_t));
num_csrcs_ = num_csrcs;