Update to current webrtc library
This is from the upstream library commit id 3326535126e435f1ba647885ce43a8f0f3d317eb, corresponding to Chromium 88.0.4290.1.
This commit is contained in:
@ -6,218 +6,138 @@
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
import("//build/config/android/config.gni")
|
||||
import("../build/webrtc.gni")
|
||||
if (is_android) {
|
||||
import("//build/config/android/config.gni")
|
||||
import("//build/config/android/rules.gni")
|
||||
}
|
||||
import("../webrtc.gni")
|
||||
|
||||
static_library("system_wrappers") {
|
||||
rtc_library("system_wrappers") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
"include/aligned_array.h",
|
||||
"include/aligned_malloc.h",
|
||||
"include/atomic32.h",
|
||||
"include/clock.h",
|
||||
"include/condition_variable_wrapper.h",
|
||||
"include/cpu_features_wrapper.h",
|
||||
"include/cpu_info.h",
|
||||
"include/critical_section_wrapper.h",
|
||||
"include/data_log.h",
|
||||
"include/data_log_c.h",
|
||||
"include/data_log_impl.h",
|
||||
"include/event_tracer.h",
|
||||
"include/event_wrapper.h",
|
||||
"include/field_trial.h",
|
||||
"include/file_wrapper.h",
|
||||
"include/fix_interlocked_exchange_pointer_win.h",
|
||||
"include/logging.h",
|
||||
"include/metrics.h",
|
||||
"include/ref_count.h",
|
||||
"include/rtp_to_ntp.h",
|
||||
"include/rw_lock_wrapper.h",
|
||||
"include/scoped_vector.h",
|
||||
"include/ntp_time.h",
|
||||
"include/rtp_to_ntp_estimator.h",
|
||||
"include/sleep.h",
|
||||
"include/sort.h",
|
||||
"include/static_instance.h",
|
||||
"include/stl_util.h",
|
||||
"include/stringize_macros.h",
|
||||
"include/thread_wrapper.h",
|
||||
"include/tick_util.h",
|
||||
"include/timestamp_extrapolator.h",
|
||||
"include/trace.h",
|
||||
"include/utf_util_win.h",
|
||||
"source/aligned_malloc.cc",
|
||||
"source/atomic32_mac.cc",
|
||||
"source/atomic32_win.cc",
|
||||
"source/clock.cc",
|
||||
"source/condition_variable.cc",
|
||||
"source/condition_variable_event_win.cc",
|
||||
"source/condition_variable_event_win.h",
|
||||
"source/condition_variable_native_win.cc",
|
||||
"source/condition_variable_native_win.h",
|
||||
"source/condition_variable_posix.cc",
|
||||
"source/condition_variable_posix.h",
|
||||
"source/cpu_features.cc",
|
||||
"source/cpu_info.cc",
|
||||
"source/critical_section.cc",
|
||||
"source/critical_section_posix.cc",
|
||||
"source/critical_section_posix.h",
|
||||
"source/critical_section_win.cc",
|
||||
"source/critical_section_win.h",
|
||||
"source/data_log_c.cc",
|
||||
"source/event.cc",
|
||||
"source/event_timer_posix.cc",
|
||||
"source/event_timer_posix.h",
|
||||
"source/event_timer_win.cc",
|
||||
"source/event_timer_win.h",
|
||||
"source/event_tracer.cc",
|
||||
"source/file_impl.cc",
|
||||
"source/file_impl.h",
|
||||
"source/logging.cc",
|
||||
"source/rtp_to_ntp.cc",
|
||||
"source/rw_lock.cc",
|
||||
"source/rw_lock_generic.cc",
|
||||
"source/rw_lock_generic.h",
|
||||
"source/rw_lock_posix.cc",
|
||||
"source/rw_lock_posix.h",
|
||||
"source/rw_lock_win.cc",
|
||||
"source/rw_lock_win.h",
|
||||
"source/rtp_to_ntp_estimator.cc",
|
||||
"source/sleep.cc",
|
||||
"source/sort.cc",
|
||||
"source/thread.cc",
|
||||
"source/thread_posix.cc",
|
||||
"source/thread_posix.h",
|
||||
"source/thread_win.cc",
|
||||
"source/thread_win.h",
|
||||
"source/tick_util.cc",
|
||||
"source/timestamp_extrapolator.cc",
|
||||
"source/trace_impl.cc",
|
||||
"source/trace_impl.h",
|
||||
"source/trace_posix.cc",
|
||||
"source/trace_posix.h",
|
||||
"source/trace_win.cc",
|
||||
"source/trace_win.h",
|
||||
]
|
||||
|
||||
configs += [ "..:common_config" ]
|
||||
|
||||
public_configs = [ "..:common_inherited_config" ]
|
||||
|
||||
if (rtc_enable_data_logging) {
|
||||
sources += [ "source/data_log.cc" ]
|
||||
} else {
|
||||
sources += [ "source/data_log_no_op.cc" ]
|
||||
}
|
||||
|
||||
defines = []
|
||||
libs = []
|
||||
deps = [
|
||||
"..:webrtc_common",
|
||||
":field_trial",
|
||||
"../api:array_view",
|
||||
"../api/units:timestamp",
|
||||
"../modules:module_api_public",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base/synchronization:mutex",
|
||||
"../rtc_base/synchronization:rw_lock_wrapper",
|
||||
"../rtc_base/system:arch",
|
||||
"../rtc_base/system:rtc_export",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"include/logcat_trace_context.h",
|
||||
"source/logcat_trace_context.cc",
|
||||
]
|
||||
|
||||
defines += [
|
||||
"WEBRTC_THREAD_RR",
|
||||
|
||||
# TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
|
||||
# support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
|
||||
# remove it after I verify that CLOCK_MONOTONIC is fully functional
|
||||
# with condition and event functions in system_wrappers.
|
||||
"WEBRTC_CLOCK_TYPE_REALTIME",
|
||||
]
|
||||
|
||||
deps += [ ":cpu_features_android" ]
|
||||
if (build_with_mozilla) {
|
||||
include_dirs = [
|
||||
"/config/external/nspr",
|
||||
"/nsprpub/lib/ds",
|
||||
"/nsprpub/pr/include",
|
||||
]
|
||||
} else {
|
||||
sources += [ "source/cpu_features_android.cc" ]
|
||||
deps += [ "//third_party/android_sdk:cpu_features" ]
|
||||
}
|
||||
|
||||
libs += [ "log" ]
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
defines += [
|
||||
"WEBRTC_THREAD_RR",
|
||||
# TODO(andrew): can we select this automatically?
|
||||
# Define this if the Linux system does not support CLOCK_MONOTONIC.
|
||||
#"WEBRTC_CLOCK_TYPE_REALTIME",
|
||||
]
|
||||
if (is_linux || is_chromeos) {
|
||||
if (!build_with_chromium) {
|
||||
sources += [ "source/cpu_features_linux.cc" ]
|
||||
}
|
||||
|
||||
libs += [ "rt" ]
|
||||
}
|
||||
|
||||
if (!is_mac && !is_ios) {
|
||||
sources += [ "source/atomic32_posix.cc" ]
|
||||
}
|
||||
|
||||
if (is_ios || is_mac) {
|
||||
defines += [
|
||||
"WEBRTC_THREAD_RR",
|
||||
"WEBRTC_CLOCK_TYPE_REALTIME",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_ios) {
|
||||
sources += [ "source/atomic32_mac.cc" ]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
libs += [ "winmm.lib" ]
|
||||
|
||||
cflags = [
|
||||
"/wd4267", # size_t to int truncation.
|
||||
"/wd4334", # Ignore warning on shift operator promotion.
|
||||
]
|
||||
# Windows needs ../rtc_base due to include of
|
||||
# webrtc/rtc_base/win32.h in source/clock.cc.
|
||||
deps += [ "../rtc_base:win32" ]
|
||||
}
|
||||
|
||||
deps += [ "../base:rtc_base_approved" ]
|
||||
deps += [
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:rtc_numerics",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("field_trial_default") {
|
||||
sources = [
|
||||
"include/field_trial_default.h",
|
||||
"source/field_trial_default.cc",
|
||||
]
|
||||
|
||||
configs += [ "..:common_config" ]
|
||||
public_configs = [ "..:common_inherited_config" ]
|
||||
|
||||
rtc_library("field_trial") {
|
||||
visibility = [ "*" ]
|
||||
public = [ "include/field_trial.h" ]
|
||||
sources = [ "source/field_trial.cc" ]
|
||||
if (rtc_exclude_field_trial_default) {
|
||||
defines = [ "WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT" ]
|
||||
}
|
||||
deps = [
|
||||
":system_wrappers",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:logging",
|
||||
"../rtc_base:stringutils",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
||||
}
|
||||
|
||||
source_set("metrics_default") {
|
||||
sources = [
|
||||
"source/metrics_default.cc",
|
||||
]
|
||||
|
||||
configs += [ "..:common_config" ]
|
||||
public_configs = [ "..:common_inherited_config" ]
|
||||
|
||||
rtc_library("metrics") {
|
||||
visibility = [ "*" ]
|
||||
public = [ "include/metrics.h" ]
|
||||
sources = [ "source/metrics.cc" ]
|
||||
if (rtc_exclude_metrics_default) {
|
||||
defines = [ "WEBRTC_EXCLUDE_METRICS_DEFAULT" ]
|
||||
}
|
||||
deps = [
|
||||
":system_wrappers",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base/synchronization:mutex",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("system_wrappers_default") {
|
||||
configs += [ "..:common_config" ]
|
||||
public_configs = [ "..:common_inherited_config" ]
|
||||
|
||||
deps = [
|
||||
":field_trial_default",
|
||||
":metrics_default",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
source_set("cpu_features_android") {
|
||||
if (rtc_include_tests) {
|
||||
rtc_test("system_wrappers_unittests") {
|
||||
testonly = true
|
||||
sources = [
|
||||
"source/cpu_features_android.c",
|
||||
"source/clock_unittest.cc",
|
||||
"source/field_trial_unittest.cc",
|
||||
"source/metrics_default_unittest.cc",
|
||||
"source/metrics_unittest.cc",
|
||||
"source/ntp_time_unittest.cc",
|
||||
"source/rtp_to_ntp_estimator_unittest.cc",
|
||||
]
|
||||
|
||||
configs += [ "..:common_config" ]
|
||||
public_configs = [ "..:common_inherited_config" ]
|
||||
deps = [
|
||||
"//third_party/android_tools:cpu_features",
|
||||
":field_trial",
|
||||
":metrics",
|
||||
":system_wrappers",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../test:rtc_expect_death",
|
||||
"../test:test_main",
|
||||
"../test:test_support",
|
||||
"//testing/gtest",
|
||||
"//third_party/abseil-cpp/absl/strings",
|
||||
]
|
||||
|
||||
if (is_android) {
|
||||
deps += [ "//testing/android/native_test:native_test_support" ]
|
||||
|
||||
shard_timeout = 900
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user