xref: /aosp_15_r20/external/webrtc/modules/video_coding/timing/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1# Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS.  All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../../webrtc.gni")
10
11rtc_library("codec_timer") {
12  sources = [
13    "codec_timer.cc",
14    "codec_timer.h",
15  ]
16  deps = [ "../../../rtc_base:rtc_numerics" ]
17}
18
19rtc_library("inter_frame_delay") {
20  sources = [
21    "inter_frame_delay.cc",
22    "inter_frame_delay.h",
23  ]
24  deps = [
25    "../..:module_api_public",
26    "../../../api/units:frequency",
27    "../../../api/units:time_delta",
28    "../../../api/units:timestamp",
29  ]
30  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
31}
32
33rtc_library("frame_delay_variation_kalman_filter") {
34  sources = [
35    "frame_delay_variation_kalman_filter.cc",
36    "frame_delay_variation_kalman_filter.h",
37  ]
38  deps = [
39    "../../../api/units:data_size",
40    "../../../api/units:time_delta",
41  ]
42  visibility = [
43    ":jitter_estimator",
44    ":timing_unittests",
45  ]
46}
47
48rtc_library("jitter_estimator") {
49  sources = [
50    "jitter_estimator.cc",
51    "jitter_estimator.h",
52  ]
53  deps = [
54    ":frame_delay_variation_kalman_filter",
55    ":rtt_filter",
56    "../../../api:field_trials_view",
57    "../../../api/units:data_size",
58    "../../../api/units:frequency",
59    "../../../api/units:time_delta",
60    "../../../api/units:timestamp",
61    "../../../rtc_base",
62    "../../../rtc_base:checks",
63    "../../../rtc_base:logging",
64    "../../../rtc_base:rtc_numerics",
65    "../../../rtc_base:safe_conversions",
66    "../../../rtc_base/experiments:field_trial_parser",
67    "../../../system_wrappers",
68  ]
69  absl_deps = [
70    "//third_party/abseil-cpp/absl/strings",
71    "//third_party/abseil-cpp/absl/types:optional",
72  ]
73}
74
75rtc_library("rtt_filter") {
76  sources = [
77    "rtt_filter.cc",
78    "rtt_filter.h",
79  ]
80  deps = [ "../../../api/units:time_delta" ]
81  absl_deps = [
82    "//third_party/abseil-cpp/absl/algorithm:container",
83    "//third_party/abseil-cpp/absl/container:inlined_vector",
84  ]
85}
86
87rtc_library("timestamp_extrapolator") {
88  sources = [
89    "timestamp_extrapolator.cc",
90    "timestamp_extrapolator.h",
91  ]
92  deps = [
93    "../../../api/units:timestamp",
94    "../../../modules:module_api_public",
95  ]
96  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
97}
98
99rtc_library("timing_module") {
100  sources = [
101    "timing.cc",
102    "timing.h",
103  ]
104  deps = [
105    ":codec_timer",
106    ":timestamp_extrapolator",
107    "../../../api:field_trials_view",
108    "../../../api/units:time_delta",
109    "../../../api/video:video_frame",
110    "../../../api/video:video_rtp_headers",
111    "../../../rtc_base:logging",
112    "../../../rtc_base:macromagic",
113    "../../../rtc_base:rtc_numerics",
114    "../../../rtc_base/experiments:field_trial_parser",
115    "../../../rtc_base/synchronization:mutex",
116    "../../../system_wrappers",
117  ]
118  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
119}
120
121rtc_library("timing_unittests") {
122  testonly = true
123  sources = [
124    "frame_delay_variation_kalman_filter_unittest.cc",
125    "inter_frame_delay_unittest.cc",
126    "jitter_estimator_unittest.cc",
127    "rtt_filter_unittest.cc",
128    "timestamp_extrapolator_unittest.cc",
129    "timing_unittest.cc",
130  ]
131  deps = [
132    ":frame_delay_variation_kalman_filter",
133    ":inter_frame_delay",
134    ":jitter_estimator",
135    ":rtt_filter",
136    ":timestamp_extrapolator",
137    ":timing_module",
138    "../../../api:array_view",
139    "../../../api:field_trials",
140    "../../../api/units:data_size",
141    "../../../api/units:frequency",
142    "../../../api/units:time_delta",
143    "../../../api/units:timestamp",
144    "../../../rtc_base:histogram_percentile_counter",
145    "../../../rtc_base:timeutils",
146    "../../../system_wrappers:system_wrappers",
147    "../../../test:scoped_key_value_config",
148    "../../../test:test_support",
149  ]
150  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
151}
152