TimestampExtrapolator maps RTP timestamps of received video frames to local timestamps. As part of this mapping, the clock drift between the local and remote clock is estimated. Add the histogram WebRTC.Video.EstimatedClockDrift_ppm to log the relative clock drift in points per million. Bug: b/363166487 Change-Id: I0c2e628ef72c05a93e1f3138c8f71c77467130b7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368342 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Johannes Kron <kron@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43413}
149 lines
4.0 KiB
Plaintext
149 lines
4.0 KiB
Plaintext
# Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license
|
|
# that can be found in the LICENSE file in the root of the source
|
|
# tree. An additional intellectual property rights grant can be found
|
|
# in the file PATENTS. All contributing project authors may
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
import("../../../webrtc.gni")
|
|
|
|
rtc_library("decode_time_percentile_filter") {
|
|
sources = [
|
|
"decode_time_percentile_filter.cc",
|
|
"decode_time_percentile_filter.h",
|
|
]
|
|
deps = [ "../../../rtc_base:rtc_numerics" ]
|
|
}
|
|
|
|
rtc_library("inter_frame_delay_variation_calculator") {
|
|
sources = [
|
|
"inter_frame_delay_variation_calculator.cc",
|
|
"inter_frame_delay_variation_calculator.h",
|
|
]
|
|
deps = [
|
|
"../..:module_api_public",
|
|
"../../../api/units:frequency",
|
|
"../../../api/units:time_delta",
|
|
"../../../api/units:timestamp",
|
|
"../../../rtc_base:rtc_numerics",
|
|
]
|
|
}
|
|
|
|
rtc_library("frame_delay_variation_kalman_filter") {
|
|
sources = [
|
|
"frame_delay_variation_kalman_filter.cc",
|
|
"frame_delay_variation_kalman_filter.h",
|
|
]
|
|
deps = [
|
|
"../../../api/units:data_size",
|
|
"../../../api/units:time_delta",
|
|
]
|
|
visibility = [
|
|
":jitter_estimator",
|
|
":timing_unittests",
|
|
]
|
|
}
|
|
|
|
rtc_library("jitter_estimator") {
|
|
sources = [
|
|
"jitter_estimator.cc",
|
|
"jitter_estimator.h",
|
|
]
|
|
deps = [
|
|
":frame_delay_variation_kalman_filter",
|
|
":rtt_filter",
|
|
"../../../api:field_trials_view",
|
|
"../../../api/units:data_size",
|
|
"../../../api/units:frequency",
|
|
"../../../api/units:time_delta",
|
|
"../../../api/units:timestamp",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:logging",
|
|
"../../../rtc_base:rolling_accumulator",
|
|
"../../../rtc_base:rtc_numerics",
|
|
"../../../rtc_base:safe_conversions",
|
|
"../../../rtc_base/experiments:field_trial_parser",
|
|
"../../../system_wrappers",
|
|
"//third_party/abseil-cpp/absl/strings:string_view",
|
|
]
|
|
}
|
|
|
|
rtc_library("rtt_filter") {
|
|
sources = [
|
|
"rtt_filter.cc",
|
|
"rtt_filter.h",
|
|
]
|
|
deps = [
|
|
"../../../api/units:time_delta",
|
|
"//third_party/abseil-cpp/absl/algorithm:container",
|
|
"//third_party/abseil-cpp/absl/container:inlined_vector",
|
|
]
|
|
}
|
|
|
|
rtc_library("timestamp_extrapolator") {
|
|
sources = [
|
|
"timestamp_extrapolator.cc",
|
|
"timestamp_extrapolator.h",
|
|
]
|
|
deps = [
|
|
"../../../api/units:timestamp",
|
|
"../../../modules:module_api_public",
|
|
"../../../rtc_base:rtc_numerics",
|
|
"../../../system_wrappers:metrics",
|
|
]
|
|
}
|
|
|
|
rtc_library("timing_module") {
|
|
sources = [
|
|
"timing.cc",
|
|
"timing.h",
|
|
]
|
|
deps = [
|
|
":decode_time_percentile_filter",
|
|
":timestamp_extrapolator",
|
|
"../../../api:field_trials_view",
|
|
"../../../api/units:time_delta",
|
|
"../../../api/video:video_frame",
|
|
"../../../api/video:video_rtp_headers",
|
|
"../../../rtc_base:logging",
|
|
"../../../rtc_base:macromagic",
|
|
"../../../rtc_base:rtc_numerics",
|
|
"../../../rtc_base/experiments:field_trial_parser",
|
|
"../../../rtc_base/synchronization:mutex",
|
|
"../../../system_wrappers",
|
|
]
|
|
}
|
|
|
|
rtc_library("timing_unittests") {
|
|
testonly = true
|
|
sources = [
|
|
"frame_delay_variation_kalman_filter_unittest.cc",
|
|
"inter_frame_delay_variation_calculator_unittest.cc",
|
|
"jitter_estimator_unittest.cc",
|
|
"rtt_filter_unittest.cc",
|
|
"timestamp_extrapolator_unittest.cc",
|
|
"timing_unittest.cc",
|
|
]
|
|
deps = [
|
|
":frame_delay_variation_kalman_filter",
|
|
":inter_frame_delay_variation_calculator",
|
|
":jitter_estimator",
|
|
":rtt_filter",
|
|
":timestamp_extrapolator",
|
|
":timing_module",
|
|
"../../../api:array_view",
|
|
"../../../api:field_trials",
|
|
"../../../api/units:data_size",
|
|
"../../../api/units:frequency",
|
|
"../../../api/units:time_delta",
|
|
"../../../api/units:timestamp",
|
|
"../../../rtc_base:histogram_percentile_counter",
|
|
"../../../rtc_base:timeutils",
|
|
"../../../system_wrappers:metrics",
|
|
"../../../system_wrappers:system_wrappers",
|
|
"../../../test:scoped_key_value_config",
|
|
"../../../test:test_support",
|
|
]
|
|
}
|