Commit graph

8 commits

Author SHA1 Message Date
Paul Hallak
cab90db24a Delete NtpOffsetMs and TimeMicrosToNtp methods.
This consolidates the querying of the Ntp time in once place, the clock.

Bug: webrtc:11327
Change-Id: I14b19c2380996571d8c67c2c186629c209787162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219794
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Paul Hallak <phallak@google.com>
Cr-Commit-Position: refs/heads/master@{#34083}
2021-05-21 19:32:42 +00:00
Danil Chapovalov
856cf22996 In ReceiveStatistics use monotonic clock instead of ntp clock
for all time difference calculations.

Bug: None
Change-Id: I37f4a3c73ab275e661bedf991a471a1c2928180a
Reviewed-on: https://webrtc-review.googlesource.com/c/111884
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25782}
2018-11-26 10:31:44 +00:00
Ilya Nikolaevskiy
88c2c50dbd Use monotonic clock to derive NTP timestamps in RTCP module
Use helper TimeMicrosToNtp() on clock TimeInMicroseconds()
instead of CurrentNtpTime() and CurrentNtpTimeMillis()

Also update TimeMicrosToNtp() to not introduce fractional in
milliseconds offset. Expose that offset in time_utils.h

Add test showing indended behavior.

Bug: webrtc:9919
Change-Id: I8b019e11ae5b79d0b8ba113a84066b0369cd2575
Reviewed-on: https://webrtc-review.googlesource.com/c/107889
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25391}
2018-10-26 14:30:28 +00:00
Danil Chapovalov
89c79383e4 Delete assumption TimeMicrosToNtp can match RealTimeClock
Flakiness of the test reveals this assumption doesn't hold and shouldn't be rely on.
Currently there is no code that use it. Plans to rely on it silently adjusted.

Bug: webrtc:8610
Change-Id: Id24f2a36c8fb188b518f5301c4b278836885d140
Reviewed-on: https://webrtc-review.googlesource.com/56860
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22160}
2018-02-22 17:20:25 +00:00
Danil Chapovalov
2492984441 Add TimeMicrosToNtp to calculate current NtpTime without Clock
Bug: webrtc:6733, webrtc:8239
Change-Id: I8ac4464cd7a7ec2b2dbad44430f1141a80ba39c1
Reviewed-on: https://webrtc-review.googlesource.com/25541
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20904}
2017-11-28 10:11:58 +00:00
Danil Chapovalov
d4fdc27b91 Introduce MicrosecondsToCompactNtp function
webrtc clocks use 10based fraction time to calculate intervals.
Rtcp require 16based fraction time to report intervals.

Bug: webrtc:8239
Change-Id: I25cab5ad7b7614c86c174813a195e7ba767ee43b
Reviewed-on: https://webrtc-review.googlesource.com/21383
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20619}
2017-11-09 12:44:22 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/rtp_rtcp/source/time_util.h (Browse further)