xref: /aosp_15_r20/external/webrtc/call/adaptation/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker# Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
2*d9f75844SAndroid Build Coastguard Worker#
3*d9f75844SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license
4*d9f75844SAndroid Build Coastguard Worker# that can be found in the LICENSE file in the root of the source
5*d9f75844SAndroid Build Coastguard Worker# tree. An additional intellectual property rights grant can be found
6*d9f75844SAndroid Build Coastguard Worker# in the file PATENTS.  All contributing project authors may
7*d9f75844SAndroid Build Coastguard Worker# be found in the AUTHORS file in the root of the source tree.
8*d9f75844SAndroid Build Coastguard Worker
9*d9f75844SAndroid Build Coastguard Workerimport("../../webrtc.gni")
10*d9f75844SAndroid Build Coastguard Worker
11*d9f75844SAndroid Build Coastguard Workerrtc_library("resource_adaptation") {
12*d9f75844SAndroid Build Coastguard Worker  sources = [
13*d9f75844SAndroid Build Coastguard Worker    "adaptation_constraint.cc",
14*d9f75844SAndroid Build Coastguard Worker    "adaptation_constraint.h",
15*d9f75844SAndroid Build Coastguard Worker    "broadcast_resource_listener.cc",
16*d9f75844SAndroid Build Coastguard Worker    "broadcast_resource_listener.h",
17*d9f75844SAndroid Build Coastguard Worker    "degradation_preference_provider.cc",
18*d9f75844SAndroid Build Coastguard Worker    "degradation_preference_provider.h",
19*d9f75844SAndroid Build Coastguard Worker    "encoder_settings.cc",
20*d9f75844SAndroid Build Coastguard Worker    "encoder_settings.h",
21*d9f75844SAndroid Build Coastguard Worker    "resource_adaptation_processor.cc",
22*d9f75844SAndroid Build Coastguard Worker    "resource_adaptation_processor.h",
23*d9f75844SAndroid Build Coastguard Worker    "resource_adaptation_processor_interface.cc",
24*d9f75844SAndroid Build Coastguard Worker    "resource_adaptation_processor_interface.h",
25*d9f75844SAndroid Build Coastguard Worker    "video_source_restrictions.cc",
26*d9f75844SAndroid Build Coastguard Worker    "video_source_restrictions.h",
27*d9f75844SAndroid Build Coastguard Worker    "video_stream_adapter.cc",
28*d9f75844SAndroid Build Coastguard Worker    "video_stream_adapter.h",
29*d9f75844SAndroid Build Coastguard Worker    "video_stream_input_state.cc",
30*d9f75844SAndroid Build Coastguard Worker    "video_stream_input_state.h",
31*d9f75844SAndroid Build Coastguard Worker    "video_stream_input_state_provider.cc",
32*d9f75844SAndroid Build Coastguard Worker    "video_stream_input_state_provider.h",
33*d9f75844SAndroid Build Coastguard Worker  ]
34*d9f75844SAndroid Build Coastguard Worker  deps = [
35*d9f75844SAndroid Build Coastguard Worker    "../../api:field_trials_view",
36*d9f75844SAndroid Build Coastguard Worker    "../../api:make_ref_counted",
37*d9f75844SAndroid Build Coastguard Worker    "../../api:rtp_parameters",
38*d9f75844SAndroid Build Coastguard Worker    "../../api:scoped_refptr",
39*d9f75844SAndroid Build Coastguard Worker    "../../api:sequence_checker",
40*d9f75844SAndroid Build Coastguard Worker    "../../api/adaptation:resource_adaptation_api",
41*d9f75844SAndroid Build Coastguard Worker    "../../api/task_queue:task_queue",
42*d9f75844SAndroid Build Coastguard Worker    "../../api/video:video_adaptation",
43*d9f75844SAndroid Build Coastguard Worker    "../../api/video:video_frame",
44*d9f75844SAndroid Build Coastguard Worker    "../../api/video:video_stream_encoder",
45*d9f75844SAndroid Build Coastguard Worker    "../../api/video_codecs:video_codecs_api",
46*d9f75844SAndroid Build Coastguard Worker    "../../modules/video_coding:video_coding_utility",
47*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base:checks",
48*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base:logging",
49*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base:macromagic",
50*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base:refcount",
51*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base:rtc_task_queue",
52*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base:safe_conversions",
53*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base:stringutils",
54*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base/experiments:balanced_degradation_settings",
55*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base/synchronization:mutex",
56*d9f75844SAndroid Build Coastguard Worker    "../../rtc_base/system:no_unique_address",
57*d9f75844SAndroid Build Coastguard Worker    "../../video:video_stream_encoder_interface",
58*d9f75844SAndroid Build Coastguard Worker    "../../video/config:encoder_config",
59*d9f75844SAndroid Build Coastguard Worker  ]
60*d9f75844SAndroid Build Coastguard Worker  absl_deps = [
61*d9f75844SAndroid Build Coastguard Worker    "//third_party/abseil-cpp/absl/algorithm:container",
62*d9f75844SAndroid Build Coastguard Worker    "//third_party/abseil-cpp/absl/strings",
63*d9f75844SAndroid Build Coastguard Worker    "//third_party/abseil-cpp/absl/types:optional",
64*d9f75844SAndroid Build Coastguard Worker    "//third_party/abseil-cpp/absl/types:variant",
65*d9f75844SAndroid Build Coastguard Worker  ]
66*d9f75844SAndroid Build Coastguard Worker}
67*d9f75844SAndroid Build Coastguard Worker
68*d9f75844SAndroid Build Coastguard Workerif (rtc_include_tests) {
69*d9f75844SAndroid Build Coastguard Worker  rtc_library("resource_adaptation_tests") {
70*d9f75844SAndroid Build Coastguard Worker    testonly = true
71*d9f75844SAndroid Build Coastguard Worker
72*d9f75844SAndroid Build Coastguard Worker    sources = [
73*d9f75844SAndroid Build Coastguard Worker      "broadcast_resource_listener_unittest.cc",
74*d9f75844SAndroid Build Coastguard Worker      "resource_adaptation_processor_unittest.cc",
75*d9f75844SAndroid Build Coastguard Worker      "resource_unittest.cc",
76*d9f75844SAndroid Build Coastguard Worker      "video_source_restrictions_unittest.cc",
77*d9f75844SAndroid Build Coastguard Worker      "video_stream_adapter_unittest.cc",
78*d9f75844SAndroid Build Coastguard Worker      "video_stream_input_state_provider_unittest.cc",
79*d9f75844SAndroid Build Coastguard Worker    ]
80*d9f75844SAndroid Build Coastguard Worker    deps = [
81*d9f75844SAndroid Build Coastguard Worker      ":resource_adaptation",
82*d9f75844SAndroid Build Coastguard Worker      ":resource_adaptation_test_utilities",
83*d9f75844SAndroid Build Coastguard Worker      "../../api:scoped_refptr",
84*d9f75844SAndroid Build Coastguard Worker      "../../api/adaptation:resource_adaptation_api",
85*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue:default_task_queue_factory",
86*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue:task_queue",
87*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_adaptation",
88*d9f75844SAndroid Build Coastguard Worker      "../../api/video_codecs:video_codecs_api",
89*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
90*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:gunit_helpers",
91*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:rtc_event",
92*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:rtc_task_queue",
93*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:stringutils",
94*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:task_queue_for_test",
95*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base/synchronization:mutex",
96*d9f75844SAndroid Build Coastguard Worker      "../../test:field_trial",
97*d9f75844SAndroid Build Coastguard Worker      "../../test:rtc_expect_death",
98*d9f75844SAndroid Build Coastguard Worker      "../../test:scoped_key_value_config",
99*d9f75844SAndroid Build Coastguard Worker      "../../test:test_support",
100*d9f75844SAndroid Build Coastguard Worker      "../../video/config:encoder_config",
101*d9f75844SAndroid Build Coastguard Worker    ]
102*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
103*d9f75844SAndroid Build Coastguard Worker  }
104*d9f75844SAndroid Build Coastguard Worker
105*d9f75844SAndroid Build Coastguard Worker  rtc_source_set("resource_adaptation_test_utilities") {
106*d9f75844SAndroid Build Coastguard Worker    testonly = true
107*d9f75844SAndroid Build Coastguard Worker
108*d9f75844SAndroid Build Coastguard Worker    sources = [
109*d9f75844SAndroid Build Coastguard Worker      "test/fake_adaptation_constraint.cc",
110*d9f75844SAndroid Build Coastguard Worker      "test/fake_adaptation_constraint.h",
111*d9f75844SAndroid Build Coastguard Worker      "test/fake_frame_rate_provider.cc",
112*d9f75844SAndroid Build Coastguard Worker      "test/fake_frame_rate_provider.h",
113*d9f75844SAndroid Build Coastguard Worker      "test/fake_resource.cc",
114*d9f75844SAndroid Build Coastguard Worker      "test/fake_resource.h",
115*d9f75844SAndroid Build Coastguard Worker      "test/fake_video_stream_input_state_provider.cc",
116*d9f75844SAndroid Build Coastguard Worker      "test/fake_video_stream_input_state_provider.h",
117*d9f75844SAndroid Build Coastguard Worker      "test/mock_resource_listener.h",
118*d9f75844SAndroid Build Coastguard Worker    ]
119*d9f75844SAndroid Build Coastguard Worker    deps = [
120*d9f75844SAndroid Build Coastguard Worker      ":resource_adaptation",
121*d9f75844SAndroid Build Coastguard Worker      "../../api:make_ref_counted",
122*d9f75844SAndroid Build Coastguard Worker      "../../api:scoped_refptr",
123*d9f75844SAndroid Build Coastguard Worker      "../../api:sequence_checker",
124*d9f75844SAndroid Build Coastguard Worker      "../../api/adaptation:resource_adaptation_api",
125*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue:task_queue",
126*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_stream_encoder",
127*d9f75844SAndroid Build Coastguard Worker      "../../test:test_support",
128*d9f75844SAndroid Build Coastguard Worker      "../../video:video_stream_encoder_interface",
129*d9f75844SAndroid Build Coastguard Worker      "../../video/config:encoder_config",
130*d9f75844SAndroid Build Coastguard Worker    ]
131*d9f75844SAndroid Build Coastguard Worker    absl_deps = [
132*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/strings",
133*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/types:optional",
134*d9f75844SAndroid Build Coastguard Worker    ]
135*d9f75844SAndroid Build Coastguard Worker  }
136*d9f75844SAndroid Build Coastguard Worker}
137