1# 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 = [ 13 "adaptation_constraint.cc", 14 "adaptation_constraint.h", 15 "adaptation_listener.cc", 16 "adaptation_listener.h", 17 "broadcast_resource_listener.cc", 18 "broadcast_resource_listener.h", 19 "degradation_preference_provider.cc", 20 "degradation_preference_provider.h", 21 "encoder_settings.cc", 22 "encoder_settings.h", 23 "resource_adaptation_processor.cc", 24 "resource_adaptation_processor.h", 25 "resource_adaptation_processor_interface.cc", 26 "resource_adaptation_processor_interface.h", 27 "video_source_restrictions.cc", 28 "video_source_restrictions.h", 29 "video_stream_adapter.cc", 30 "video_stream_adapter.h", 31 "video_stream_input_state.cc", 32 "video_stream_input_state.h", 33 "video_stream_input_state_provider.cc", 34 "video_stream_input_state_provider.h", 35 ] 36 deps = [ 37 "../../api:rtp_parameters", 38 "../../api:scoped_refptr", 39 "../../api/adaptation:resource_adaptation_api", 40 "../../api/task_queue:task_queue", 41 "../../api/video:video_adaptation", 42 "../../api/video:video_frame", 43 "../../api/video:video_stream_encoder", 44 "../../api/video_codecs:video_codecs_api", 45 "../../modules/video_coding:video_coding_utility", 46 "../../rtc_base:checks", 47 "../../rtc_base:rtc_base_approved", 48 "../../rtc_base:rtc_task_queue", 49 "../../rtc_base/experiments:balanced_degradation_settings", 50 "../../rtc_base/synchronization:mutex", 51 "../../rtc_base/synchronization:sequence_checker", 52 "../../rtc_base/task_utils:to_queued_task", 53 ] 54 absl_deps = [ 55 "//third_party/abseil-cpp/absl/algorithm:container", 56 "//third_party/abseil-cpp/absl/types:optional", 57 "//third_party/abseil-cpp/absl/types:variant", 58 ] 59} 60 61if (rtc_include_tests) { 62 rtc_library("resource_adaptation_tests") { 63 testonly = true 64 65 sources = [ 66 "broadcast_resource_listener_unittest.cc", 67 "resource_adaptation_processor_unittest.cc", 68 "resource_unittest.cc", 69 "video_source_restrictions_unittest.cc", 70 "video_stream_adapter_unittest.cc", 71 "video_stream_input_state_provider_unittest.cc", 72 ] 73 deps = [ 74 ":resource_adaptation", 75 ":resource_adaptation_test_utilities", 76 "../../api:scoped_refptr", 77 "../../api/adaptation:resource_adaptation_api", 78 "../../api/task_queue:default_task_queue_factory", 79 "../../api/task_queue:task_queue", 80 "../../api/video:video_adaptation", 81 "../../api/video_codecs:video_codecs_api", 82 "../../rtc_base:checks", 83 "../../rtc_base:gunit_helpers", 84 "../../rtc_base:rtc_base_approved", 85 "../../rtc_base:rtc_task_queue", 86 "../../rtc_base:task_queue_for_test", 87 "../../rtc_base/synchronization:mutex", 88 "../../test:field_trial", 89 "../../test:rtc_expect_death", 90 "../../test:test_support", 91 ] 92 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 93 } 94 95 rtc_source_set("resource_adaptation_test_utilities") { 96 testonly = true 97 98 sources = [ 99 "test/fake_adaptation_constraint.cc", 100 "test/fake_adaptation_constraint.h", 101 "test/fake_adaptation_listener.cc", 102 "test/fake_adaptation_listener.h", 103 "test/fake_frame_rate_provider.cc", 104 "test/fake_frame_rate_provider.h", 105 "test/fake_resource.cc", 106 "test/fake_resource.h", 107 "test/mock_resource_listener.h", 108 ] 109 deps = [ 110 ":resource_adaptation", 111 "../../api:scoped_refptr", 112 "../../api/adaptation:resource_adaptation_api", 113 "../../api/task_queue:task_queue", 114 "../../api/video:video_stream_encoder", 115 "../../rtc_base:rtc_base_approved", 116 "../../rtc_base/synchronization:sequence_checker", 117 "../../rtc_base/task_utils:to_queued_task", 118 "../../test:test_support", 119 ] 120 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 121 } 122} 123