blob: 0288e247b4e03e94068dcf59f402d60ec87adf44 [file] [log] [blame]
Henrik Boströmb04b2a12019-12-10 14:14:09 +01001# Copyright (c) 2019 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("resource_adaptation") {
12 sources = [
Henrik Boströmb0f2e0c2020-03-06 13:32:03 +010013 "encoder_settings.cc",
14 "encoder_settings.h",
Henrik Boströmb04b2a12019-12-10 14:14:09 +010015 "resource.cc",
16 "resource.h",
Henrik Boström382cc6d2020-01-07 10:15:04 +010017 "resource_adaptation_module_interface.cc",
18 "resource_adaptation_module_interface.h",
Henrik Boströmb04b2a12019-12-10 14:14:09 +010019 "resource_adaptation_processor.cc",
20 "resource_adaptation_processor.h",
21 "resource_consumer.cc",
22 "resource_consumer.h",
23 "resource_consumer_configuration.cc",
24 "resource_consumer_configuration.h",
Henrik Boströmce0ea492020-01-13 11:27:18 +010025 "video_source_restrictions.cc",
26 "video_source_restrictions.h",
Henrik Boströmb04b2a12019-12-10 14:14:09 +010027 ]
28 deps = [
Henrik Boströma3d42522020-01-16 13:55:29 +010029 "../../api:rtp_parameters",
Henrik Boströmd4578ae2020-01-22 16:16:04 +010030 "../../api/video:video_frame",
Henrik Boström4bab2fc2020-01-21 11:18:06 +010031 "../../api/video_codecs:video_codecs_api",
Henrik Boströmb04b2a12019-12-10 14:14:09 +010032 "../../rtc_base:checks",
33 "../../rtc_base:rtc_base_approved",
Evan Shrubsoleaa6fbc12020-02-25 16:26:01 +010034 "//third_party/abseil-cpp/absl/algorithm:container",
Henrik Boströmb04b2a12019-12-10 14:14:09 +010035 "//third_party/abseil-cpp/absl/types:optional",
36 ]
37}
38
39if (rtc_include_tests) {
40 rtc_library("resource_adaptation_tests") {
41 testonly = true
42
Evan Shrubsoleaa6fbc12020-02-25 16:26:01 +010043 sources = [
44 "resource_adaptation_processor_unittest.cc",
45 "resource_unittest.cc",
46 ]
Henrik Boströmb04b2a12019-12-10 14:14:09 +010047 deps = [
48 ":resource_adaptation",
49 ":resource_adaptation_test_utilities",
50 "../../rtc_base:checks",
51 "../../rtc_base:rtc_base_approved",
52 "../../test:test_support",
53 "//third_party/abseil-cpp/absl/types:optional",
54 ]
55 }
56
57 rtc_source_set("resource_adaptation_test_utilities") {
58 testonly = true
59
60 sources = [
61 "test/fake_resource.cc",
62 "test/fake_resource.h",
63 "test/fake_resource_consumer_configuration.cc",
64 "test/fake_resource_consumer_configuration.h",
65 ]
66 deps = [
67 ":resource_adaptation",
68 "../../rtc_base:rtc_base_approved",
69 ]
70 }
71}