blob: 3684381a98017f21c6e317f6e5ab7ad4404e9af8 [file] [log] [blame]
skvladcc91d282016-10-04 01:31:221# 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 14:58:229import("../webrtc.gni")
skvladcc91d282016-10-04 01:31:2210import("//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 12:44:0316group("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-04 01:31:2225rtc_source_set("rtc_event_log_api") {
26 sources = [
27 "rtc_event_log/rtc_event_log.h",
28 ]
29}
30
31rtc_static_library("rtc_event_log_impl") {
32 sources = [
33 "rtc_event_log/ringbuffer.h",
34 "rtc_event_log/rtc_event_log.cc",
35 "rtc_event_log/rtc_event_log_helper_thread.cc",
36 "rtc_event_log/rtc_event_log_helper_thread.h",
37 ]
38
39 defines = []
40
41 deps = [
42 ":rtc_event_log_api",
43 "..:webrtc_common",
ossuf515ab82016-12-07 12:52:5844 "../call:call_interfaces",
minyue4b7c9522017-01-24 12:54:5945 "../modules/audio_coding:audio_network_adaptor",
skvladcc91d282016-10-04 01:31:2246 "../modules/rtp_rtcp",
47 ]
48
49 if (rtc_enable_protobuf) {
50 defines += [ "ENABLE_RTC_EVENT_LOG" ]
51 deps += [ ":rtc_event_log_proto" ]
52 }
kjellandere40a7ee2016-10-17 06:56:1253 if (!build_with_chromium && is_clang) {
54 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-04 01:31:2255 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
56 }
57}
58
skvladcc91d282016-10-04 01:31:2259if (rtc_enable_protobuf) {
60 proto_library("rtc_event_log_proto") {
61 sources = [
62 "rtc_event_log/rtc_event_log.proto",
63 ]
sakal363a2912017-01-13 14:52:1264 proto_out_dir = "webrtc/logging/rtc_event_log"
skvladcc91d282016-10-04 01:31:2265 }
skvladcc91d282016-10-04 01:31:2266
skvladcc91d282016-10-04 01:31:2267 rtc_static_library("rtc_event_log_parser") {
68 sources = [
69 "rtc_event_log/rtc_event_log_parser.cc",
70 "rtc_event_log/rtc_event_log_parser.h",
71 ]
72
73 public_deps = [
74 ":rtc_event_log_proto",
75 "..:webrtc_common",
76 ]
77
kjellandere40a7ee2016-10-17 06:56:1278 if (!build_with_chromium && is_clang) {
79 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-04 01:31:2280 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
81 }
82 }
ehmaldonado1fd08c12017-01-17 10:37:3483
84 if (rtc_include_tests) {
85 rtc_source_set("rtc_event_log_tests") {
86 testonly = true
87 sources = [
88 "rtc_event_log/ringbuffer_unittest.cc",
89 "rtc_event_log/rtc_event_log_unittest.cc",
90 "rtc_event_log/rtc_event_log_unittest_helper.cc",
91 ]
92 deps = [
93 ":rtc_event_log_impl",
94 ":rtc_event_log_parser",
95 "../call",
96 "../modules/rtp_rtcp",
97 "../system_wrappers:metrics_default",
98 "//testing/gmock",
99 "//testing/gtest",
100 ]
101 if (!build_with_chromium && is_clang) {
102 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
103 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
104 }
105 }
ivoc54b6e982017-02-08 08:28:09106 rtc_test("rtc_event_log2rtp_dump") {
107 testonly = true
108 sources = [
109 "rtc_event_log/rtc_event_log2rtp_dump.cc",
110 ]
111 deps = [
112 ":rtc_event_log_api",
113 ":rtc_event_log_impl",
114 ":rtc_event_log_parser",
115 "../base:rtc_base_approved",
116 "../call:call_interfaces",
117 "../modules/rtp_rtcp:rtp_rtcp",
118 "../system_wrappers:field_trial_default",
119 "../system_wrappers:metrics_default",
120 "../test:rtp_test_utils",
121 "//third_party/gflags",
122 ]
123 if (!build_with_chromium && is_clang) {
124 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
125 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
126 }
127 }
ehmaldonado1fd08c12017-01-17 10:37:34128 }
tereliusd4ed7f52017-02-08 12:22:53129 if (rtc_include_tests) {
130 rtc_executable("rtc_event_log2text") {
131 testonly = true
132 sources = [
133 "rtc_event_log/rtc_event_log2text.cc",
134 ]
135 deps = [
136 ":rtc_event_log_api",
137 ":rtc_event_log_impl",
138 ":rtc_event_log_parser",
139 "../base:rtc_base_approved",
tereliusbb46b952017-02-08 17:37:30140
141 # TODO(kwiberg): Remove this dependency.
142 "../modules/audio_coding:audio_format",
tereliusd4ed7f52017-02-08 12:22:53143 "../modules/rtp_rtcp:rtp_rtcp",
144 "//third_party/gflags",
145 ]
146 if (!build_with_chromium && is_clang) {
147 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
148 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
149 }
150 }
151 }
skvladcc91d282016-10-04 01:31:22152}