We're moving to an RtcEventLog interface that accepts std::unique_ptr<EventLog> and stores the event for encoding when encoding becomes necessary, rather than before. This will be useful while we maintain the legacy (current) encoding alongside the new encoding on which we're working. This CL introduces RtcEventLogEncoderLegacy, which takes provides the encoding currently done by RtcEventLogImpl. After this, we can modify RtcEventLogImpl to use a dynamically chosen encoding, allowing us to easily choose between the current encoding and the new one on which we're working. BUG=webrtc:8111 TBR=stefan@webrtc.org Change-Id: I3dde7e222a40a117549a094a59b04219467f490a Reviewed-on: https://webrtc-review.googlesource.com/1364 Commit-Queue: Elad Alon <eladalon@webrtc.org> Reviewed-by: Elad Alon <eladalon@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20116}
243 lines
8.5 KiB
Plaintext
243 lines
8.5 KiB
Plaintext
# 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")
|
|
import("//third_party/protobuf/proto_library.gni")
|
|
if (is_android) {
|
|
import("//build/config/android/config.gni")
|
|
import("//build/config/android/rules.gni")
|
|
}
|
|
|
|
group("logging") {
|
|
public_deps = [
|
|
":rtc_event_log_impl",
|
|
]
|
|
if (rtc_enable_protobuf) {
|
|
public_deps += [ ":rtc_event_log_parser" ]
|
|
}
|
|
}
|
|
|
|
rtc_source_set("rtc_event_log_api") {
|
|
sources = [
|
|
"rtc_event_log/events/rtc_event.h",
|
|
"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_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_logging_started.cc",
|
|
"rtc_event_log/events/rtc_event_logging_started.h",
|
|
"rtc_event_log/events/rtc_event_logging_stopped.cc",
|
|
"rtc_event_log/events/rtc_event_logging_stopped.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_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",
|
|
"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",
|
|
"rtc_event_log/rtc_event_log.h",
|
|
"rtc_event_log/rtc_event_log_factory_interface.h",
|
|
"rtc_event_log/rtc_stream_config.cc",
|
|
"rtc_event_log/rtc_stream_config.h",
|
|
]
|
|
deps = [
|
|
"..:webrtc_common",
|
|
"../api:array_view",
|
|
"../api:libjingle_peerconnection_api",
|
|
"../call:video_stream_api",
|
|
"../modules/audio_coding:audio_network_adaptor_config",
|
|
"../modules/remote_bitrate_estimator:remote_bitrate_estimator",
|
|
"../modules/rtp_rtcp:rtp_rtcp_format",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
rtc_static_library("rtc_event_log_impl") {
|
|
sources = [
|
|
"rtc_event_log/encoder/rtc_event_log_encoder.h",
|
|
"rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc",
|
|
"rtc_event_log/encoder/rtc_event_log_encoder_legacy.h",
|
|
"rtc_event_log/rtc_event_log.cc",
|
|
"rtc_event_log/rtc_event_log_factory.cc",
|
|
"rtc_event_log/rtc_event_log_factory.h",
|
|
]
|
|
|
|
defines = []
|
|
|
|
deps = [
|
|
":rtc_event_log_api",
|
|
"..:webrtc_common",
|
|
"../modules/audio_coding:audio_network_adaptor",
|
|
"../modules/remote_bitrate_estimator:remote_bitrate_estimator",
|
|
"../modules/rtp_rtcp",
|
|
"../rtc_base:protobuf_utils",
|
|
"../rtc_base:rtc_base_approved",
|
|
"../rtc_base:rtc_task_queue",
|
|
"../rtc_base:sequenced_task_checker",
|
|
"../system_wrappers",
|
|
]
|
|
|
|
if (rtc_enable_protobuf) {
|
|
defines += [ "ENABLE_RTC_EVENT_LOG" ]
|
|
deps += [ ":rtc_event_log_proto" ]
|
|
}
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
|
|
if (rtc_enable_protobuf) {
|
|
proto_library("rtc_event_log_proto") {
|
|
sources = [
|
|
"rtc_event_log/rtc_event_log.proto",
|
|
]
|
|
proto_out_dir = "logging/rtc_event_log"
|
|
}
|
|
|
|
rtc_static_library("rtc_event_log_parser") {
|
|
sources = [
|
|
"rtc_event_log/rtc_event_log_parser.cc",
|
|
"rtc_event_log/rtc_event_log_parser.h",
|
|
]
|
|
|
|
public_deps = [
|
|
":rtc_event_log_api",
|
|
":rtc_event_log_proto",
|
|
"..:webrtc_common",
|
|
"../modules/audio_coding:audio_network_adaptor",
|
|
"../modules/remote_bitrate_estimator:remote_bitrate_estimator",
|
|
"../modules/rtp_rtcp:rtp_rtcp",
|
|
"../system_wrappers",
|
|
]
|
|
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
deps = [
|
|
"../call:video_stream_api",
|
|
"../rtc_base:protobuf_utils",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
if (rtc_include_tests) {
|
|
rtc_source_set("rtc_event_log_tests") {
|
|
testonly = true
|
|
assert(rtc_enable_protobuf)
|
|
defines = [ "ENABLE_RTC_EVENT_LOG" ]
|
|
sources = [
|
|
"rtc_event_log/encoder/rtc_event_log_encoder_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",
|
|
]
|
|
deps = [
|
|
":rtc_event_log_impl",
|
|
":rtc_event_log_parser",
|
|
"../call",
|
|
"../modules/audio_coding:audio_network_adaptor",
|
|
"../modules/remote_bitrate_estimator:remote_bitrate_estimator",
|
|
"../modules/rtp_rtcp",
|
|
"../rtc_base:rtc_base_approved",
|
|
"../rtc_base:rtc_base_tests_utils",
|
|
"../system_wrappers:metrics_default",
|
|
"../test:test_support",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
]
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
rtc_test("rtc_event_log2rtp_dump") {
|
|
testonly = true
|
|
sources = [
|
|
"rtc_event_log/rtc_event_log2rtp_dump.cc",
|
|
]
|
|
deps = [
|
|
":rtc_event_log_api",
|
|
":rtc_event_log_impl",
|
|
":rtc_event_log_parser",
|
|
"../modules/rtp_rtcp:rtp_rtcp",
|
|
"../rtc_base:rtc_base_approved",
|
|
"../system_wrappers:field_trial_default",
|
|
"../system_wrappers:metrics_default",
|
|
"../test:rtp_test_utils",
|
|
]
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
}
|
|
if (rtc_include_tests) {
|
|
rtc_executable("rtc_event_log2text") {
|
|
testonly = true
|
|
sources = [
|
|
"rtc_event_log/rtc_event_log2text.cc",
|
|
]
|
|
deps = [
|
|
":rtc_event_log_api",
|
|
":rtc_event_log_impl",
|
|
":rtc_event_log_parser",
|
|
"../call:video_stream_api",
|
|
"../rtc_base:rtc_base_approved",
|
|
|
|
# TODO(kwiberg): Remove this dependency.
|
|
"../api/audio_codecs:audio_codecs_api",
|
|
"../modules/audio_coding:audio_network_adaptor_config",
|
|
"../modules/rtp_rtcp:rtp_rtcp",
|
|
]
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
}
|
|
if (rtc_include_tests) {
|
|
rtc_executable("rtc_event_log2stats") {
|
|
testonly = true
|
|
sources = [
|
|
"rtc_event_log/rtc_event_log2stats.cc",
|
|
]
|
|
deps = [
|
|
":rtc_event_log_api",
|
|
":rtc_event_log_impl",
|
|
":rtc_event_log_proto",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
}
|
|
}
|