• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2016 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")
10import("audio_coding/audio_coding.gni")
11
12group("modules") {
13  deps = [
14    "audio_coding",
15    "audio_device",
16    "audio_mixer",
17    "audio_processing",
18    "congestion_controller",
19    "pacing",
20    "remote_bitrate_estimator",
21    "rtp_rtcp",
22    "utility",
23    "video_coding",
24    "video_processing",
25  ]
26
27  if (rtc_desktop_capture_supported) {
28    deps += [ "desktop_capture" ]
29  }
30}
31
32rtc_source_set("module_api_public") {
33  sources = [ "include/module_common_types_public.h" ]
34  deps = [ "..:webrtc_common" ]
35  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
36}
37
38rtc_library("module_api") {
39  visibility = [ "*" ]
40  sources = [
41    "include/module.h",
42    "include/module_common_types.cc",
43    "include/module_common_types.h",
44  ]
45  deps = [
46    "../rtc_base:safe_conversions",
47    "../rtc_base/system:rtc_export",
48  ]
49}
50
51rtc_source_set("module_fec_api") {
52  visibility = [ "*" ]
53  sources = [ "include/module_fec_types.h" ]
54}
55
56if (rtc_include_tests) {
57  modules_tests_resources = [
58    "../resources/audio_coding/testfile16kHz.pcm",
59    "../resources/audio_coding/testfile32kHz.pcm",
60    "../resources/audio_coding/teststereo32kHz.pcm",
61    "../resources/foreman_cif.yuv",
62  ]
63
64  if (is_ios) {
65    bundle_data("modules_tests_bundle_data") {
66      testonly = true
67      sources = modules_tests_resources
68      outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
69    }
70  }
71
72  rtc_test("modules_tests") {
73    testonly = true
74
75    deps = [
76      "../test:test_main",
77      "../test:video_test_common",
78      "audio_coding:audio_coding_modules_tests",
79      "rtp_rtcp:rtp_rtcp_modules_tests",
80      "video_coding:video_coding_modules_tests",
81      "//testing/gtest",
82    ]
83
84    if (rtc_desktop_capture_supported) {
85      deps += [ "desktop_capture:desktop_capture_modules_tests" ]
86    }
87
88    data = modules_tests_resources
89
90    if (is_android) {
91      deps += [
92        # NOTE(brandtr): Including Java classes seems only to be possible from
93        # rtc_test targets. Therefore we include this target here, instead of
94        # in video_coding_modules_tests, where it is actually used.
95        "../sdk/android:libjingle_peerconnection_java",
96        "//testing/android/native_test:native_test_native_code",
97      ]
98      shard_timeout = 900
99    }
100
101    if (is_ios) {
102      deps += [ ":modules_tests_bundle_data" ]
103    }
104  }
105
106  modules_unittests_resources = [
107    "../resources/audio_coding/neteq_opus.rtp",
108    "../resources/audio_coding/neteq_opus_dtx.rtp",
109    "../resources/audio_coding/neteq_universal_new.rtp",
110    "../resources/audio_coding/speech_4_channels_48k_one_second.wav",
111    "../resources/audio_coding/speech_mono_16kHz.pcm",
112    "../resources/audio_coding/speech_mono_32_48kHz.pcm",
113    "../resources/audio_coding/testfile16kHz.pcm",
114    "../resources/audio_coding/testfile32kHz.pcm",
115    "../resources/audio_coding/testfile_fake_stereo_32kHz.pcm",
116    "../resources/audio_coding/teststereo32kHz.pcm",
117    "../resources/audio_device/audio_short16.pcm",
118    "../resources/audio_device/audio_short44.pcm",
119    "../resources/audio_device/audio_short48.pcm",
120    "../resources/audio_processing/agc/agc_audio.pcm",
121    "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
122    "../resources/audio_processing/agc/agc_pitch_gain.dat",
123    "../resources/audio_processing/agc/agc_pitch_lag.dat",
124    "../resources/audio_processing/agc/agc_spectral_peak.dat",
125    "../resources/audio_processing/agc/agc_vad.dat",
126    "../resources/audio_processing/agc/agc_voicing_prob.dat",
127    "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
128    "../resources/audio_processing/output_data_fixed.pb",
129    "../resources/audio_processing/output_data_float.pb",
130    "../resources/audio_processing/output_data_mac.pb",
131    "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
132    "../resources/audio_processing/transient/audio16kHz.pcm",
133    "../resources/audio_processing/transient/audio32kHz.pcm",
134    "../resources/audio_processing/transient/audio48kHz.pcm",
135    "../resources/audio_processing/transient/audio8kHz.pcm",
136    "../resources/audio_processing/transient/detect16kHz.dat",
137    "../resources/audio_processing/transient/detect32kHz.dat",
138    "../resources/audio_processing/transient/detect48kHz.dat",
139    "../resources/audio_processing/transient/detect8kHz.dat",
140    "../resources/audio_processing/transient/double-utils.dat",
141    "../resources/audio_processing/transient/float-utils.dat",
142    "../resources/audio_processing/transient/suppressed16kHz.pcm",
143    "../resources/audio_processing/transient/suppressed32kHz.pcm",
144    "../resources/audio_processing/transient/suppressed8kHz.pcm",
145    "../resources/audio_processing/transient/wpd0.dat",
146    "../resources/audio_processing/transient/wpd1.dat",
147    "../resources/audio_processing/transient/wpd2.dat",
148    "../resources/audio_processing/transient/wpd3.dat",
149    "../resources/audio_processing/transient/wpd4.dat",
150    "../resources/audio_processing/transient/wpd5.dat",
151    "../resources/audio_processing/transient/wpd6.dat",
152    "../resources/audio_processing/transient/wpd7.dat",
153    "../resources/deflicker_before_cif_short.yuv",
154    "../resources/far16_stereo.pcm",
155    "../resources/far32_stereo.pcm",
156    "../resources/far44_stereo.pcm",
157    "../resources/far48_stereo.pcm",
158    "../resources/far8_stereo.pcm",
159    "../resources/foremanColorEnhanced_cif_short.yuv",
160    "../resources/foreman_cif.yuv",
161    "../resources/foreman_cif_short.yuv",
162    "../resources/near16_stereo.pcm",
163    "../resources/near32_stereo.pcm",
164    "../resources/near44_stereo.pcm",
165    "../resources/near48_stereo.pcm",
166    "../resources/near8_stereo.pcm",
167    "../resources/ref03.aecdump",
168    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
169    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
170    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
171    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
172    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
173    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
174    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
175    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
176    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
177    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
178    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
179    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
180    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
181    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
182    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
183    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
184    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
185    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
186    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
187    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
188    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
189    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
190    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
191    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
192    "../resources/short_mixed_mono_48.dat",
193    "../resources/short_mixed_mono_48.pcm",
194    "../resources/short_mixed_mono_48_arm.dat",
195    "../resources/short_mixed_stereo_48.dat",
196    "../resources/short_mixed_stereo_48.pcm",
197    "../resources/voice_engine/audio_tiny48.wav",
198  ]
199  if (is_ios) {
200    bundle_data("modules_unittests_bundle_data") {
201      testonly = true
202      sources = modules_unittests_resources
203      outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
204    }
205  }
206
207  rtc_test("modules_unittests") {
208    testonly = true
209    defines = []
210    sources = [ "module_common_types_unittest.cc" ]
211
212    deps = [
213      ":module_api",
214      ":module_api_public",
215      "../test:test_main",
216      "../test:test_support",
217      "audio_coding:audio_coding_unittests",
218      "audio_device:audio_device_unittests",
219      "audio_mixer:audio_mixer_unittests",
220      "audio_processing:audio_processing_unittests",
221      "audio_processing/aec3:aec3_unittests",
222      "audio_processing/ns:ns_unittests",
223      "congestion_controller:congestion_controller_unittests",
224      "pacing:pacing_unittests",
225      "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
226      "rtp_rtcp:rtp_rtcp_unittests",
227      "utility:utility_unittests",
228      "video_coding:video_coding_unittests",
229      "video_processing:video_processing_unittests",
230    ]
231
232    if (rtc_desktop_capture_supported) {
233      deps += [ "desktop_capture:desktop_capture_unittests" ]
234    }
235
236    data = modules_unittests_resources
237
238    if (is_android) {
239      deps += [
240        "../sdk/android:libjingle_peerconnection_java",
241        "//testing/android/native_test:native_test_support",
242      ]
243      shard_timeout = 900
244    }
245    if (is_ios) {
246      info_plist = "../test/ios/Info.plist"
247      deps += [ ":modules_unittests_bundle_data" ]
248      configs += [ "..:common_objc" ]
249      ldflags = [ "-ObjC" ]
250    }
251  }
252}
253