blob: 18d6084f1130f352626cec189fb1dbf68d3ac55c [file] [log] [blame]
skvladcc91d282016-10-03 18:31:22 -07001# 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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
skvladcc91d282016-10-03 18:31:22 -070010import("//third_party/protobuf/proto_library.gni")
11if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
14}
15
kjellander6ceab082016-10-28 05:44:03 -070016group("logging") {
17 public_deps = [
18 ":rtc_event_log_impl",
19 ]
20 if (rtc_enable_protobuf) {
21 public_deps += [ ":rtc_event_log_parser" ]
22 }
23}
24
skvladcc91d282016-10-03 18:31:22 -070025rtc_source_set("rtc_event_log_api") {
26 sources = [
27 "rtc_event_log/rtc_event_log.h",
zhihuang38ede132017-06-15 12:52:32 -070028 "rtc_event_log/rtc_event_log_factory_interface.h",
eladalon4bb3b9c2017-09-11 07:25:26 -070029 "rtc_event_log/rtc_stream_config.cc",
30 "rtc_event_log/rtc_stream_config.h",
skvladcc91d282016-10-03 18:31:22 -070031 ]
kjellander727ac1d2017-03-08 02:12:11 -080032 deps = [
perkj77cd58e2017-05-30 03:52:10 -070033 "..:webrtc_common",
Stefan Holmer1acbd682017-09-01 15:29:28 +020034 "../api:libjingle_peerconnection_api",
aleloi440b6d92017-08-22 05:43:23 -070035 "../call:video_stream_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070036 "../rtc_base:rtc_base_approved",
kjellander727ac1d2017-03-08 02:12:11 -080037 ]
skvladcc91d282016-10-03 18:31:22 -070038}
39
40rtc_static_library("rtc_event_log_impl") {
41 sources = [
skvladcc91d282016-10-03 18:31:22 -070042 "rtc_event_log/rtc_event_log.cc",
zhihuang38ede132017-06-15 12:52:32 -070043 "rtc_event_log/rtc_event_log_factory.cc",
44 "rtc_event_log/rtc_event_log_factory.h",
skvladcc91d282016-10-03 18:31:22 -070045 ]
46
47 defines = []
48
49 deps = [
50 ":rtc_event_log_api",
51 "..:webrtc_common",
minyue4b7c9522017-01-24 04:54:59 -080052 "../modules/audio_coding:audio_network_adaptor",
michaelt97653702017-04-11 00:49:44 -070053 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
skvladcc91d282016-10-03 18:31:22 -070054 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -070055 "../rtc_base:protobuf_utils",
56 "../rtc_base:rtc_base_approved",
eladalon248fd4f2017-09-06 05:18:15 -070057 "../rtc_base:rtc_task_queue",
58 "../rtc_base:sequenced_task_checker",
kjellander727ac1d2017-03-08 02:12:11 -080059 "../system_wrappers",
skvladcc91d282016-10-03 18:31:22 -070060 ]
61
62 if (rtc_enable_protobuf) {
63 defines += [ "ENABLE_RTC_EVENT_LOG" ]
64 deps += [ ":rtc_event_log_proto" ]
65 }
kjellandere40a7ee2016-10-16 23:56:12 -070066 if (!build_with_chromium && is_clang) {
67 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070068 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
69 }
70}
71
skvladcc91d282016-10-03 18:31:22 -070072if (rtc_enable_protobuf) {
73 proto_library("rtc_event_log_proto") {
74 sources = [
75 "rtc_event_log/rtc_event_log.proto",
76 ]
sakal363a2912017-01-13 06:52:12 -080077 proto_out_dir = "webrtc/logging/rtc_event_log"
skvladcc91d282016-10-03 18:31:22 -070078 }
skvladcc91d282016-10-03 18:31:22 -070079
skvladcc91d282016-10-03 18:31:22 -070080 rtc_static_library("rtc_event_log_parser") {
81 sources = [
82 "rtc_event_log/rtc_event_log_parser.cc",
83 "rtc_event_log/rtc_event_log_parser.h",
84 ]
85
86 public_deps = [
kjellander727ac1d2017-03-08 02:12:11 -080087 ":rtc_event_log_api",
skvladcc91d282016-10-03 18:31:22 -070088 ":rtc_event_log_proto",
89 "..:webrtc_common",
michaeltcde46b72017-04-06 05:59:10 -070090 "../modules/audio_coding:audio_network_adaptor",
michaelt97653702017-04-11 00:49:44 -070091 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
kjellander727ac1d2017-03-08 02:12:11 -080092 "../modules/rtp_rtcp:rtp_rtcp",
93 "../system_wrappers",
skvladcc91d282016-10-03 18:31:22 -070094 ]
95
kjellandere40a7ee2016-10-16 23:56:12 -070096 if (!build_with_chromium && is_clang) {
97 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070098 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
99 }
kjellander727ac1d2017-03-08 02:12:11 -0800100 deps = [
aleloi440b6d92017-08-22 05:43:23 -0700101 "../call:video_stream_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700102 "../rtc_base:protobuf_utils",
103 "../rtc_base:rtc_base_approved",
kjellander727ac1d2017-03-08 02:12:11 -0800104 ]
skvladcc91d282016-10-03 18:31:22 -0700105 }
ehmaldonado1fd08c12017-01-17 02:37:34 -0800106
107 if (rtc_include_tests) {
108 rtc_source_set("rtc_event_log_tests") {
109 testonly = true
110 sources = [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800111 "rtc_event_log/rtc_event_log_unittest.cc",
112 "rtc_event_log/rtc_event_log_unittest_helper.cc",
eladalonb5c319a2017-08-17 08:32:39 -0700113 "rtc_event_log/rtc_event_log_unittest_helper.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800114 ]
115 deps = [
116 ":rtc_event_log_impl",
117 ":rtc_event_log_parser",
118 "../call",
michaeltcde46b72017-04-06 05:59:10 -0700119 "../modules/audio_coding:audio_network_adaptor",
michaelt97653702017-04-11 00:49:44 -0700120 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800121 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700122 "../rtc_base:rtc_base_approved",
123 "../rtc_base:rtc_base_tests_utils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800124 "../system_wrappers:metrics_default",
kjellander727ac1d2017-03-08 02:12:11 -0800125 "../test:test_support",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800126 "//testing/gmock",
127 "//testing/gtest",
128 ]
129 if (!build_with_chromium && is_clang) {
130 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
131 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
132 }
133 }
ivoc54b6e982017-02-08 00:28:09 -0800134 rtc_test("rtc_event_log2rtp_dump") {
135 testonly = true
136 sources = [
137 "rtc_event_log/rtc_event_log2rtp_dump.cc",
138 ]
139 deps = [
140 ":rtc_event_log_api",
141 ":rtc_event_log_impl",
142 ":rtc_event_log_parser",
ivoc54b6e982017-02-08 00:28:09 -0800143 "../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700144 "../rtc_base:rtc_base_approved",
ivoc54b6e982017-02-08 00:28:09 -0800145 "../system_wrappers:field_trial_default",
146 "../system_wrappers:metrics_default",
147 "../test:rtp_test_utils",
ivoc54b6e982017-02-08 00:28:09 -0800148 ]
149 if (!build_with_chromium && is_clang) {
150 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
151 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
152 }
153 }
ehmaldonado1fd08c12017-01-17 02:37:34 -0800154 }
tereliusd4ed7f52017-02-08 04:22:53 -0800155 if (rtc_include_tests) {
156 rtc_executable("rtc_event_log2text") {
157 testonly = true
158 sources = [
159 "rtc_event_log/rtc_event_log2text.cc",
160 ]
161 deps = [
162 ":rtc_event_log_api",
163 ":rtc_event_log_impl",
164 ":rtc_event_log_parser",
Stefan Holmer1acbd682017-09-01 15:29:28 +0200165 "../call:video_stream_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700166 "../rtc_base:rtc_base_approved",
tereliusbb46b952017-02-08 09:37:30 -0800167
168 # TODO(kwiberg): Remove this dependency.
kwiberg087bd342017-02-10 08:15:44 -0800169 "../api/audio_codecs:audio_codecs_api",
tereliusd4ed7f52017-02-08 04:22:53 -0800170 "../modules/rtp_rtcp:rtp_rtcp",
tereliusd4ed7f52017-02-08 04:22:53 -0800171 ]
172 if (!build_with_chromium && is_clang) {
173 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
174 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
175 }
176 }
177 }
tereliusee37e862017-04-28 07:48:17 -0700178 if (rtc_include_tests) {
179 rtc_executable("rtc_event_log2stats") {
180 testonly = true
181 sources = [
182 "rtc_event_log/rtc_event_log2stats.cc",
183 ]
184 deps = [
185 ":rtc_event_log_api",
186 ":rtc_event_log_impl",
187 ":rtc_event_log_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700188 "../rtc_base:rtc_base_approved",
tereliusee37e862017-04-28 07:48:17 -0700189 ]
190 if (!build_with_chromium && is_clang) {
191 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
192 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
193 }
194 }
195 }
skvladcc91d282016-10-03 18:31:22 -0700196}