Move TimestampExtrapolator closer to its single user

The `TimestampExtrapolator` is only used by the `VCMTiming`
class, despite there being references to it from both
`modules/rtp_rtcp/BUILD.gn` and `modules/video_coding/BUILD.gn`.

Bug: webrtc:14111
Change-Id: If1a02a56a0c83b13d619ca08dc76c884fa829369
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275482
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38093}
This commit is contained in:
Rasmus Brandt
2022-09-14 15:52:13 +02:00
committed by WebRTC LUCI CQ
parent 624f2eb1aa
commit bcf24f5bcd
10 changed files with 22 additions and 52 deletions

View File

@ -585,7 +585,6 @@ if (rtc_include_tests && !build_with_chromium) {
"rtc_base/experiments:experiments_unittests", "rtc_base/experiments:experiments_unittests",
"rtc_base/system:file_wrapper_unittests", "rtc_base/system:file_wrapper_unittests",
"rtc_base/task_utils:repeating_task_unittests", "rtc_base/task_utils:repeating_task_unittests",
"rtc_base/time:timestamp_extrapolator_unittests",
"rtc_base/units:units_unittests", "rtc_base/units:units_unittests",
"sdk:sdk_tests", "sdk:sdk_tests",
"test:rtp_test_utils", "test:rtp_test_utils",

View File

@ -319,7 +319,6 @@ rtc_library("rtp_rtcp") {
"../../rtc_base/synchronization:mutex", "../../rtc_base/synchronization:mutex",
"../../rtc_base/system:no_unique_address", "../../rtc_base/system:no_unique_address",
"../../rtc_base/task_utils:repeating_task", "../../rtc_base/task_utils:repeating_task",
"../../rtc_base/time:timestamp_extrapolator",
"../../system_wrappers", "../../system_wrappers",
"../../system_wrappers:metrics", "../../system_wrappers:metrics",
"../remote_bitrate_estimator", "../remote_bitrate_estimator",

View File

@ -292,7 +292,6 @@ rtc_library("video_coding") {
"../../rtc_base/system:no_unique_address", "../../rtc_base/system:no_unique_address",
"../../rtc_base/task_utils:repeating_task", "../../rtc_base/task_utils:repeating_task",
"../../rtc_base/third_party/base64", "../../rtc_base/third_party/base64",
"../../rtc_base/time:timestamp_extrapolator",
"../../system_wrappers", "../../system_wrappers",
"../../system_wrappers:field_trial", "../../system_wrappers:field_trial",
"../../system_wrappers:metrics", "../../system_wrappers:metrics",

View File

@ -84,6 +84,18 @@ rtc_library("rtt_filter") {
] ]
} }
rtc_library("timestamp_extrapolator") {
sources = [
"timestamp_extrapolator.cc",
"timestamp_extrapolator.h",
]
deps = [
"../../../api/units:timestamp",
"../../../modules:module_api_public",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("timing_module") { rtc_library("timing_module") {
sources = [ sources = [
"timing.cc", "timing.cc",
@ -91,6 +103,7 @@ rtc_library("timing_module") {
] ]
deps = [ deps = [
":codec_timer", ":codec_timer",
":timestamp_extrapolator",
"../../../api:field_trials_view", "../../../api:field_trials_view",
"../../../api/units:time_delta", "../../../api/units:time_delta",
"../../../api/video:video_frame", "../../../api/video:video_frame",
@ -100,7 +113,6 @@ rtc_library("timing_module") {
"../../../rtc_base:rtc_numerics", "../../../rtc_base:rtc_numerics",
"../../../rtc_base/experiments:field_trial_parser", "../../../rtc_base/experiments:field_trial_parser",
"../../../rtc_base/synchronization:mutex", "../../../rtc_base/synchronization:mutex",
"../../../rtc_base/time:timestamp_extrapolator",
"../../../system_wrappers", "../../../system_wrappers",
] ]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
@ -113,6 +125,7 @@ rtc_library("timing_unittests") {
"inter_frame_delay_unittest.cc", "inter_frame_delay_unittest.cc",
"jitter_estimator_unittest.cc", "jitter_estimator_unittest.cc",
"rtt_filter_unittest.cc", "rtt_filter_unittest.cc",
"timestamp_extrapolator_unittest.cc",
"timing_unittest.cc", "timing_unittest.cc",
] ]
deps = [ deps = [
@ -120,6 +133,7 @@ rtc_library("timing_unittests") {
":inter_frame_delay", ":inter_frame_delay",
":jitter_estimator", ":jitter_estimator",
":rtt_filter", ":rtt_filter",
":timestamp_extrapolator",
":timing_module", ":timing_module",
"../../../api:array_view", "../../../api:array_view",
"../../../api:field_trials", "../../../api:field_trials",

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "rtc_base/time/timestamp_extrapolator.h" #include "modules/video_coding/timing/timestamp_extrapolator.h"
#include <algorithm> #include <algorithm>

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef RTC_BASE_TIME_TIMESTAMP_EXTRAPOLATOR_H_ #ifndef MODULES_VIDEO_CODING_TIMING_TIMESTAMP_EXTRAPOLATOR_H_
#define RTC_BASE_TIME_TIMESTAMP_EXTRAPOLATOR_H_ #define MODULES_VIDEO_CODING_TIMING_TIMESTAMP_EXTRAPOLATOR_H_
#include <stdint.h> #include <stdint.h>
@ -45,4 +45,4 @@ class TimestampExtrapolator {
} // namespace webrtc } // namespace webrtc
#endif // RTC_BASE_TIME_TIMESTAMP_EXTRAPOLATOR_H_ #endif // MODULES_VIDEO_CODING_TIMING_TIMESTAMP_EXTRAPOLATOR_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "rtc_base/time/timestamp_extrapolator.h" #include "modules/video_coding/timing/timestamp_extrapolator.h"
#include <stdint.h> #include <stdint.h>

View File

@ -13,9 +13,9 @@
#include <algorithm> #include <algorithm>
#include "api/units/time_delta.h" #include "api/units/time_delta.h"
#include "modules/video_coding/timing/timestamp_extrapolator.h"
#include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/logging.h" #include "rtc_base/logging.h"
#include "rtc_base/time/timestamp_extrapolator.h"
#include "system_wrappers/include/clock.h" #include "system_wrappers/include/clock.h"
namespace webrtc { namespace webrtc {

View File

@ -19,10 +19,10 @@
#include "api/video/video_frame.h" #include "api/video/video_frame.h"
#include "api/video/video_timing.h" #include "api/video/video_timing.h"
#include "modules/video_coding/timing/codec_timer.h" #include "modules/video_coding/timing/codec_timer.h"
#include "modules/video_coding/timing/timestamp_extrapolator.h"
#include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h" #include "rtc_base/thread_annotations.h"
#include "rtc_base/time/timestamp_extrapolator.h"
namespace webrtc { namespace webrtc {

View File

@ -1,41 +0,0 @@
# Copyright (c) 2018 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")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
rtc_library("timestamp_extrapolator") {
sources = [
"timestamp_extrapolator.cc",
"timestamp_extrapolator.h",
]
deps = [
"../../api/units:timestamp",
"../../modules:module_api_public",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
if (rtc_include_tests) {
rtc_library("timestamp_extrapolator_unittests") {
testonly = true
sources = [ "timestamp_extrapolator_unittest.cc" ]
deps = [
":timestamp_extrapolator",
"../../api/units:frequency",
"../../api/units:time_delta",
"../../api/units:timestamp",
"../../system_wrappers",
"../../test:test_support",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
}