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

Unified Diff: webrtc/video/rtp_streams_synchronizer.cc

Issue 2435053004: Use NtpTime in RtcpMeasurement instead of uint sec/uint frac. (Closed)
Patch Set: address comment Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video/rtp_streams_synchronizer.cc
diff --git a/webrtc/video/rtp_streams_synchronizer.cc b/webrtc/video/rtp_streams_synchronizer.cc
index 3bc208fe99e5bf67b4f6ba4f25f402afdb539295..d7fd949fff7634cf5fc0b202990279274c9c1f4e 100644
--- a/webrtc/video/rtp_streams_synchronizer.cc
+++ b/webrtc/video/rtp_streams_synchronizer.cc
@@ -24,28 +24,29 @@
namespace webrtc {
namespace {
-int UpdateMeasurements(StreamSynchronization::Measurements* stream,
- RtpRtcp* rtp_rtcp, RtpReceiver* receiver) {
+bool UpdateMeasurements(StreamSynchronization::Measurements* stream,
+ RtpRtcp* rtp_rtcp,
+ RtpReceiver* receiver) {
if (!receiver->Timestamp(&stream->latest_timestamp))
- return -1;
+ return false;
if (!receiver->LastReceivedTimeMs(&stream->latest_receive_time_ms))
- return -1;
+ return false;
uint32_t ntp_secs = 0;
uint32_t ntp_frac = 0;
uint32_t rtp_timestamp = 0;
if (rtp_rtcp->RemoteNTP(&ntp_secs, &ntp_frac, nullptr, nullptr,
&rtp_timestamp) != 0) {
- return -1;
+ return false;
}
bool new_rtcp_sr = false;
if (!UpdateRtcpList(ntp_secs, ntp_frac, rtp_timestamp, &stream->rtcp,
&new_rtcp_sr)) {
- return -1;
+ return false;
}
- return 0;
+ return true;
}
} // namespace
@@ -124,13 +125,13 @@ void RtpStreamsSynchronizer::Process() {
playout_buffer_delay_ms;
int64_t last_video_receive_ms = video_measurement_.latest_receive_time_ms;
- if (UpdateMeasurements(&video_measurement_, video_rtp_rtcp_,
- video_rtp_receiver_) != 0) {
+ if (!UpdateMeasurements(&video_measurement_, video_rtp_rtcp_,
+ video_rtp_receiver_)) {
return;
}
- if (UpdateMeasurements(&audio_measurement_, audio_rtp_rtcp_,
- audio_rtp_receiver_) != 0) {
+ if (!UpdateMeasurements(&audio_measurement_, audio_rtp_rtcp_,
+ audio_rtp_receiver_)) {
return;
}
« no previous file with comments | « webrtc/system_wrappers/source/rtp_to_ntp_unittest.cc ('k') | webrtc/video/stream_synchronization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698