blob: 415c52789c07bf82c931c2342c1687b5ad205196 [file] [log] [blame]
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../webrtc.gni")
if (rtc_enable_protobuf) {
import("//third_party/protobuf/proto_library.gni")
}
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
group("logging") {
deps = [
":rtc_event_audio",
":rtc_event_begin_end",
":rtc_event_bwe",
":rtc_event_log_impl_encoder",
":rtc_event_pacing",
":rtc_event_rtp_rtcp",
":rtc_event_video",
]
}
rtc_source_set("rtc_event_log_api") {
sources = [ "rtc_event_log/encoder/rtc_event_log_encoder.h" ]
deps = [ "../api/rtc_event_log" ]
}
rtc_source_set("rtc_event_log_parse_status") {
sources = [ "rtc_event_log/events/rtc_event_log_parse_status.h" ]
deps = [ "../rtc_base:checks" ]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}
rtc_library("rtc_event_field") {
sources = [
"rtc_event_log/events/fixed_length_encoding_parameters_v3.cc",
"rtc_event_log/events/fixed_length_encoding_parameters_v3.h",
"rtc_event_log/events/rtc_event_definition.h",
"rtc_event_log/events/rtc_event_field_encoding.cc",
"rtc_event_log/events/rtc_event_field_encoding.h",
"rtc_event_log/events/rtc_event_field_encoding_parser.cc",
"rtc_event_log/events/rtc_event_field_encoding_parser.h",
"rtc_event_log/events/rtc_event_field_extraction.cc",
"rtc_event_log/events/rtc_event_field_extraction.h",
]
deps = [
":rtc_event_log_parse_status",
":rtc_event_number_encodings",
"../api:array_view",
"../api/rtc_event_log",
"../api/units:timestamp",
"../rtc_base:bitstream_reader",
"../rtc_base:checks",
"../rtc_base:logging",
]
absl_deps = [
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("rtc_stream_config") {
sources = [
"rtc_event_log/rtc_stream_config.cc",
"rtc_event_log/rtc_stream_config.h",
]
deps = [
"../api:rtp_headers",
"../api:rtp_parameters",
]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}
rtc_library("rtc_event_pacing") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/rtc_event_alr_state.cc",
"rtc_event_log/events/rtc_event_alr_state.h",
]
deps = [
":rtc_event_field",
"../api/rtc_event_log",
"../api/units:timestamp",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
]
}
rtc_library("rtc_event_audio") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/rtc_event_audio_network_adaptation.cc",
"rtc_event_log/events/rtc_event_audio_network_adaptation.h",
"rtc_event_log/events/rtc_event_audio_playout.cc",
"rtc_event_log/events/rtc_event_audio_playout.h",
"rtc_event_log/events/rtc_event_audio_receive_stream_config.cc",
"rtc_event_log/events/rtc_event_audio_receive_stream_config.h",
"rtc_event_log/events/rtc_event_audio_send_stream_config.cc",
"rtc_event_log/events/rtc_event_audio_send_stream_config.h",
"rtc_event_log/events/rtc_event_neteq_set_minimum_delay.cc",
"rtc_event_log/events/rtc_event_neteq_set_minimum_delay.h",
]
deps = [
":rtc_event_field",
":rtc_stream_config",
"../api/rtc_event_log",
"../api/units:timestamp",
"../modules/audio_coding:audio_network_adaptor_config",
"../rtc_base:checks",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
]
}
rtc_library("rtc_event_begin_end") {
sources = [
"rtc_event_log/events/rtc_event_begin_log.cc",
"rtc_event_log/events/rtc_event_begin_log.h",
"rtc_event_log/events/rtc_event_end_log.cc",
"rtc_event_log/events/rtc_event_end_log.h",
]
deps = [
":rtc_event_field",
"../api:array_view",
"../api/rtc_event_log",
"../api/units:timestamp",
]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}
rtc_library("rtc_event_bwe") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/rtc_event_bwe_update_delay_based.cc",
"rtc_event_log/events/rtc_event_bwe_update_delay_based.h",
"rtc_event_log/events/rtc_event_bwe_update_loss_based.cc",
"rtc_event_log/events/rtc_event_bwe_update_loss_based.h",
"rtc_event_log/events/rtc_event_probe_cluster_created.cc",
"rtc_event_log/events/rtc_event_probe_cluster_created.h",
"rtc_event_log/events/rtc_event_probe_result_failure.cc",
"rtc_event_log/events/rtc_event_probe_result_failure.h",
"rtc_event_log/events/rtc_event_probe_result_success.cc",
"rtc_event_log/events/rtc_event_probe_result_success.h",
"rtc_event_log/events/rtc_event_remote_estimate.h",
"rtc_event_log/events/rtc_event_route_change.cc",
"rtc_event_log/events/rtc_event_route_change.h",
]
deps = [
":rtc_event_field",
"../api:network_state_predictor_api",
"../api/rtc_event_log",
"../api/units:data_rate",
"../api/units:timestamp",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("rtc_event_frame_events") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/rtc_event_frame_decoded.cc",
"rtc_event_log/events/rtc_event_frame_decoded.h",
]
deps = [
":rtc_event_field",
"../api/rtc_event_log",
"../api/units:timestamp",
"../api/video:video_frame",
"../rtc_base:timeutils",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("rtc_event_generic_packet_events") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/rtc_event_generic_ack_received.cc",
"rtc_event_log/events/rtc_event_generic_ack_received.h",
"rtc_event_log/events/rtc_event_generic_packet_received.cc",
"rtc_event_log/events/rtc_event_generic_packet_received.h",
"rtc_event_log/events/rtc_event_generic_packet_sent.cc",
"rtc_event_log/events/rtc_event_generic_packet_sent.h",
]
deps = [
":rtc_event_field",
"../api/rtc_event_log",
"../api/units:timestamp",
"../rtc_base:timeutils",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("rtc_event_rtp_rtcp") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/logged_rtp_rtcp.h",
"rtc_event_log/events/rtc_event_rtcp_packet_incoming.cc",
"rtc_event_log/events/rtc_event_rtcp_packet_incoming.h",
"rtc_event_log/events/rtc_event_rtcp_packet_outgoing.cc",
"rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h",
"rtc_event_log/events/rtc_event_rtp_packet_incoming.cc",
"rtc_event_log/events/rtc_event_rtp_packet_incoming.h",
"rtc_event_log/events/rtc_event_rtp_packet_outgoing.cc",
"rtc_event_log/events/rtc_event_rtp_packet_outgoing.h",
]
deps = [
":rtc_event_field",
"../api:array_view",
"../api:rtp_headers",
"../api/rtc_event_log",
"../api/units:timestamp",
"../modules/rtp_rtcp:rtp_rtcp_format",
"../rtc_base:buffer",
"../rtc_base:checks",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
]
}
rtc_library("rtc_event_video") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/rtc_event_video_receive_stream_config.cc",
"rtc_event_log/events/rtc_event_video_receive_stream_config.h",
"rtc_event_log/events/rtc_event_video_send_stream_config.cc",
"rtc_event_log/events/rtc_event_video_send_stream_config.h",
]
deps = [
":rtc_event_field",
":rtc_stream_config",
"../api/rtc_event_log",
"../api/units:timestamp",
"../rtc_base:checks",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
]
}
rtc_library("rtc_event_number_encodings") {
sources = [
"rtc_event_log/encoder/bit_writer.cc",
"rtc_event_log/encoder/bit_writer.h",
"rtc_event_log/encoder/rtc_event_log_encoder_common.cc",
"rtc_event_log/encoder/rtc_event_log_encoder_common.h",
"rtc_event_log/encoder/var_int.cc",
"rtc_event_log/encoder/var_int.h",
]
defines = []
deps = [
"../rtc_base:bit_buffer",
"../rtc_base:bitstream_reader",
"../rtc_base:checks",
"../rtc_base:macromagic",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("rtc_event_log_blob_encoding") {
sources = [
"rtc_event_log/encoder/blob_encoding.cc",
"rtc_event_log/encoder/blob_encoding.h",
]
deps = [
":rtc_event_number_encodings",
"../rtc_base:checks",
"../rtc_base:logging",
]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}
rtc_library("rtc_event_log_optional_blob_encoding") {
sources = [
"rtc_event_log/encoder/optional_blob_encoding.cc",
"rtc_event_log/encoder/optional_blob_encoding.h",
]
deps = [
"../rtc_base:bit_buffer",
"../rtc_base:bitstream_reader",
"../rtc_base:checks",
"../rtc_base:logging",
]
absl_deps = [
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("rtc_event_log_delta_encoding") {
sources = [
"rtc_event_log/encoder/delta_encoding.cc",
"rtc_event_log/encoder/delta_encoding.h",
]
deps = [
":rtc_event_number_encodings",
"../rtc_base:bit_buffer",
"../rtc_base:bitstream_reader",
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:safe_conversions",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("rtc_event_log_impl_encoder") {
sources = []
defines = []
deps = [
":rtc_event_number_encodings",
"../api:field_trials_view",
"../api:rtp_headers",
"../api:rtp_parameters",
"../api/transport:network_control",
"../rtc_base:bit_buffer",
"../rtc_base:bitstream_reader",
"../rtc_base:buffer",
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:safe_conversions",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
if (rtc_enable_protobuf) {
deps += [
":dependency_descriptor_encoder_decoder",
":ice_log",
":rtc_event_audio",
":rtc_event_begin_end",
":rtc_event_bwe",
":rtc_event_field",
":rtc_event_frame_events",
":rtc_event_generic_packet_events",
":rtc_event_log2_proto",
":rtc_event_log_api",
":rtc_event_log_blob_encoding",
":rtc_event_log_delta_encoding",
":rtc_event_log_proto",
":rtc_event_pacing",
":rtc_event_rtp_rtcp",
":rtc_event_video",
":rtc_stream_config",
"../api:array_view",
"../api:network_state_predictor_api",
"../modules/audio_coding:audio_network_adaptor",
"../modules/rtp_rtcp:rtp_rtcp_format",
]
sources += [
"rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc",
"rtc_event_log/encoder/rtc_event_log_encoder_legacy.h",
"rtc_event_log/encoder/rtc_event_log_encoder_new_format.cc",
"rtc_event_log/encoder/rtc_event_log_encoder_new_format.h",
"rtc_event_log/encoder/rtc_event_log_encoder_v3.cc",
"rtc_event_log/encoder/rtc_event_log_encoder_v3.h",
]
}
}
if (rtc_enable_protobuf) {
rtc_library("dependency_descriptor_encoder_decoder") {
sources = [
"rtc_event_log/dependency_descriptor_encoder_decoder.cc",
"rtc_event_log/dependency_descriptor_encoder_decoder.h",
]
deps = [
":rtc_event_log2_proto_include",
":rtc_event_log_delta_encoding",
":rtc_event_log_optional_blob_encoding",
":rtc_event_log_parse_status",
":rtc_event_log_proto", # Why does this need to be included here?
"../rtc_base:bitstream_reader",
"../rtc_base:checks",
"../rtc_base:logging",
]
absl_deps = [
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
}
if (rtc_enable_protobuf) {
rtc_source_set("rtc_event_log2_proto_include") {
sources = [ "rtc_event_log/rtc_event_log2_proto_include.h" ]
deps = [ ":rtc_event_log2_proto" ]
}
}
# TODO(bugs.webrtc.org/6463): For backwards compatibility; delete as
# soon as downstream dependencies are updated.
rtc_source_set("rtc_event_log_impl_output") {
sources = [ "rtc_event_log/output/rtc_event_log_output_file.h" ]
deps = [ "../api:rtc_event_log_output_file" ]
}
if (rtc_enable_protobuf) {
rtc_library("rtc_event_log_impl") {
visibility = [
":rtc_event_log_tests",
"../api/rtc_event_log:rtc_event_log_factory",
]
sources = [
"rtc_event_log/rtc_event_log_impl.cc",
"rtc_event_log/rtc_event_log_impl.h",
]
deps = [
":ice_log",
":rtc_event_log_api",
":rtc_event_log_impl_encoder",
"../api:field_trials_view",
"../api:libjingle_logging_api",
"../api:sequence_checker",
"../api/environment",
"../api/rtc_event_log",
"../api/task_queue",
"../api/units:time_delta",
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base:rtc_event",
"../rtc_base:safe_conversions",
"../rtc_base:safe_minmax",
"../rtc_base:timeutils",
"../rtc_base/system:no_unique_address",
]
absl_deps = [
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
}
rtc_library("fake_rtc_event_log") {
testonly = true
sources = [
"rtc_event_log/fake_rtc_event_log.cc",
"rtc_event_log/fake_rtc_event_log.h",
"rtc_event_log/fake_rtc_event_log_factory.cc",
"rtc_event_log/fake_rtc_event_log_factory.h",
]
deps = [
"../api/environment",
"../api/rtc_event_log",
"../rtc_base:macromagic",
"../rtc_base/synchronization:mutex",
]
absl_deps = [ "//third_party/abseil-cpp/absl/base:nullability" ]
}
if (rtc_enable_protobuf) {
proto_library("rtc_event_log_proto") {
visibility = [ "*" ]
sources = [ "rtc_event_log/rtc_event_log.proto" ]
proto_out_dir = "logging/rtc_event_log"
}
proto_library("rtc_event_log2_proto") {
visibility = [ "*" ]
sources = [ "rtc_event_log/rtc_event_log2.proto" ]
proto_out_dir = "logging/rtc_event_log"
}
rtc_library("rtc_event_log_parser") {
visibility = [ "*" ]
sources = [
"rtc_event_log/rtc_event_log_parser.cc",
"rtc_event_log/rtc_event_log_parser.h",
"rtc_event_log/rtc_event_processor.cc",
"rtc_event_log/rtc_event_processor.h",
"rtc_event_log/rtc_event_processor_order.h",
]
deps = [
":dependency_descriptor_encoder_decoder",
":ice_log",
":rtc_event_audio",
":rtc_event_begin_end",
":rtc_event_bwe",
":rtc_event_frame_events",
":rtc_event_generic_packet_events",
":rtc_event_log2_proto",
":rtc_event_log_blob_encoding",
":rtc_event_log_delta_encoding",
":rtc_event_log_impl_encoder",
":rtc_event_log_proto",
":rtc_event_number_encodings",
":rtc_event_pacing",
":rtc_event_rtp_rtcp",
":rtc_event_video",
":rtc_stream_config",
"../api:function_view",
"../api:network_state_predictor_api",
"../api:rtp_headers",
"../api:rtp_parameters",
"../api/rtc_event_log",
"../api/units:data_rate",
"../api/units:time_delta",
"../api/units:timestamp",
"../api/video:video_frame",
"../call:video_stream_api",
"../modules:module_api_public",
"../modules/audio_coding:audio_network_adaptor",
"../modules/rtp_rtcp:rtp_rtcp_format",
"../rtc_base:checks",
"../rtc_base:copy_on_write_buffer",
"../rtc_base:logging",
"../rtc_base:protobuf_utils",
"../rtc_base:rtc_numerics",
"../rtc_base:safe_conversions",
"../rtc_base/system:file_wrapper",
]
absl_deps = [
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
if (rtc_include_tests) {
rtc_library("rtc_event_log_tests") {
testonly = true
assert(rtc_enable_protobuf)
sources = [
"rtc_event_log/dependency_descriptor_encoder_decoder_unittest.cc",
"rtc_event_log/encoder/blob_encoding_unittest.cc",
"rtc_event_log/encoder/delta_encoding_unittest.cc",
"rtc_event_log/encoder/optional_blob_encoding_unittest.cc",
"rtc_event_log/encoder/rtc_event_log_encoder_common_unittest.cc",
"rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc",
"rtc_event_log/events/rtc_event_field_encoding_unittest.cc",
"rtc_event_log/events/rtc_event_field_extraction_unittest.cc",
"rtc_event_log/rtc_event_log_impl_unittest.cc",
"rtc_event_log/rtc_event_log_unittest.cc",
"rtc_event_log/rtc_event_log_unittest_helper.cc",
"rtc_event_log/rtc_event_log_unittest_helper.h",
"rtc_event_log/rtc_event_processor_unittest.cc",
]
deps = [
":dependency_descriptor_encoder_decoder",
":ice_log",
":rtc_event_audio",
":rtc_event_bwe",
":rtc_event_field",
":rtc_event_frame_events",
":rtc_event_generic_packet_events",
":rtc_event_log2_proto",
":rtc_event_log2_proto_include",
":rtc_event_log_blob_encoding",
":rtc_event_log_delta_encoding",
":rtc_event_log_impl",
":rtc_event_log_impl_encoder",
":rtc_event_log_optional_blob_encoding",
":rtc_event_log_parser",
":rtc_event_log_proto",
":rtc_event_number_encodings",
":rtc_event_pacing",
":rtc_event_rtp_rtcp",
":rtc_event_video",
":rtc_stream_config",
"../api:array_view",
"../api:field_trials_view",
"../api:network_state_predictor_api",
"../api:rtc_event_log_output_file",
"../api:rtp_headers",
"../api:rtp_parameters",
"../api/environment",
"../api/environment:environment_factory",
"../api/rtc_event_log",
"../api/rtc_event_log:rtc_event_log_factory",
"../api/units:time_delta",
"../api/units:timestamp",
"../call",
"../call:call_interfaces",
"../modules/audio_coding:audio_network_adaptor",
"../modules/rtp_rtcp:rtp_rtcp_format",
"../rtc_base:buffer",
"../rtc_base:checks",
"../rtc_base:macromagic",
"../rtc_base:random",
"../rtc_base:rtc_base_tests_utils",
"../rtc_base:timeutils",
"../system_wrappers",
"../test:explicit_key_value_config",
"../test:fileutils",
"../test:test_support",
"../test/logging:log_writer",
"../test/time_controller",
"//testing/gtest",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
if (!build_with_chromium) {
rtc_executable("rtc_event_log_rtp_dump") {
testonly = true
sources = [ "rtc_event_log/rtc_event_log2rtp_dump.cc" ]
deps = [
":rtc_event_log_parser",
"../api:array_view",
"../api:rtp_headers",
"../api/rtc_event_log",
"../modules/rtp_rtcp",
"../modules/rtp_rtcp:rtp_rtcp_format",
"../rtc_base:checks",
"../rtc_base:protobuf_utils",
"../test:rtp_test_utils",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/flags:usage",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
}
}
}
rtc_library("ice_log") {
visibility = [ "*" ]
sources = [
"rtc_event_log/events/rtc_event_dtls_transport_state.cc",
"rtc_event_log/events/rtc_event_dtls_transport_state.h",
"rtc_event_log/events/rtc_event_dtls_writable_state.cc",
"rtc_event_log/events/rtc_event_dtls_writable_state.h",
"rtc_event_log/events/rtc_event_ice_candidate_pair.cc",
"rtc_event_log/events/rtc_event_ice_candidate_pair.h",
"rtc_event_log/events/rtc_event_ice_candidate_pair_config.cc",
"rtc_event_log/events/rtc_event_ice_candidate_pair_config.h",
"rtc_event_log/ice_logger.cc",
"rtc_event_log/ice_logger.h",
]
deps = [
":rtc_event_field",
"../api:dtls_transport_interface",
"../api:libjingle_logging_api",
"../api/rtc_event_log",
"../api/units:timestamp",
]
absl_deps = [
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
]
}
if (rtc_include_tests) {
rtc_library("mocks") {
testonly = true
sources = [
"rtc_event_log/mock/mock_rtc_event_log.cc",
"rtc_event_log/mock/mock_rtc_event_log.h",
]
deps = [
"../api/rtc_event_log",
"../test:test_support",
]
}
}