blob: fac7e3d9b451364a40718fbf625d1b1bceda7674 [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",
skvladcc91d282016-10-03 18:31:22 -070029 ]
kjellander727ac1d2017-03-08 02:12:11 -080030 deps = [
perkj77cd58e2017-05-30 03:52:10 -070031 "..:webrtc_common",
Stefan Holmer1acbd682017-09-01 15:29:28 +020032 "../api:libjingle_peerconnection_api",
aleloi440b6d92017-08-22 05:43:23 -070033 "../call:video_stream_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070034 "../rtc_base:rtc_base_approved",
kjellander727ac1d2017-03-08 02:12:11 -080035 ]
skvladcc91d282016-10-03 18:31:22 -070036}
37
38rtc_static_library("rtc_event_log_impl") {
39 sources = [
skvladcc91d282016-10-03 18:31:22 -070040 "rtc_event_log/rtc_event_log.cc",
zhihuang38ede132017-06-15 12:52:32 -070041 "rtc_event_log/rtc_event_log_factory.cc",
42 "rtc_event_log/rtc_event_log_factory.h",
skvladcc91d282016-10-03 18:31:22 -070043 ]
44
45 defines = []
46
47 deps = [
48 ":rtc_event_log_api",
49 "..:webrtc_common",
minyue4b7c9522017-01-24 04:54:59 -080050 "../modules/audio_coding:audio_network_adaptor",
michaelt97653702017-04-11 00:49:44 -070051 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
skvladcc91d282016-10-03 18:31:22 -070052 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -070053 "../rtc_base:protobuf_utils",
54 "../rtc_base:rtc_base_approved",
eladalon248fd4f2017-09-06 05:18:15 -070055 "../rtc_base:rtc_task_queue",
56 "../rtc_base:sequenced_task_checker",
kjellander727ac1d2017-03-08 02:12:11 -080057 "../system_wrappers",
skvladcc91d282016-10-03 18:31:22 -070058 ]
59
60 if (rtc_enable_protobuf) {
61 defines += [ "ENABLE_RTC_EVENT_LOG" ]
62 deps += [ ":rtc_event_log_proto" ]
63 }
kjellandere40a7ee2016-10-16 23:56:12 -070064 if (!build_with_chromium && is_clang) {
65 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070066 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
67 }
68}
69
skvladcc91d282016-10-03 18:31:22 -070070if (rtc_enable_protobuf) {
71 proto_library("rtc_event_log_proto") {
72 sources = [
73 "rtc_event_log/rtc_event_log.proto",
74 ]
sakal363a2912017-01-13 06:52:12 -080075 proto_out_dir = "webrtc/logging/rtc_event_log"
skvladcc91d282016-10-03 18:31:22 -070076 }
skvladcc91d282016-10-03 18:31:22 -070077
skvladcc91d282016-10-03 18:31:22 -070078 rtc_static_library("rtc_event_log_parser") {
79 sources = [
80 "rtc_event_log/rtc_event_log_parser.cc",
81 "rtc_event_log/rtc_event_log_parser.h",
82 ]
83
84 public_deps = [
kjellander727ac1d2017-03-08 02:12:11 -080085 ":rtc_event_log_api",
skvladcc91d282016-10-03 18:31:22 -070086 ":rtc_event_log_proto",
87 "..:webrtc_common",
michaeltcde46b72017-04-06 05:59:10 -070088 "../modules/audio_coding:audio_network_adaptor",
michaelt97653702017-04-11 00:49:44 -070089 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
kjellander727ac1d2017-03-08 02:12:11 -080090 "../modules/rtp_rtcp:rtp_rtcp",
91 "../system_wrappers",
skvladcc91d282016-10-03 18:31:22 -070092 ]
93
kjellandere40a7ee2016-10-16 23:56:12 -070094 if (!build_with_chromium && is_clang) {
95 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070096 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
97 }
kjellander727ac1d2017-03-08 02:12:11 -080098 deps = [
aleloi440b6d92017-08-22 05:43:23 -070099 "../call:video_stream_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700100 "../rtc_base:protobuf_utils",
101 "../rtc_base:rtc_base_approved",
kjellander727ac1d2017-03-08 02:12:11 -0800102 ]
skvladcc91d282016-10-03 18:31:22 -0700103 }
ehmaldonado1fd08c12017-01-17 02:37:34 -0800104
105 if (rtc_include_tests) {
106 rtc_source_set("rtc_event_log_tests") {
107 testonly = true
108 sources = [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800109 "rtc_event_log/rtc_event_log_unittest.cc",
110 "rtc_event_log/rtc_event_log_unittest_helper.cc",
eladalonb5c319a2017-08-17 08:32:39 -0700111 "rtc_event_log/rtc_event_log_unittest_helper.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800112 ]
113 deps = [
114 ":rtc_event_log_impl",
115 ":rtc_event_log_parser",
116 "../call",
michaeltcde46b72017-04-06 05:59:10 -0700117 "../modules/audio_coding:audio_network_adaptor",
michaelt97653702017-04-11 00:49:44 -0700118 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800119 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700120 "../rtc_base:rtc_base_approved",
121 "../rtc_base:rtc_base_tests_utils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800122 "../system_wrappers:metrics_default",
kjellander727ac1d2017-03-08 02:12:11 -0800123 "../test:test_support",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800124 "//testing/gmock",
125 "//testing/gtest",
126 ]
127 if (!build_with_chromium && is_clang) {
128 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
129 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
130 }
131 }
ivoc54b6e982017-02-08 00:28:09 -0800132 rtc_test("rtc_event_log2rtp_dump") {
133 testonly = true
134 sources = [
135 "rtc_event_log/rtc_event_log2rtp_dump.cc",
136 ]
137 deps = [
138 ":rtc_event_log_api",
139 ":rtc_event_log_impl",
140 ":rtc_event_log_parser",
ivoc54b6e982017-02-08 00:28:09 -0800141 "../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700142 "../rtc_base:rtc_base_approved",
ivoc54b6e982017-02-08 00:28:09 -0800143 "../system_wrappers:field_trial_default",
144 "../system_wrappers:metrics_default",
145 "../test:rtp_test_utils",
ivoc54b6e982017-02-08 00:28:09 -0800146 ]
147 if (!build_with_chromium && is_clang) {
148 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
149 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
150 }
151 }
ehmaldonado1fd08c12017-01-17 02:37:34 -0800152 }
tereliusd4ed7f52017-02-08 04:22:53 -0800153 if (rtc_include_tests) {
154 rtc_executable("rtc_event_log2text") {
155 testonly = true
156 sources = [
157 "rtc_event_log/rtc_event_log2text.cc",
158 ]
159 deps = [
160 ":rtc_event_log_api",
161 ":rtc_event_log_impl",
162 ":rtc_event_log_parser",
Stefan Holmer1acbd682017-09-01 15:29:28 +0200163 "../call:video_stream_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700164 "../rtc_base:rtc_base_approved",
tereliusbb46b952017-02-08 09:37:30 -0800165
166 # TODO(kwiberg): Remove this dependency.
kwiberg087bd342017-02-10 08:15:44 -0800167 "../api/audio_codecs:audio_codecs_api",
tereliusd4ed7f52017-02-08 04:22:53 -0800168 "../modules/rtp_rtcp:rtp_rtcp",
tereliusd4ed7f52017-02-08 04:22:53 -0800169 ]
170 if (!build_with_chromium && is_clang) {
171 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
172 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
173 }
174 }
175 }
tereliusee37e862017-04-28 07:48:17 -0700176 if (rtc_include_tests) {
177 rtc_executable("rtc_event_log2stats") {
178 testonly = true
179 sources = [
180 "rtc_event_log/rtc_event_log2stats.cc",
181 ]
182 deps = [
183 ":rtc_event_log_api",
184 ":rtc_event_log_impl",
185 ":rtc_event_log_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700186 "../rtc_base:rtc_base_approved",
tereliusee37e862017-04-28 07:48:17 -0700187 ]
188 if (!build_with_chromium && is_clang) {
189 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
190 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
191 }
192 }
193 }
skvladcc91d282016-10-03 18:31:22 -0700194}