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:
@ -25,10 +25,9 @@ bool UpdateMeasurements(StreamSynchronization::Measurements* stream,
|
||||
stream->latest_timestamp = info.latest_received_capture_timestamp;
|
||||
stream->latest_receive_time_ms = info.latest_receive_time_ms;
|
||||
bool new_rtcp_sr = false;
|
||||
if (!stream->rtp_to_ntp.UpdateMeasurements(info.capture_time_ntp_secs,
|
||||
info.capture_time_ntp_frac,
|
||||
info.capture_time_source_clock,
|
||||
&new_rtcp_sr)) {
|
||||
if (!stream->rtp_to_ntp.UpdateMeasurements(
|
||||
info.capture_time_ntp_secs, info.capture_time_ntp_frac,
|
||||
info.capture_time_source_clock, &new_rtcp_sr)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -63,7 +62,7 @@ int64_t RtpStreamsSynchronizer::TimeUntilNextProcess() {
|
||||
RTC_DCHECK_RUN_ON(&process_thread_checker_);
|
||||
const int64_t kSyncIntervalMs = 1000;
|
||||
return kSyncIntervalMs -
|
||||
(rtc::TimeNanos() - last_sync_time_) / rtc::kNumNanosecsPerMillisec;
|
||||
(rtc::TimeNanos() - last_sync_time_) / rtc::kNumNanosecsPerMillisec;
|
||||
}
|
||||
|
||||
void RtpStreamsSynchronizer::Process() {
|
||||
@ -100,18 +99,16 @@ void RtpStreamsSynchronizer::Process() {
|
||||
}
|
||||
|
||||
TRACE_COUNTER1("webrtc", "SyncCurrentVideoDelay",
|
||||
video_info->current_delay_ms);
|
||||
video_info->current_delay_ms);
|
||||
TRACE_COUNTER1("webrtc", "SyncCurrentAudioDelay",
|
||||
audio_info->current_delay_ms);
|
||||
audio_info->current_delay_ms);
|
||||
TRACE_COUNTER1("webrtc", "SyncRelativeDelay", relative_delay_ms);
|
||||
int target_audio_delay_ms = 0;
|
||||
int target_video_delay_ms = video_info->current_delay_ms;
|
||||
// Calculate the necessary extra audio delay and desired total video
|
||||
// delay to get the streams in sync.
|
||||
if (!sync_->ComputeDelays(relative_delay_ms,
|
||||
audio_info->current_delay_ms,
|
||||
&target_audio_delay_ms,
|
||||
&target_video_delay_ms)) {
|
||||
if (!sync_->ComputeDelays(relative_delay_ms, audio_info->current_delay_ms,
|
||||
&target_audio_delay_ms, &target_video_delay_ms)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user