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}
This commit is contained in:
Yves Gerey
2018-06-19 15:03:05 +02:00
parent b602123a5a
commit 665174fdbb
1569 changed files with 30495 additions and 30309 deletions

View File

@ -89,7 +89,6 @@ RtpReceiverImpl::RtpReceiverImpl(Clock* clock,
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 @@ int32_t RtpReceiverImpl::RegisterReceivePayload(const VideoCodec& video_codec) {
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 @@ int32_t RtpReceiverImpl::CSRCs(uint32_t array_of_csrcs[kRtpCsrcSize]) const {
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 @@ bool RtpReceiverImpl::IncomingRtpPacket(const RTPHeader& rtp_header,
// 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 @@ int32_t RtpReceiverImpl::CheckPayloadChanged(const RTPHeader& rtp_header,
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 @@ void RtpReceiverImpl::CheckCSRC(const WebRtcRTPHeader& rtp_header) {
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;